Adding New Hardware Interrupts

Leon Pollak leonp at plris.com
Tue Apr 8 14:41:19 UTC 2008


What I did (which may be not so elegant, but it works): 
The structure rtems_irq_connect_data has the field 'handle'. 
This field is passed to the user IRQ handler at the time of interrupt 
processing (see C_dispatch_irq_handler function). 
I simply always fill it with the IRQ number.

Hope this helps.

On Tuesday, 8 בApril 2008, Joel Sherrill wrote:
> Robert S. Grimes wrote:
> > Hi all,
> >
> > I am using the PowerPC/Virtex BSP to develop several cooperating
> > applications built on (physically) identical processor boards; however,
> > the boards are mated to different "analog I/O" boards to support the
> > different mix of external actuators and sensors.  So, the FPGA
> > configurations are different for each instance, though they share a core
> > set of peripherals (e.g. interrupt controller, console I/O, networking,
> > two SPI controllers, etc.); each instance adds additional peripherals,
> > as needed.
> >
> > 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.
> >
> > 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?
>
> That's for simple vectored.  You need to use the rtems_irq
> type functions.
>
> I hope Till or Thomas speaks up but in general, you extend
> the defines for IRQ and add code to recognize the vector
> source and associate it with that number.
>
> > 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?
> >
> > As you can see, the configurability of the Virtex really stresses the
> > BSP notion - instead of a single, static board, there are a multitude of
> > possibilities...
>
> Definitely.  I can see here where the code that vectors the
> IRQ must be tailored.  Till has some generic shared IRQ code.
> Is this BSP using it yet?  We need to address in a general way.
>
> > Thanks,
> > -Bob
> > _______________________________________________
> > rtems-users mailing list
> > rtems-users at rtems.com
> > http://rtems.rtems.org/mailman/listinfo/rtems-users
-- 
Leon 



More information about the users mailing list