bug-hurd
[Top][All Lists]
Advanced

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

Re: plan to work on user-level device drivers


From: Thomas Schwinge
Subject: Re: plan to work on user-level device drivers
Date: Wed, 8 Jul 2009 19:21:04 +0200
User-agent: Mutt/1.5.11

Hello!

On Fri, Jun 26, 2009 at 02:48:24PM +0800, Da Zheng wrote:
> I am thinking about writing user-level device drivers. When I searched 
> Internet, I found the paper "An Architecture for Device Drivers 
> Executing as User-Level Tasks" written by David B. Golub, Guy G. 
> Sotomayor and Freeman L. Rawson, III. It might be exactly what I want 
> but unfortunately, the paper isn't available for downloading on 
> Internet.

Confirmed.  Neither is it (it's part of the ``Proceedings of the USENIX
Mach III Symposium'', by the way) available at my university's library or
another library nearby.

Options:

  * Thomas, Roland (CCed): Do you have a copy somewhere?

  * Send email to the authors, asking for a copy.

  * Send email to other authors who referenced it, asking for a copy.

  * Order it from USENIX:
    <http://www.usenix.org/publications/library/proceedings/mach3/>

  * Buy it elsewhere:
    <http://www.amazon.com/Proceedings-Usenix-MacH-III-Symposium/dp/1880446499>

  * For a small fee, I can use interlibrary loan to get hold of these
    proceedings.  I can do that, no problem.


> I wonder if anyone knows the work and more importantly, where 
> I can download the code.

I have no idea.  Perhaps it's part of the Mach multiserver distribution?
A lot of CMU stuff is available via FTP; do something like this to get
hold of it:

    $ lftp -c mirror --verbose --delete \
        ftp://ftp.cs.cmu.edu/afs/cs/project/mach/public \
        CMU_Mach

<ftp://flux.cs.utah.edu/flux/> also has interesting stuff, and as well
have <ftp://ftp.funet.fi/pub/mach/>, <ftp://ftp.funet.fi/pub/doc/OS/> and
<ftp://ftp.funet.fi/pub/OS/> -- the latter including a Hurd snapshot from
1995 ;-).  (Done anyone know of other collections of Mach-related
resources?)  (I should take a month off to actually read all these
papers.)


Also, I began to put up some stuff and references here:
<http://www.gnu.org/software/hurd/open_issues/user-space_device_drivers.html>
and
<http://www.gnu.org/software/hurd/open_issues/device_drivers_and_io_systems.html>,
but this is totally unfinished and unpolished so far.

> My plan is to write a user-level device driver for testing and ideally, 
> to port ddekit to Mach if it is possible.
> The first device I choose will be ethernet card, which I think is the 
> one I relatively familiar with.
> Any suggestion is welcome!

I would start with something much simpler.  Something that does not even
involve PCI.  For example, continue to work on the user-space keyboard
driver that I linked to on the user-space_device_drivers page.  Or even
simpler, begin with something that really only sends a message to a
user-space server when an interrupt occurs (from the keyboard, for
example, or serial line (mouse); for now additionally to handling that
interrupt in the kernel driver), work out how user-space servers can
register as receivers for interrupts, stuff like that.  Have a look at
the Omega0 paper I linked to from the same web page.  I think (if I
recall correctly from having read it two years ago) it has a nice summary
of how the PC IRQ system works, and how to deal with that in a
microkernel system.  Also, as you noticed in the ``An I/O System for Mach
3.0'' paper, such stuff should already be part of the (of *some*) Mach
code base.  I have no idea whether it's in GNU Mach.  Actually, I just
had a look and here is my very quick analysis: interrupts are handled in
i386/i386at/interrupt.S:interrupt, from where it is diverted to the
registered handler as specified in ivect.  This one is originally defined
in i386/i386at/pic_isa.c and later modified (according to run-time device
registrations during booting) in i386/i386at/autoconf.c:take_dev_irq and
take_ctlr_irq (the latter being obsolete, it seems),
i386/i386at/kd_mouse.c and linux/dev/arch/i386/kernel/irq.c.  No sign of
anything that would allow for registering a user-space server for
receiving interrupt messages.  But perhaps I've been looking at the wrong
place.  Perhaps there are some Mach sources in the FTP repositories that
include such things?

That aside, I still don't know if a NIC is the most easy thing to begin
with.  What also could be done, and what I had in mind for a long time
already, is a simple driver for a SoundBlaster ISA card (again, no PCI
for now -- I don't know if PCI device registration actually is difficult,
but let's simply avoid that for now).  I think that QEMU and friends can
still emulate such ISA sound cards.  And then: there are quite a few
Minix 2 and Minix 3 papers that describe the design and implementation of
exactly such servers for Minix.  Perhaps we can even use their code.
(Minix 3 being the most valuable candidate, of course.)  Also have a look
what they're doing in general for delivering IRQs, and setting up DMA,
etc.  Or, you could have a more detailed look at what the L4 people are
doing: are there some paper that reference the Omega0 one, perhaps?

I will try to add more links to such stuff to the web pages.  Please,
also add your findings there.


Regards,
 Thomas

Attachment: signature.asc
Description: Digital signature


reply via email to

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