Linux Device Drivers, 3/e (Paperback)
暫譯: Linux 裝置驅動程式, 第三版 (平裝本)
Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman
- 出版商: O'Reilly
- 出版日期: 2005-03-15
- 定價: $1,980
- 售價: 9.5 折 $1,881
- 語言: 英文
- 頁數: 640
- 裝訂: Paperback
- ISBN: 0596005903
- ISBN-13: 9780596005900
-
相關分類:
Linux
-
相關翻譯:
Linux 驅動程式, 3/e (Linux Device Drivers, 3/e) (繁中版)
立即出貨
買這商品的人也買了...
-
$590$466 -
$560$476 -
$2,380$2,261 -
$480$379 -
$750$593 -
$780$616 -
$490$382 -
$780$616 -
$650$553 -
$650$507 -
$580$452 -
$620$527 -
$880$748 -
$680$646 -
$880$695 -
$880$695 -
$2,340Understanding the Linux Kernel, 3/e (Paperback)
-
$780$663 -
$650$507 -
$550$468 -
$980$774 -
$720$569 -
$990$891 -
$600$480 -
$2,020$1,919
相關主題
商品描述
Description:
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 years now, programmers have relied on the classic Linux Device Drivers from O'Reilly to master this critical subject. Now in its third edition, this bestselling guide provides all the information you'll need to write drivers for a wide range of devices.
Over the years the book has helped countless programmers learn:
- how to support computer peripherals under the Linux operating system
- how to develop and write software for new hardware under Linux
- the basics of Linux operation even if they are not expecting to write a driver
The new edition of Linux Device Drivers is better than ever. The book covers all the significant changes to Version 2.6 of the Linux kernel, which simplifies many activities, and contains subtle new features that can make a driver both more efficient and more flexible. Readers will find new chapters on important types of drivers not covered previously, such as consoles, USB drivers, and more.
Best of all, you don't have to be a kernel hacker to understand and enjoy this book. All you need is an understanding of the C programming language and some background in Unix system calls. And for maximum ease-of-use, the book uses full-featured examples that you can compile and run without special hardware.
Today Linux holds fast as the most rapidly growing segment of the computer market and continues to win over enthusiastic adherents in many application areas. With this increasing support, Linux is now absolutely mainstream, and viewed as a solid platform for embedded systems. If you're writing device drivers, you'll want this book. In fact, you'll wonder how drivers are ever written without it.
Table of Contents:
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 Book2. 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
Quick Reference3. Char Drivers
The Design of scull
Major and Minor Numbers
Some Important Data Structures
Char Device Registration
open and release
scull's Memory Usage
read and write
Playing with the New Devices
Quick Reference4. Debugging Techniques
Debugging Support in the Kernel
Debugging by Printing
Debugging by Querying
Debugging by Watching
Debugging System Faults
Debuggers and Related Tools5. Concurrency and Race Conditions
Pitfalls in scull
Concurrency and Its Management
Semaphores and Mutexes
Completions
Spinlocks
Locking Traps
Alternatives to Locking
Quick Reference6. Advanced Char Driver Operations
ioctl
Blocking I/O
poll and select
Asynchronous Notification
Seeking a Device
Access Control on a Device File
Quick Reference7. Time, Delays, and Deferred Work
Measuring Time Lapses
Knowing the Current Time
Delaying Execution
Kernel Timers
Tasklets
Workqueues
Quick Reference8. Allocating Memory
The Real Story of kmalloc
Lookaside Caches
get_free_page and Friends
vmalloc and Friends
Per-CPU Variables
Obtaining Large Buffers
Quick Reference9. Communicating with Hardware
I/O Ports and I/O Memory
Using I/O Ports
An I/O Port Example
Using I/O Memory
Quick Reference10. Interrupt Handling
Preparing the Parallel Port
Installing an Interrupt Handler
Implementing a Handler
Top and Bottom Halves
Interrupt Sharing
Interrupt-Driven I/O
Quick Reference11. 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
Quick Reference12. PCI Drivers
The PCI Interface
A Look Back: ISA
PC/104 and PC/104+
Other PC Buses
SBus
NuBus
External Buses
Quick Reference13. USB Drivers
USB Device Basics
USB and Sysfs
USB Urbs
Writing a USB Driver
USB Transfers Without Urbs
Quick Reference14. The Linux Device Model
Kobjects, Ksets, and Subsystems
Low-Level Sysfs Operations
Hotplug Event Generation
Buses, Devices, and Drivers
Classes
Putting It All Together
Hotplug
Dealing with Firmware
Quick Reference15. Memory Mapping and DMA
Memory Management in Linux
The mmap Device Operation
Performing Direct I/O
Direct Memory Access
Quick Reference16. Block Drivers
Registration
The Block Device Operations
Request Processing
Some Other Details
Quick Reference17. Network Drivers
How snull Is Designed
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
Quick Reference18. 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_operations Structure in Detail
The tty_struct Structure in Detail
Quick ReferenceBibliography
Index
商品描述(中文翻譯)
描述:
設備驅動程式實際上驅動著您所關心的一切——磁碟、顯示器、鍵盤、調製解調器——所有在計算機晶片和記憶體之外的東西。而撰寫設備驅動程式是 Linux 作業系統中少數幾個需要獨特、特定於 Linux 知識的程式設計領域之一。多年來,程式設計師依賴 O'Reilly 的經典書籍《Linux Device Drivers》來掌握這一關鍵主題。現在,這本暢銷指南已經進入第三版,提供了撰寫各種設備驅動程式所需的所有資訊。
多年來,這本書幫助無數程式設計師學會:
- 如何在 Linux 作業系統下支援計算機周邊設備
- 如何在 Linux 下為新硬體開發和撰寫軟體
- 即使不打算撰寫驅動程式,也能了解 Linux 操作的基本知識
新版的《Linux Device Drivers》比以往更好。這本書涵蓋了 Linux 核心 2.6 版本的所有重大變更,簡化了許多活動,並包含微妙的新特性,使驅動程式更高效且更靈活。讀者將會發現有關先前未涵蓋的重要類型驅動程式的新章節,例如控制台、USB 驅動程式等。
最重要的是,您不必成為核心駭客就能理解和享受這本書。您只需要了解 C 程式語言和一些 Unix 系統呼叫的背景知識。為了最大限度地提高易用性,這本書使用了完整功能的範例,您可以在不需要特殊硬體的情況下編譯和運行。
如今,Linux 在計算機市場中仍然是增長最快的部分,並在許多應用領域中持續贏得熱情的支持者。隨著這種支持的增加,Linux 現在絕對是主流,被視為嵌入式系統的穩固平台。如果您正在撰寫設備驅動程式,您會想要這本書。事實上,您會想知道在沒有這本書的情況下,驅動程式是如何撰寫的。
目錄:
前言
1. 設備驅動程式簡介
- 設備驅動程式的角色
- 分割核心
- 設備和模組的類別
- 安全問題
- 版本編號
- 授權條款
- 加入核心開發社群
- 本書概述
2. 建立和運行模組
- 設定測試系統
- Hello World 模組
- 核心模組與應用程式
- 編譯和加載
- 核心符號表
- 預備知識
- 初始化和關閉
- 模組參數
- 在用戶空間中執行
- 快速參考
3. 字元驅動程式
- scull 的設計
- 主號和次號
- 一些重要的資料結構
- 字元設備註冊
- open 和 release
- scull 的記憶體使用
- read 和 write
- 與新設備互動
- 快速參考
4. 除錯技術
- 核心中的除錯支援
- 通過打印進行除錯
- 通過查詢進行除錯
- 通過觀察進行除錯
- 除錯系統故障
- 除錯器和相關工具
5. 同步與競爭條件
- scull 中的陷阱
- 同步及其管理
- 信號量和互斥鎖
- 完成
- 自旋鎖
- 鎖定陷阱
- 鎖定的替代方案
- 快速參考
6. 進階字元驅動程式操作
- ioctl
- 阻塞 I/O
- poll 和 select
- 非同步通知
- 尋找設備
- 設備檔案的存取控制
- 快速參考
7. 時間、延遲和延遲工作
- 測量時間間隔
- 知道當前時間
- 延遲執行
- 核心計時器
- 任務
- 工作隊列
- 快速參考
8. 記憶體分配
- kmalloc 的真實故事
- 旁路快取
- get_free_page 和朋友
- vmalloc 和朋友
- 每 CPU 變數
- 獲取大型緩衝區
- 快速參考
9. 與硬體通信
- I/O 埠和 I/O 記憶體
- 使用 I/O 埠
- I/O 埠範例
- 使用 I/O 記憶體
- 快速參考
10. 中斷處理
- 準備平行埠
- 安裝中斷處理器
- 實現處理器
- 上半部和下半部
- 中斷共享
- 中斷驅動的 I/O
- 快速參考
11. 核心中的資料類型
- 使用標準 C 類型
- 為資料項分配明確大小
- 介面特定類型
- 其他可攜性問題
- 鏈結串列
- 快速參考
12. PCI 驅動程式
- PCI 介面
- 回顧:ISA
- PC/104 和 PC/104+
- 其他 PC 總線
- SBus
- NuBus
- 外部總線
- 快速參考
13. USB 驅動程式
- USB 設備基礎
- USB 和 Sysfs
- USB Urbs
- 撰寫 USB 驅動程式
- 無 Urbs 的 USB 傳輸
- 快速參考
14. Linux 設備模型
- Kobjects、Ksets 和子系統
- 低級 Sysfs 操作
- 熱插拔事件生成
- 總線、設備和驅動程式
- 類別
- 整合所有內容
- 熱插拔
- 處理韌體
- 快速參考
15. 記憶體映射和 DMA
- Linux 中的記憶體管理
- mmap 設備操作
- 執行直接 I/O
- 直接記憶體存取
- 快速參考
16. 區塊驅動程式
- 註冊
- 區塊設備操作
- 請求處理
- 其他一些細節
- 快速參考
17. 網路驅動程式
- snull 的設計
- 連接到核心
- net_device 結構詳細說明
- 開啟和關閉
- 封包傳輸
- 封包接收
- 中斷處理器
- 接收中斷緩解
- 連結狀態變更
- 套接字緩衝區
- MAC 地址解析
- 自訂 ioctl 命令
- 統計資訊
- 多播
- 其他一些細節
- 快速參考
18. TTY 驅動程式
- 一個小型 TTY 驅動程式
- tty_driver 函數指標
- TTY 行設定
- ioctls
- proc 和 sysfs 處理 TTY 設備
- tty_driver 結構詳細說明
- tty_operations 結構詳細說明