[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Relating rtems_symbolic_irq_name to vector number
- Date: Thu, 20 Feb 2003 10:04:49 -0800
- From: strauman at slac.stanford.edu (till)
- Subject: Relating rtems_symbolic_irq_name to vector number
Ha ha - welcome on board.
Didn't you happen to follow the IRQ API discussion that has been going
on for weeks now?
It started with my harmless proposal to add an ISR argument...
For the moment, you have to live with what's there. I strongly
discourage you from
hacking the vectoring code (for sake of compatibility). You must go the
bitter route of
creating wrappers for each different vector. (Or you can use the same
times. The ISR has to query all devices to find the IRQ source).
gregory.menke at gsfc.nasa.gov wrote:
> > 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.
> > 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