RTEMS Logo

RTEMS 4.9.2 On-Line Library


Port Specific Information Interrupt Processing

PREV UP NEXT Bookshelf RTEMS CPU Architecture Supplement

1.4: Interrupt Processing

  • Port Specific Information Vectoring of an Interrupt Handler
  • Port Specific Information Interrupt Levels
  • Port Specific Information Disabling of Interrupts by RTEMS
  • Different types of processors respond to the occurrence of an interrupt in its own unique fashion. In addition, each processor type provides a control mechanism to allow for the proper handling of an interrupt. The processor dependent response to the interrupt modifies the current execution state and results in a change in the execution stream. Most processors require that an interrupt handler utilize some special control mechanisms to return to the normal processing stream. Although RTEMS hides many of the processor dependent details of interrupt processing, it is important to understand how the RTEMS interrupt manager is mapped onto the processor's unique architecture.

    RTEMS supports a dedicated interrupt stack for all architectures. On architectures with hardware support for a dedicated interrupt stack, it will be initialized such that when an interrupt occurs, the processor automatically switches to this dedicated stack. On architectures without hardware support for a dedicated interrupt stack which is separate from those of the tasks, RTEMS will support switching to a dedicated stack for interrupt processing.

    Without a dedicated interrupt stack, every task in the system MUST have enough stack space to accommodate the worst case stack usage of that particular task and the interrupt service routines COMBINED. By supporting a dedicated interrupt stack, RTEMS significantly lowers the stack requirements for each task.

    A nested interrupt is processed similarly with the exception that since the CPU is already executing on the interrupt stack, there is no need to switch to the interrupt stack.

    In some configurations, RTEMS allocates the interrupt stack from the Workspace Area. The amount of memory allocated for the interrupt stack is user configured and based upon the confdefs.h parameter CONFIGURE_INTERRUPT_STACK_SIZE. This parameter is described in detail in the Configuring a System chapter of the User's Guide. On configurations in which RTEMS allocates the interrupt stack, during the initialization process, RTEMS will also install its interrupt stack. In other configurations, the interrupt stack is allocated and installed by the Board Support Package (BSP).

    In each of the architecture specific chapters, this section discesses the interrupt response and control mechanisms of the architecture as they pertain to RTEMS.


    PREV UP NEXT Bookshelf RTEMS CPU Architecture Supplement

    Copyright © 1988-2008 OAR Corporation