Skip to Content
Sun and Oracle
Channel Sun
How to Buy
Log In
简体中文
docs.sun.com 主页
>
Solaris 2.6 Driver Developer AnswerBook
> Writing Device Drivers
Writing Device Drivers
只搜寻这本书
搜索帮助
包含在
Solaris 2.6 Driver Developer AnswerBook
Driver Developer Site 1.0 AnswerBook
查找更多文档
浏览文档标题
浏览产品文档
专项支持资源
Sun 培训课程
BigAdmin 系统管理门户
Sun 支持中心
Sun Solve
以 PDF 格式下载本书 (902 KB)
Writing Device Drivers
Cover
Credits
Contents
Figures
Preface
1 SunOS Kernel and Device Tree
What Is the Kernel?
Overview of the Solaris 2.x DDI/DKI
Device Tree
2 Hardware Overview
SPARC Processor Issues
x86 Processor Issues
Store Buffers
System Memory Model
Bus Architectures
Bus Specifics
Device Issues
PROM on SPARC Machines
3 Overview of SunOS Device Drivers
What Is a Device Driver?
Types of Device Drivers
Bus Address Spaces
Driver Interfaces
Callback Functions
Interrupt Handling
Driver Context
Printing Messages
Dynamic Memory Allocation
Software State Management
Properties
Driver Layout
64-Bit-Safe Device Drivers
C Language and Compiler Modes
4 Multithreading
Threads
Multiprocessing Changes Since the SunOS 4.x System
Locking Primitives
Thread Synchronization
Choosing a Locking Scheme
5 Autoconfiguration
Autoconfiguration Overview
Additions to State Structure
Driver Loading and Configuration
Data Structures
Loadable Driver Interface
Device Configuration
6 Interrupt Handlers
Interrupt Handler Overview
Types of Interrupts
Registering Interrupts
Responsibilities of an Interrupt Handler
State Structure
Handling High-Level Interrupts
7 DMA
DMA Model
Types of Device DMA
DMA and DVMA
Handles, Windows, and Cookies
DMA Operations
Canceling DMA Callbacks
Synchronizing Memory Objects
DMA Windows
Allocating Private DMA Buffers
8 Power Management
Power Management Overview
Power Management Additions to the State Structure
Device Power Management Model
System Power Management Model
Power Management Flow of Control
9 Drivers for Character Devices
Character Driver Structure Overview
Entry Points
Autoconfiguration
Controlling Device Access
I/O Request Handling
Mapping Device Memory
Multiplexing I/O on File Descriptors
Miscellaneous I/O Control
10 Drivers for Block Devices
Block Driver Structure Overview
File I/O
State Structure
Entry Points
Autoconfiguration
Controlling Device Access
Data Transfers
Synchronous Data Transfers
Asynchronous Data Transfers
Miscellaneous Entry Points
11 Mapping Device or Kernel Memory
Memory Mapping Operations
Exporting the Mapping
12 Device Context Management
What Is a Device Context?
Context Management Model
Context Management Operation
13 SCSI Target Drivers
SCSI Target Driver Overview
Reference Documents
Sun Common SCSI Architecture Overview
SCSA Functions
SCSA Compatibility Functions
SCSI Target Drivers
Building and Transporting a Command
14 SCSI Host Bus Adapter Drivers
SCSI HBA Driver Overview
SCSA HBA Interfaces
HBA Driver Dependency and Configuration Issues
SCSA HBA Entry Points
Driver Installation
15 Loading and Unloading Drivers
Preparing for Installation
Installing and Removing Drivers
Removing the Driver
Loading Drivers
Getting the Driver Module's ID
Unloading Drivers
16 Debugging
Machine Configuration
Coding Hints
Debugging Tools
Testing
A 5.6
Before Starting the Conversion
Development Environment
Summary of Changes
Conversion Notes
B Interface Transition List
Data Access Methods
Device Memory Mapping
C Summary of Solaris 2.6 DDI/DKI Services
buf (9S) Handling
Copying Data
Device Access
Device Configuration
Device Information
DMA Handling
Flow of Control
Interrupt Handling
Kernel Statistics
Memory Allocation
Mermory Space Access
Common Device Access Functions
Polling
Power Management
Printing System Messages
Process Signaling
Properties
Register and Memory Mapping
Device Context Management
PCI Configuration
I/O Port Access
SCSI and SCSA
Soft State Management
String Manipulation
System Information
Thread Synchronization
Timing
uio (9S) Handling
Utility Functions
D Sample Driver Source Code Listings
E Driver Code Layout Structure
Header Files
xx.c Files
driver .conf Files
F Making a Device Driver 64-Bit Ready
How 64-Bit Drivers Differ From 32-Bit Drivers
General Conversion Steps
G Advanced Topics
Multithreading
Sun Disk Device Drivers
SCSA
Index
News Center
About Sun
Contact Sun
Terms of Use
Privacy
Copyright
1994-2009
Sun Microsystems, Inc.