Linux设备驱动程序 第3版PDF电子书下载
- 电子书积分:18 积分如何计算积分?
- 作 者:(美)科比特(Corbet,J.),(美)鲁宾尼(Rubini,A.),(美)哈特曼(Hartman,G.K.)著
- 出 版 社:南京:东南大学出版社
- 出版年份:2005
- ISBN:7810898531
- 页数:615 页
1.An Introduction to Device Drivers 1
The Role of the Device Driver 2
Splitting the Kernel 4
Classes of Devices and Modules 5
Security Issues 8
Version Numbering 10
License Terms 11
Joining the Kernel Development Community 12
Overview of the Book 12
2.Building and Running Modules 15
Setting Up Your Test System 15
The Hello World Module 16
Kernel Modules Versus Applications 18
Compiling and Loading 22
The Kernel Symbol Table 28
Preliminaries 30
Initialization and Shutdown 31
Module Parameters 35
Doing It in User Space 37
Quick Reference 39
3.Char Drivers 42
The Design of scull 42
Major and Minor Numbers 43
Some Important Data Structures 49
Char Device Registration 55
open and release 58
scull’s Memory Usage 60
read and write 63
Playing with the New Devices 70
Quick Reference 70
4.Debugging Techniques 73
Debugging Support in the Kernel 73
Debugging by Printing 75
Debugging by Querying 82
Debugging by Watching 91
Debugging System Faults 93
Debuggers and Related Tools 99
5.Concurrency and Race Conditions 106
Pitfalls in scull 107
Concurrency and Its Management 107
Semaphores and Mutexes 109
Completions 114
Spinlocks 116
Locking Traps 121
Alternatives to Locking 123
Quick Reference 130
6.Advanced Char Driver Operations 135
ioctl 135
Blocking I/O 147
poll and select 163
Asynchronous Notification 169
Seeking a Device 171
Access Control on a Device File 173
Quick Reference 179
7.Time,Delays,and Deferred Work 183
Measuring Time Lapses 183
Knowing the Current Time 188
Delaying Execution 190
Kernel Timers 196
Tasklets 202
Workqueues 205
Quick Reference 208
8.Allocating Memory 213
The Real Story of kmalloc 213
Lookaside Caches 217
get_free_page and Friends 221
vmalloc and Friends 224
Per-CPU Variables 228
Obtaining Large Buffers 230
Quick Reference 231
9.Communicating with Hardware 235
I/O Ports and I/O Memory 235
Using I/O Ports 239
An I/O Port Example 245
Using I/O Memory 248
Quick Reference 255
10.Interrupt Handling 258
Preparing the Parallel Port 259
Installing an Interrupt Handler 259
Implementing a Handler 269
Top and Bottom Halves 275
Interrupt Sharing 278
Interrupt-Driven I/O 281
Quick Reference 286
11.Data Types in the Kernel 288
Use of Standard C Types 288
Assigning an Explicit Size to Data Items 290
Interface-Specific Types 291
Other Portability Issues 292
Linked Lists 295
Quick Reference 299
12.PCIDrivers 302
The PCI Interface 302
A Look Back:ISA 319
PC/104 and PC/104+ 322
Other PC Buses 322
SBus 323
NuBus 324
External Buses 325
Quick Reference 325
13.USB Drivers 327
USB Device Basics 328
USB and Sysfs 333
USB Urbs 335
Writing a USB Driver 346
USB Transfers Without Urbs 356
Quick Reference 360
14.The Linux Device Model 362
Kobjects,Ksets,and Subsystems 364
Low-Level Sysfs Operations 371
Hotplug Event Generation 375
Buses,Devices,and Drivers 377
Classes 387
Putting It All Together 391
Hotplug 397
Dealing with Firmware 405
Quick Reference 407
15.Memory Mapping and DMA 412
Memory Management in Linux 412
The mmap Device Operation 422
Performing Direct I/O 435
Direct Memory Access 440
Quick Reference 459
16.Block Drivers 464
Registration 465
The Block Device Operations 471
Request Processing 474
Some Other Details 491
Quick Reference 494
17.Network Drivers 497
How snull Is Designed 498
Connecting to the Kernel 502
The net_device Structure in Detail 506
Opening and Closing 515
Packet Transmission 516
Packet Reception 521
The Interrupt Handler 523
Receive Interrupt Mitigation 525
Changes in Link State 528
The Socket Buffers 528
MAC Address Resolution 532
Custom ioctl Commands 535
Statistical Information 536
Multicast 537
A Few Other Details 540
Quick Reference 542
18.TTY Drivers 546
A Small TTY Driver 548
tty_driver Function Pointers 553
TTY Line Settings 560
ioctls 564
proc and sysfs Handling of TTY Devices 566
The tty_driver Structure in Detail 567
The tty_operations Structure in Detail 569
The tty_struct Structure in Detail 571
Quick Reference 573
Bibliography 575
Index 579
- 《程序逻辑及C语言编程》卢卫中,杨丽芳主编 2019
- 《高等学校“十三五”规划教材 C语言程序设计》翟玉峰责任编辑;(中国)李聪,曾志华,江伟 2019
- 《改革进程中的刑事诉讼程序与证据问题研究 基于警察的视角》谢波 2019
- 《Java程序设计基础》罗刚 2018
- 《C++程序设计实验指导 第2版》张潇责任编辑;孟桂娥 2019
- 《通用安装工程消耗量定额 TY02-31-2015 第4册 电气设备安装工程》中华人民共和国住房和城乡建设部 2015
- 《C程序设计教程 第3版》林小茶,陈昕 2018
- 《玉米淀粉绿色精益制造 新工艺、新设备、新理念》佟毅 2018
- 《Java语言程序设计教程》胡光 2018
- 《危险化学品设备安全》方文林主编 2019
- 《SQL与关系数据库理论》(美)戴特(C.J.Date) 2019
- 《魔法销售台词》(美)埃尔默·惠勒著 2019
- 《看漫画学钢琴 技巧 3》高宁译;(日)川崎美雪 2019
- 《优势谈判 15周年经典版》(美)罗杰·道森 2018
- 《社会学与人类生活 社会问题解析 第11版》(美)James M. Henslin(詹姆斯·M. 汉斯林) 2019
- 《海明威书信集:1917-1961 下》(美)海明威(Ernest Hemingway)著;潘小松译 2019
- 《反常识》张娟责任编辑;(美国)邓肯·J.瓦茨 2019
- 《迁徙 默温自选诗集 上》(美)W.S.默温著;伽禾译 2020
- 《上帝的孤独者 下 托马斯·沃尔夫短篇小说集》(美)托马斯·沃尔夫著;刘积源译 2017
- 《巴黎永远没个完》(美)海明威著 2017