Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Apr 2015 12:44:50 -0300
From:      =?UTF-8?Q?Mat=C3=ADas_Perret_Cantoni?= <perretcantonim@gmail.com>
To:        John Baldwin <john@baldwin.cx>
Cc:        freebsd-drivers@freebsd.org
Subject:   Re: general question on interrupts handling
Message-ID:  <CADLKG02B=%2BTHWzEzKoqo04hMU-izOW17Voosq-04xDvDGd5a%2BQ@mail.gmail.com>
In-Reply-To: <1512772.cb4krpaZ39@ralph.baldwin.cx>
References:  <CADLKG02i3%2BO0ZMo1vpcLLGFVaDEgrqzKBNSfrdL3zLwE4UMjtg@mail.gmail.com> <1512772.cb4krpaZ39@ralph.baldwin.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
2015-04-06 18:07 GMT-03:00 John Baldwin <john@baldwin.cx>:

> On Thursday, March 12, 2015 06:52:25 PM Mat=C3=ADas 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 th=
e
> > 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 the=
m
> > 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 syste=
m
> will generally mask your device's interrupt until the interrupt thread is
> scheduled and runs your handler.  After your handler returns the interrup=
t
> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLKG02B=%2BTHWzEzKoqo04hMU-izOW17Voosq-04xDvDGd5a%2BQ>