作者:
Jonathan Corbet,Alessandro Rubini,Greg Kroah-Hartman著著
|
Jonathan Corbet,Alessandro Rubini,Greg Kroah-Hartman著编
|
Jonathan Corbet,Alessandro Rubini,Greg Kroah-Hartman著译
|
Jonathan Corbet,Alessandro Rubini,Greg Kroah-Hartman著绘
Preface 1. An Introduction to Device Drivers The Role of the Device Driver Splitting the Kernel Classes of Devices and Modules Security Issues Version Numbering License Terms Joining the Kernel Development Community Overview of the Book 2. Building and Running Modules Setting Up Your Test System The Hello World Module Kernel Modules Versus Applications Compiling and Loading The Kernel Symbol Table Preliminaries Initialization and Shutdown Module Parameters Doing It in User Space ick Reference 3. Char Drivers The Design of scull Major and Minor Numbers Some Important Data Structures Char Device Registration open and release sculls Memory Usage read and write Playing with the New Devices ick Reference 4. Debugging Techniques Debugging Support in the Kernel Debugging by Printing Debugging by erying Debugging by Watching Debugging System Faults Debuggers and Related Tools 5. Concurrency and Race Conditions Pitfalls in scull Concurrency and Its Management Semaphores and Mutexes Comlios Spinlocks Locking Traps Alternatives to Locking ick Reference 6. Advanced Char Driver Oraios ioctl Blocking I/O poll and select Asynchronous Notification Seeking a Device Access Control on a Device File ick Reference 7. Time, Delays, and Deferred Work Measuring Time Lapses Knowing the Current Time Delaying Execution Kernel Timers Tasklets Workqueues ick Reference 8. Allocating Memory The Real Story of kmalloc Lookaside Caches get_flee_page and Friends vmalloc and Friends Per-CPU Variables Obtaining Large Buffers ick Reference 9. Communicating with Hardware I/O Ports and I/O Memory Using I/O Ports An I/O Port Example Using I/O Memory ick Reference 10. Interrupt Handling Preparing the Parallel Port Installing an Interrupt Handler Implementing a Handler Top and Bottom Halves Interrupt Sharing Interrupt-Driven I/O ick Reference 11. Data Types in the Kernel Use of Standard C Types Assigning an Explicit Size to Data Items Interface-Specific Types Other Portability Issues Linked Lists ick Reference 12. PCl Drivers The PCI Interface A LookBackl. ISA PC/104 and PC/104+ Other PC Buses SBus NuBus External Buses ick Reference 13. USB Drivers USB Device Basics USB and Sysfs USB Urbs Writing a USB Driver USB Transfers Without Urbs ick Reference 14. The Linux Device Model Kobjects, Ksets, and Subsystems Low-Level Sysfs Oraios Hotplug Event Generation Buses, Devices, and Drivers Classes Putting It All Together Hotplug Dealing with Firmware ick Reference 15. Memory Mapping and DMA Memory Management in Linux The mmap Device Oraio Performing Direct I/O Direct Memory Access ick Reference 16. Block Drivers Registration The Block Device Oraios Requesrcesing Some Other Details ick Reference 17. Network Drivers How snull s esigned Connecting to the Kernel The net_device Structure in Detail Opening and Closing Packet Transmission Packet Reception The Interrupt Handler Receive Interrupt Mitigation Changes in Link State The Socket Buffers MAC Address Resolution Custom ioctl Commands Statistical Information Multicast A Few Other Details ick Reference 18. TTY Drivers A Small TTY Driver tty_driver Function Pointers TTY Line Settings ioctls proc and sysfs Handling of TTY Devices The tty_driver Structure in Detail The tty_oraios Structure in Detail The tty_struct Structure in Detail ick Reference Bibliography Index
乔纳森?科比特(Jonathan Corbet),got his first look at the BSD Unix source back in 1981, when an instructor at the University of Colorado let him "fix" the paging algorithm. He has been digging around inside every system he could get his hands on ever since,working on drivers for VAX, Sun, Ardent, and x86 systems. He got his first Linux system in 1993 and has never looked back. Jonathan is currently the cofounder and executive editor of Linux Weekly News "(http://www.LWN.net). He lives in Boulder,Colorado with his wife and two children.