[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: drivers for l4-hurd

From: Volkmar Uhlig
Subject: RE: drivers for l4-hurd
Date: Wed, 27 Nov 2002 15:53:01 +0100


L4 Version 4 deals with interrupts in a slightly different way than the
old L4 kernel. In V4 the IRQ controller is not exported to user
applications anymore. Instead, the kernel hides the handling and only
exports the IRQ threads which can be attached to a handler thread.

On IRQ arrival the kernel masks and acks the corresponding IRQ on the
controller and sends an IPC to the associated handler thread. When the
device driver handled the IRQ on the device it sends an re-enable IPC
back to the IRQ thread. Hence, the L4 kernel basically only exports
hardware interrupt lines in form of threads and device drivers do not
have to deal with edge or level triggering, and other nightmares.

We introduced that scheme for three main reasons. 
First, exporting the IRQ controller to user level allows to disable
timer interrupts which could halt the system. One could argue that
device drivers are part of the trusted computing base, but that is not
always true. For example a serial line device driver does not
necessarily have access to DMA and can therefore completely
Second, on many systems (not IA32) interrupt controllers cannot be
accessed from user level. Hence, the kernel must take care of the IRQ
controller. Since the V4 API is designed to be applicable to many
different architectures there is need for a generic way for handling
The third point is multi-processor systems. In the single processor case
access to the interrupt controller can be synchronized by disabling the
interrupts. But in the SMP case it must be synchronized between all
CPUs. Now, this leads to the problem that multiple threads _and_ the
kernel access the interrupt controllers concurrently. I.e. to allow
cross-processor operations in L4, the kernel has to send (and ack)
inter-processor interrupts.

- Volkmar

reply via email to

[Prev in Thread] Current Thread [Next in Thread]