general question on interrupts handling

Matías Perret Cantoni perretcantonim at gmail.com
Mon Apr 27 15:44:52 UTC 2015


2015-04-06 18:07 GMT-03:00 John Baldwin <john at baldwin.cx>:

> On Thursday, March 12, 2015 06:52:25 PM Matías Perret Cantoni wrote:
> > Hi!
> >
> > I'm writing my first interrupt handling routine of a newbus driver and
> I'm
> > not sure what things should I take care of in my ISR and what things the
> > system will take care.
> >
> > I'm working on a Xilinx Zynq-7000 platform. I'm generating a Shared
> > Peripheral Interrupt from the FPGA.
> >
> > For example...
> > ... do I have to disable interrupts upon entering my ISR and enable them
> > again before returning, o FreeBSD does it for me?
> > ... do I have to clear the GIC interrupt status of my interrupt or the
> > systems does it automatically when my routine returns?
> >
> > Please excuse me if this is too general or silly.  If you can point me
> any
> > documentation or sources to read, It'd be great.
>
> For a regular interrupt handler that runs in an thread context, the system
> will generally mask your device's interrupt until the interrupt thread is
> scheduled and runs your handler.  After your handler returns the interrupt
> will be unmasked.
>
> For a filter interrupt handler that does not run in an interrupt thread
> context, no masking is done and you generally need to mask the interrupt
> yourself using a device-specific register if you cannot fully handle the
> interrupt in the filter routine.
>
> --
> John Baldwin
>
> Thank you John!
Regards.


More information about the freebsd-drivers mailing list