Next: Conclusion
Up: Future work
Previous: Other OS ports
One potential use of this port in kernel development that hasn't been explored
yet is driver writing and debugging. This requires access to physical devices
rather than the virtualized, simulated devices that are currently supported.
There are two main types of access that would be required:
- I/O memory access
- Linux currently supports, via the io_remap facility,
mapping I/O memory into a process virtual address space. This would give a driver
access to the device's memory and registers.
- Interrupts
- Device interrupts need to be forwarded to the user-mode driver somehow.
The current plan for supporting this involves a stub driver in the native kernel
which can probe for the device at boot time. This driver would recognize the
device and provide some mechanism for the real user-mode driver to gain access
to it, such as an entry in /proc or /dev. The user-mode driver
would open that file and make requests of the stub driver with calls to ioctl.
The file descriptor would also provide the mechanism to forward interrupts from
the stub driver to the user-mode driver. The stub driver's interrupt routine
would raise a SIGIO on the file descriptor. One potential problem with
this would be if the device needed some kind of response to an interrupt from
the driver before interrupts are re-enabled. This would preclude that response
from coming from the user-mode driver because the process couldn't be run with
hardware interrupts disabled. The stub driver would have to respond, which would
require that code be put in the host kernel, and it couldn't be tested in user
space.
Next: Conclusion
Up: Future work
Previous: Other OS ports
Jeff Dike
2000-08-25