This course will enhance your understanding of the art of writing Linux device drivers beyond the basic device driver course. You will learn how to build and explore a framework that can be used to develop a commercial grade driver. Topics include Linux kernel services and facilities, memory management, network stack, interrupt handling, DMA techniques, and kernel memory mapping. The course focuses on two IO subsystems, PCI and USB, and discusses PCI device configuration space, IO memory mapping, USB Core and Descriptors.
The course includes advanced topics such as the unified device model, sysfs file system, concurrency issues on the SMP platform, block layer, bus-independent device access, and kernel threads. The course also addresses the debugging support available in Linux kernel, including live debugging and profiling driver code. The instructor will review code snippets from full-fledged drivers and survey industry trends.
In the final project, you will build a fully functional driver for a PCI or USB Ethernet card. In the process, you will learn to write code to avoid pitfalls. Upon completing the course, you will have acquired advanced knowledge of Linux device drivers and be familiar with practical driver examples that you can readily apply in the work environment.
- Char and network device classes
- Kernel memory allocation and mapping
- Bus-independent IO, DMA and remapping
- PCI bus
- USB bus
- Linux unified device model
- Concurrency and race conditions
- Linux block IO layer
- Debugging and profiling
Note(s): This is an advanced course, and the introductory lessons on device drivers will not be repeated in this course.
This course requires the purchase of a specific PCI or USB network board or adapter card (approximately $15 - 20, not included in the tuition) to complete the assignments. Students are expected to use their own Linux-based computers to do the programming project. The detailed board information will be provided in the first meeting of class.