Question about rtems_irq_symbolic_name, rtems_vector_number and IRQ stuff.

Jay Monkman jtm-list-rtems at smoothsmoothie.com
Wed Oct 20 17:58:29 UTC 2004


On Tue, Oct 19, 2004 at 05:27:59PM +0200, Pavel Pisa wrote:
> 1) what is difference of types rtems_irq_symbolic_name, rtems_vector_number
>    Is there some function to convert one value to another or the value
>    is supposed to be equal? Or they are opaque and there is no public
>    relation between them.

They are two different ways to do the same thing. They should be
merged (someday).

> 2) Is there some declared way to get pointer to rtems_irq_connect_data
>    from rtems_vector_number in the ISR routine
>          xxxxx_isr(rtems_vector_number v)

ARM interrupt handling is a mess. I don't think any of the BSPs pass
in the rtems_vector_number to the ISR. So, no, you can't translat
rtems_vector_number to rtems_irq_connect_data.

To change the interrupt handling to support this (which needs to be
done) shouldn't be too hard.

> 3) Is it correct to use BSP_install_rtems_irq_handler in device like code
>    implemented in my application or rtems_interrupt_catch is supposed
>    to be used there exclusively?

On ARM, you should use BSP_install_rtems_irq_handler, becuase it deals
with the interrupt controller in the CPU. rtems_interrupt_catch only
deals with ARM exceptions (IRQ, FIQ, etc).

> 4) Is there some way, how to block IRQ source in the ISR routine
>    until event is processed by worker thread? Only way I see from
>    the sources is to try to locate rtems_irq_connect_data and call
>    its off routine. But this could lead to some collision with
>    RTEMS internal use of this routine.

Either keep track of rtems_irq_connect_data external to the ISR
(e.g. a global variable) or talk to the interrupt controller
directly. 

Nothing within the RTEMS core knows about the rtems_irq_connect_data
struct. It's specific to the BSP. The only time it is used is when you
install the exception handler.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.rtems.org/pipermail/users/attachments/20041020/444505d0/attachment-0001.bin>


More information about the users mailing list