Linux Device Drivers


An Introduction to Kernel
Programming

Brief review of basic Linux concepts
bullet

Protected mode memory management—user space vs. kernel space

bullet

File system and directory structure

bullet

Development environment
 

Introducing device drivers
bullet

What is a “device driver”?

bullet

Linux device classes and user space API

bullet

Kernel space driver API

bullet

“Hooking” a driver into the kernel
 

Kernel modules

Debugging kernel modules
bullet

printk

bullet

proc files

bullet

Tracing—strace, Linux trace toolkit

bullet

Debuggers—gdb, kdb, kgdb
 

Asynchronous I/O
bullet

Blocking vs. non-blocking operation

bullet

Invoking the driver from multiple processes—reentrancy
 

Kernel memory management

Accessing real hardware
bullet

Using I/O Ports--“side effects”

bullet

A parallel port driver

bullet

Platform dependencies
 

Interrupt handling
bullet

How Linux handles interrupts

bullet

Implementing and installing an interrupt handler

bullet

Bottom halves -- work queues, and tasklets
 

Managing Time

 

Block drivers
bullet

Registering a block driver

bullet

Handling requests

bullet

Mounting and unmounting

Network drivers

bullet

Sockets

bullet

Network driver methods

bullet

NAPI

 

What do we mean when we say “device driver”?

Fundamentally, a device driver implements the interface between a piece of peripheral hardware and the application. In a traditional unprotected, “flat” memory model system, a driver may be little more than a set of functions conforming to a well-defined API and statically linked into an executable image.

But in the context of a protected mode operating system such as Linux, device drivers take on added significance owing to the distinction between User space and Kernel space.  This 3-day hands-on seminar provides an introduction to the wonderful world of programming in Kernel space.  As such, it provides insights not only into device driver programming, but also into the philosophy and design strategies of the kernel itself.

Numerous programming exercises introduce the rich kernel API that offers a multitude of services to driver writers.  You’ll learn how Linux handles asynchronous I/O in a way that is totally transparent to applications.  You’ll examine the unique problems of debugging in Kernel space.  Perhaps most important, you’ll see how much of a device driver involves interactions with the kernel that have nothing to do with accessing physical hardware.

Back to Courses Page

 

Web Design by cactuslady@cactusweb.net - 2006
Copyright © 2000, 2006 Douglas Abbott