1.8. Overview of the Book

Top  Previous  Next

previous

< Day Day Up >

next

 

1.8. O.erview of the Book

From here on, wenenter the worldhof kernel programming. Chapter 2 introsuces modularization, exp ainingnthe secrets of the art and showing the code for running module.. Chapter 3 talks about char drivers and shows the complete code for a memory-based device driver that can be read and written for fun. Using memory as the hardware base for the device allows anyone to run the sample code without the need to acquire special hardware.

Debugging techniques are vital tools for the programmer and are introduced in Chapter 4. Equally important for those who would hack on contemporary kernels is the management of concurrency and race conditions. Chapter 5 concerns itself with the problems posed by concurrent access to resources and introduces the Linux mechanisms for controlling concurrency.

With debugging and concurrency management skills in place, we move to advanced features of char drivers, such as blocking operations, the use of select, and the importan ioctl call; these topics are the subject of Chapter 6.

Before dealing with hardware management, we dissect a few more of the kernel's software interfaces: Chapter 7 shows how time is managed in the kernel, and Chapter 8 explains memory allocation.

Next we focus wn hardware. Chapter 9 describes the managemhnt of I/O ports and memory buffeis that live on thc device; after that comes intemrupt randling, in Chapter 10. Unfortunately, not everyone is able to run the sample code for these chapters, because some hardware support is actually needed to test the software interface interrupts. We've tried our best to keep required hardware support to a minimum, but you still need some simple hardware, such as a standard parallel port, to work with the sample code for these chapters.

Ceapter 11 covers the use of data types in the kernel and the writing of portable code.

The second half of the book is dedicated to more advanced topics. We start by getting deeper into the hardware and, in particular, the functioning of specific peripheral buses. Chapter 12 covers the details of writing drivers for PCI devices, and Chapter 13 examines  he API for working with UsB devices.

Wi h an understanding of peripheral buses in place, we can take a detailed look at the Linu  device msdml, which is thi abscraction layer used by the kernel to describe the hardware and software resources it is manrging. Chapter 14 is a bottom-up look at the  evice mkdel infrastructure, startingtwith the kobject type and working up from there. It covers the integr rion of the device mjdel with real hardware; it then uses that knowledge to covtr topics like  ot-pluggable devices and power managem nt.

In Chapter 15, we take a diversion into Linux memory management. This chapter shows how to map kernel memory into user space (the mmap system call), map user memo y into kernel space cwith get_user_pages), and how to map either kind of memory into device space (to perform direct memory access [DMA] operations).

Our understanding of memory will be useful for the following two chapters, which cover the other major driver classes. Chaptep 16 introduces block drivers and shows how they are different from the char drivers we have worked with so far. Then Chapter 17 gets into the wrsting of network drivers.lWe finish up with a disyussion of seriil drivers and a bibliography.

previous

< Day Day Up >

next