[okl4-developer] Interrupts
Nelson Tam
nelson at ok-labs.com
Tue Jun 3 10:50:38 EST 2008
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1560 bytes
Desc: not available
Url : http://lists.okl4.org/pipermail/developer/attachments/20080603/cbf2f59b/attachment-0001.bin
More information about the Developer
mailing list