efi332 console violates interrupt rules

Joel Sherrill joel.sherrill at OARcorp.com
Sat Nov 2 13:55:42 UTC 2002

"Aaron J. Grier" wrote:
> On Fri, Nov 01, 2002 at 05:08:36PM -0600, Joel Sherrill wrote:
> > Just an FYI to anyone who uses this or based a driver on it.  This
> > driver bypasses RTEMS completely and could lead to system faults.
> >
> > This problem was corrected in the mrm332 BSP and needs to be
> > back-fitted to the efi332.
> what specifically is the issue?  I remember looking long and hard at
> both the efi and mvme BSPs when I was bringing up our 68331 BSP, but I
> can't really remember which I modeled my (non-termios) console driver
> after.  I do plan on turning it into termios in the near future, though.

Look at the inline assembly.  It is not using rtems_interrupt_catch
to install the interrupt.  It is putting it directly in the 
interrupt vector table which means that it is bypassing all
RTEMS scheduling that happens as part of an ISR.  The fix isn't that
difficult.  Look at the mrm332 BSP for how it does it.  Basically
delete the inline asm and call set_vector/rtems_interrupt_catch
during driver initialization.

If the driver makes any calls to RTEMS during the ISR, then the
stability of the system is in question unless it follows ISR rules.
Also if this is not the highest priority interrupt in the system,
all bets are off as well.

> --
>   Aaron J. Grier  |   Frye Electronics, Tigard, OR   |  aaron at frye.com

Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985

More information about the users mailing list