BSP and Device Driver Development Guide
On targets with Simple Vectored Interrupts, the BSP must provide
an implementation of the set_vector
routine. This routine is
responsible for installing an interrupt vector. It invokes the support
routines necessary to install an interrupt handler as either a "raw"
or an RTEMS interrupt handler. Raw handlers bypass the RTEMS interrupt
structure and are responsible for saving and restoring all their own
registers. Raw handlers are useful for handling traps, debug vectors,
etc..
The set_vector
routine is a central place to perform interrupt
controller manipulation and encapsulate that information. It is usually
implemented as follows:
rtems_isr_entry set_vector( /* returns old vector */ rtems_isr_entry handler, /* isr routine */ rtems_vector_number vector, /* vector number */ int type /* RTEMS or RAW intr */ ) { if the type is RAW install the raw vector else use rtems_interrupt_catch to install the vector perform any interrupt controller necessary to unmask the interrupt source return the previous handler }
NOTE: The i386, PowerPC and ARM ports use a Programmable
Interrupt Controller model which does not require the BSP to implement
set_vector
. BSPs for these architectures must provide a different
set of support routines.
BSP and Device Driver Development Guide
Copyright © 1988-2008 OAR Corporation