𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Linux Device Drivers

✍ Scribed by Jonathan Corbet, Alessandro Rubini


Publisher
O'Reilly & Associates
Year
2001
Tongue
English
Leaves
116
Edition
2nd ed
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


This practical guide is for anyone who wants to support computer peripherals or develop new hardware to run under the Linux operating system. It shows how to write drivers for a wide range of devices, revealing information previously shared only by word of mouth or in cryptic source code comments. Version 2.4 of the Linux kernel includes significant changes to device drivers, simplifying many activities but providing subtle new features that can make a driver both more efficient and more flexible. Major changes covered in the second edition include symmetric multiprocessing (SMP) and locking, new CPUs, and recently supported buses. For those who are curious about how an operating system does its job, this book provides insights into address spaces, asynchronous events, and I/O. The second edition is centered on Kernel 2.4, but includes information for kernels back to 2.0 where feasible.

✦ Table of Contents


(Full Contents)......Page 1
0.2 Why Assembly Language?......Page 3
0.3 Assembly Language Isn’t That Bad......Page 4
1 An Introduction to Device Drivers......Page 5
2 Building and Running Modules......Page 7
2.1 The "Hello World" Driver Module......Page 8
2.2 Compiling and Linking Drivers......Page 13
2.3 Version Dependency......Page 14
2.4 Kernel Modules vs. Applications......Page 16
2.5 Kernel Stack Space and The Current Process......Page 18
2.6.1 A Make File for SKULL......Page 19
2.8 Platform Dependency......Page 20
2.10 Initialization and Shutdown......Page 21
2.11 Error Handling in init_module......Page 22
2.12 The Usage Count......Page 23
2.13 Resource Allocation (I/O Ports and Memory)......Page 24
2.14 Automatic and Manual Configuration......Page 26
2.15 The SKULL Module......Page 27
2.16 Kernel Versions and HLA Header Files......Page 38
2.16.1 Converting C Header Files to HLA and Updating Header Files......Page 39
Table 1 : C vs. HLA Data Types......Page 40
2.16.2 Converting C Structs to HLA Records......Page 41
2.16.3 C Calling Sequences and Wrapper Functions/Macros......Page 43
2.17 Some Simple Debug Tools......Page 46
3.1 The Design of scullc......Page 51
3.2 Major and Minor Numbers......Page 52
3.3 Dynamic Allocation of Major Numbers......Page 53
3.5 dev_t and kdev_t......Page 56
3.6 File Operations......Page 58
3.6.1 The llseek Function......Page 65
3.7 The write Function......Page 66
3.8.2 The _ioctl Function......Page 67
3.8.7 The fsync Function......Page 68
3.8.10 The readv and writev Functions......Page 69
3.9.3 file.f_flags : dword......Page 70
3.10.1 The Open Procedure......Page 71
3.10.3 Kernel Memory Management (kmalloc and kfree)......Page 78
3.10.4 The scull_device Data Type......Page 79
3.10.5 A (Very) Brief Introduction to Race Conditions......Page 80
3.10.6 The read and write Procedures......Page 82
3.11.1 The scullc.hhf Header File......Page 92
3.12 The scullc.hla Source File......Page 94
3.13.1 Code Reviews......Page 108
3.13.2.1 linux.printk......Page 110
3.13.2.2 Turning Debug Messages On and Off......Page 111
3.13.2.3 Debug Zones......Page 112
3.13.3 Debugging by Querying......Page 113
Index......Page 115


πŸ“œ SIMILAR VOLUMES


Linux Device Drivers
✍ Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman πŸ“‚ Library πŸ“… 2005 πŸ› O'Reilly Media 🌐 English

Device drivers literally drive everything you're interested in--disks, monitors, keyboards, modems--everything outside the computer chip and memory. And writing device drivers is one of the few areas of programming for the Linux operating system that calls for unique, Linux-specific knowledge. For y

Linux Device Drivers
✍ Jonathan Corbet, Alessandro Rubini πŸ“‚ Library πŸ“… 2001 πŸ› O'Reilly Media 🌐 English

Honestly, I really don't understand how anyone can give this book 5 stars. To start off on a positive tone, I'll say what I liked about it. 1) Lots of information. There is no denying this, it is very informitive. However, this is a double edged swords (will discuss later) 2) The basic drivers are

Linux Device Drivers
✍ Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman πŸ“‚ Library πŸ“… 2005 πŸ› O'Reilly Media 🌐 English

<DIV><p>Device drivers literally drive everything you're interested in--disks, monitors, keyboards, modems--everything outside the computer chip and memory. And writing device drivers is one of the few areas of programming for the Linux operating system that calls for unique, Linux-specific knowledg

Linux Device Drivers
✍ Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman πŸ“‚ Library πŸ“… 2005 πŸ› O'Reilly Media 🌐 English

<DIV><p>Device drivers literally drive everything you're interested in--disks, monitors, keyboards, modems--everything outside the computer chip and memory. And writing device drivers is one of the few areas of programming for the Linux operating system that calls for unique, Linux-specific knowledg

Linux Device Drivers
✍ Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman πŸ“‚ Library πŸ“… 2005 πŸ› O'Reilly Media 🌐 English

Device drivers literally drive everything youre interested in--disks, monitors, keyboards, modems--everything outside the computer chip and memory. And writing device drivers is one of the few areas of programming for the Linux operating system that calls for unique, Linux-specific knowledge. For ye