[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adding New Hardware Interrupts

Hi Robert,

> My ideal approach here is to only deal with one BSP for all processors, 
> for the obvious reasons, and add support for the additional devices at 
> the "application level".  This seems rather straightforward, until the 
> issue of interrupts come in.

This surely makes sense.
> Is the interrupt manager (i.e. rtems_interrupt_XXX() family of 
> functions) the way to go here?  How do I determine the 
> rtems_vector_number for the interrupt_catch() function? 
No, as Joel pointed out, you should use the rtems_irq_* set of
functions, due to the (no longer so) new exception handling concept.
> My suspicion is that in "normal" cases, the vector numbers are defined 
> by the BSP - is that correct?  But here, I have interrupts that are not 
> known to the BSP, so I think I need to use BSP-level interrupt 
> facilities, that are not well documented, at least not that I'm aware 
> of.  Am I correct in this assumption?  And if so, where do I get more 
> information on this level?
Ok, we already built in a tweak to handle the additional stuff, although
I am not sure whether it does all it should do.
If you look into c/src/lib/libbsp/powerpc/virtex/irq/irq.h , you will
find, that we already import a defintion from your Xilinx EDK named
"XPAR_INTC_MAX_NUM_INTR_INPUTS". If this is set to the real maximum of
all your FPGAs, then the irq handler functions are already aware of the
additional IRQ inputs and should treat them properly. So if you have a
total of 20 lines routed to your obpintc, (?), then you should be able
to install an interrupt handler for the highest IRQ source using the
following interrupt number:


What is still missing is a set of definitions to give nice names to
these interrupt inputs and their numbers, but since you want to treat
them on application level, you should also name them their. So we might
find things like that in your code later:



Does this make sense for you?


embedded brains GmbH
Thomas Doerfler           Obere Lagerstr. 30
D-82178 Puchheim          Germany
Tel. : +49-89-18 90 80 79-2
Fax  : +49-89-18 90 80 79-9
email: Thomas.Doerfler at embedded-brains.de
PGP public key available on request

Diese Nachricht ist keine gesch?ftliche Mitteilung im Sinne des EHUG.