[[!meta copyright="Copyright © 2008, 2009, 2010, 2011, 2016, 2017, 2018 Free
Software Foundation, Inc."]]
[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no Invariant
Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
is included in the section entitled [[GNU Free Documentation
[[!meta title="New Driver Framework"]]
The Hurd presently uses hardware drivers
implemented in the microkernel, [[GNU_Mach|microkernel/mach/gnumach]].
These drivers are old Linux drivers (mostly from 2.0.x)
accessed through a glue code layer.
This is not an ideal solution, but works quite OK,
except that the drivers are extremely old by now.
Thus we need a new framework,
so we can use drivers from current Linux versions instead,
or perhaps from one of the free BSD variants.
This is [[!GNU_Savannah_task 5488]].
[[open issues/user-space device drivers]].
[[open issues/device drivers and io systems]].
The most promising approach for getting newer drivers seems to be the [[Rump_Kernel]]:
it already does the hard work of providing an environment
where the foreign drivers can run,
and offers the additional benefit of being externally maintained.
Rump also offers the necessary facilities
for running all drivers in separate userspace processes,
which is more desirable than drivers running in the microkernel.
Robert Millan worked on a port of the Rump kernel, which allowed to run a sound
driver in userland. This work now needs to be extended.
[[Zheng Da|zhengda]] has already done considerable work on a similar approach, using [[DDE]]
The basic framework for using DDE in the Hurd is present,
and network card drivers are already working very well.
However, this work isn't fully integrated in the Hurd yet.
The additional kernel interfaces that were created for this
are still prototypes, and will need to be reworked. This environment can be
reused and polished for Rump.
Other types of drivers are missing so far.
Support for IDE drivers has been partially implemented,
but isn't fully working yet.
To fully replace the old in-kernel drivers,
further infrastructure will be necessary
to make userspace disk drivers usable for the root filesystem.
The goal of this task is to fix at least one of the mentioned major shortcomings:
rework the kernel interfaces;
polish the rumpkernel changes;
componentize the rumpkernel elements for sound;
or implement support for some other subsystem.
<!-- should probably provide separate task descriptions for each... -->
This is a doable, but pretty involved project.
Previous experience with driver programming probably is a must.
To be able to work on the framework,
the student will also have to get a good understanding of certain aspects of Hurd,
such as memory management for example.
Possible mentors: Justus Winter (teythoon), Samuel Thibault (youpi)
Exercise: Install and run the current rumpkernel library (librump0) and the corresponding mplayer, get it to run.