[okl4-developer] Interrupts
Geoffrey Lee
glee at ok-labs.com
Tue Jun 3 22:27:22 EST 2008
On Tue, Jun 03, 2008 at 08:52:44AM +0530, Kalamkar, Dhiraj D wrote:
> Hi Nelson,
>
> I guess I understand how it works with v2_drivers but what about OKLinux drivers that handles device interrupt directly. I guess today it uses hardware_register_interrupt() to register interrupt handler with L4, how will it be done in absence of hardware_register_interrupt()?
The idea for most platforms is that configuration such as interrupt
assignment can be statically configured, so this is specified
in the machines description file.
OK Linux can be given access to interrupts just like another Iguana
programs. The interrupt assignment will need to be done beforehand.
>
> Thanks,
> Dhiraj
-gl
>
> -----Original Message-----
> From: developer-bounces at okl4.org [mailto:developer-bounces at okl4.org] On Behalf Of Nelson Tam
> Sent: Tuesday, June 03, 2008 6:21 AM
> To: Sebastian Huß
> Cc: developer at okl4.org
> Subject: Re: [okl4-developer] Interrupts
>
> Hi Sebastian,
>
> On 03/06/2008, at 1:50 AM, Sebastian Huß wrote:
>
> > Hi Geoffrey,
> >
> >> In the latest OKL4 2.1 release the interrupts are normally assigned
> >> statically at build time. You do this by editing the machines.py
> >> file located in platforms/*/tools/machines.py.
> >
> > Does this mean, the functions like hardware_register_interrupt() or
> > the corresponding low-level L4-Calls won't work?
>
> For the time being, hardware_register_interrupt() will work for
> interrupts that are not already allocated statically. We have kept it
> for backwards compatibility reasons, but it is expected to be
> completely removed in a future release. In fact its removal is on our
> short-term roadmap.
>
> >> In OKL4 2.1 we migrated the interrupt IPC model from being
> >> synchronous
> >> to asynchronous, but the old IRQ handler was left lying around, which
> >> I think is the cause of some of your confusion. Take a look
> >> at the vserial_async_handler() in the vserial driver which should
> >> hopefully clear things up.
> >
> > Well, the part in the idl4 [async_handler] is clear, but the problem
> > is
> > now how to get correctly registered for interrupts using machines.py
> > For my raw testing purposes I hacked my code into the
> > vserial_async_handler()
> > And used the corresponding interrupt, but that's no real solution.
>
>
> In 2.1, statically granting interrupts is always tied to the
> configuration of the device driver framework. That is because in most
> cases, the reason you want to get interrupts is to interact with
> devices.
>
> So in platform/[yourplat]/tools/machines.py, find the variable
> v2_drivers. It's an array of 4-tuples and each tuple instantiates a
> server that controls the given device. Since you typically need
> memory-mapped registers and interrupts to control a device, that
> server will be given what it needs to control its device. The device
> interrupts are defined in the last element of the tuple.
> --
> (nt)
>
> Nelson Tam
>
>
> _______________________________________________
> Developer mailing list
> Developer at okl4.org
> https://lists.okl4.org/mailman/listinfo/developer
>
--
More information about the Developer
mailing list