Recent versions of FreeBSD include a new device driver framework, Newbus, that
allows for device drivers to be implemented in a more platform independent
manner, as well as allowing for the dynamic loading and unloading of drivers
using the FreeBSD kernel module mechanism. The Newbus architecture makes
extensive use of many FreeBSD kernel features that are currently not well
documented. This tutorial aims to remove some of the mystery surrounding these
features. Each aspect of the kernel used by the Newbus architecture will be
covered in depth, including a walk through of the structures and algorithms used
in their implementation.
As well as providing background information on the implementation of Newbus, the
tutorial will also provide an example of how to convert a legacy driver to the
Newbus architecture and discuss the steps involved in implementing device
drivers using the Newbus API.
Who should attend?
Kernel developers interested in writing loadable device drivers or other kernel
modules and anyone interested in learning about the more FreeBSD specific
features of the kernel. A reasonable amount of C experience is assumed as well
as a basic understanding of data structures and algorithms. Some knowledge of
the kernel and device drivers would be advantageous.
Course outline
- Newbus features
- Kernel modules
- Linker sets
- Kernel linker
- Kernel objects
- Drivers, devices and classes
- The kernel resource manager
- Writing a device driver
- Porting legacy drivers