Relating rtems_symbolic_irq_name to vector number

gregory.menke at gsfc.nasa.gov gregory.menke at gsfc.nasa.gov
Thu Feb 20 18:39:00 UTC 2003


till writes:
 > Yeah, it's confusing. Look in "c/src/lib/libbsp/powerpc/shared/irq/irq.h"
 > If I remember right (am currently at home), The 16 ISA interrupts are first,
 > then come the OpenPIC interrupts.
 > 
 > You'd have to know which PCI interrupt the chip is using and how your
 > board routs that IRQ to the OpenPIC. Let's say it uses IRQA and that's
 > hooked to IRQ8 at the OpenPIC. The correct name would then be
 > 
 > 8 + BSP_PCI_IRQ_LOWEST_OFFSET
 > 
 > OTOH, if the PCI configuration registers are set up correctly by the
 > firmware, you should be able to just read the INTERRUPT_LINE
 > register from PCI configuration space.
 > 
 > The RTEMS/ppc/shared BSP uses a 1:1 mapping between interrupt
 > line and 'name'.
 > 

Actually the problem is worse.  I can get the vector from the card no
problem and get the interrupt set up- the existing code woks ok for
that.  I also found the PPC vectoring code which makes sense, but the
handlers are not passed any parameters... not even the vector.  I
suppose a good reason was given at some point for lossage like this,
but its quite annoying.  I presume its also why the unit # has been
hardcoded in the dec and fxp drivers.  Is there any reason why I
shouldn't tweak the vectoring code to pass the irq #- it won't cost
but a couple instructions and will make the vectoring much simpler.

Gregm


 > 
 > wrote:
 > 
 > >I'm working on getting multiple DEC21140 units to work, so far I'm
 > >making progress- a single board arrangement still works... ;) But I'm
 > >not quite sure how to relate an irqname to the vector that comes in on
 > >the interrupt.  From looking at the bsp's irq management defines it
 > >seems like theres probably a way to work from one to the other, but
 > >due to me not having lots of experience with the ppc, I'm not sure
 > >where to look.  Any hints are appreciated.
 > >
 > >Thanks,
 > >
 > >Gregm




More information about the users mailing list