Skip to Content
Sun and Oracle
Channel Sun
How to Buy
Log In
English
docs.sun.com Home
>
Solaris 9 9/04 Software Developer Collection
> Writing Device Drivers
Writing Device Drivers
Search only this book
Search Help
Contained Within
Solaris 9 9/04 Software Developer Collection
Solaris 9 4/04 Software Developer Collection
Solaris 9 12/03 Software Developer Collection
Solaris 9 8/03 Software Developer Collection
Solaris 9 4/03 Software Developer Collection
Solaris 9 12/02 Software Developer Collection
Solaris 9 Software Developer Collection
Solaris 9 Software Developer Collection
Find More Documentation
Browse Documentation Titles
Browse Product Documentation
Featured Support Resources
Sun Training Courses
BigAdmin System Admininstration Portal
Sun Support Center
Sun Solve
Download this book in PDF (1363 KB)
Writing Device Drivers
Index
Numbers and Symbols
A
B
C
D
E
F
G
H
I
K
L
M
N
O
P
Q
R
S
T
U
V
W
Book Information
Preface
Who Should Use This Book
How This Book Is Organized
Related Books and Papers
Accessing Sun Documentation Online
Typographic Conventions
Shell Prompts in Command Examples
1. Solaris Kernel and Device Tree
What Is the Kernel?
Overview of the Device Tree
2. Overview of Solaris Device Drivers
What Is a Device Driver?
Types of Device Drivers
Driver Module Entry Points
Device Driver Design Considerations
3. Multithreading
Locking Primitives
Thread Synchronization
Choosing a Locking Scheme
4. Properties and Events
Device Properties
Events
Kernel Statistics
5. Driver Autoconfiguration
Driver Loading and Unloading
Data Structures Required for Drivers
Loadable Driver Interfaces
Device Configuration Concepts
Using Device IDs
6. Device Access — Programmed I/O
Device Memory
Device Access Functions
7. Interrupt Handlers
Interrupt Handler Overview
Device Interrupts
Registering Interrupts
Interrupt Handler Responsibilities
Handling High-Level Interrupts
8. Direct Memory Access (DMA)
DMA Model
Types of Device DMA
Types of Host Platform DMA
DMA Software Components: Handles, Windows, and Cookies
DMA Operations
Managing DMA Resources
DMA Windows
9. Power Management
Power Management Framework
Device Power Management Model
System Power Management Model
Power Management Device Access Example
Power Management Flow of Control
Changes to Power Management Interfaces
10. Drivers for Character Devices
Character Driver Structure Overview
Character Device Autoconfiguration
Device Access (Character Drivers)
I/O Request Handling
Mapping Device Memory
Multiplexing I/O on File Descriptors
Miscellaneous I/O Control
32–bit and 64–bit Data Structure Macros
11. Drivers for Block Devices
Block Driver Structure Overview
File I/O
Block Device Autoconfiguration
Controlling Device Access
Synchronous Data Transfers (Block Drivers)
Asynchronous Data Transfers (Block Drivers)
Miscellaneous Entry Points
Disk Device Drivers
12. Mapping Device and Kernel Memory
Memory Mapping Operation Overview
Exporting the Mapping
Associating Device Memory With User Mappings
Associating Kernel Memory With User Mappings
13. Device Context Management
Introduction to Device Context
Context Management Operation
14. SCSI Target Drivers
Introduction to Target Drivers
Sun Common SCSI Architecture Overview
Hardware Configuration File
Declarations and Data Structures
Autoconfiguration for SCSI Target Drivers
Resource Allocation
Building and Transporting a Command
SCSI Options
15. SCSI Host Bus Adapter Drivers
Introduction to Host Bus Adapter Drivers
SCSI Interface
SCSA HBA Interfaces
HBA Driver Dependency and Configuration Issues
SCSA HBA Entry Points
SCSI HBA Driver Specific Issues
Support for Queuing
16. Drivers for Network Devices
Generic LAN Driver Overview
Declarations and Data Structures
GLD Arguments
GLD Entry Points
GLD Service Routines
17. Compiling, Loading, Packaging, and Testing Drivers
Driver Code Layout Structure
Preparing for Driver Installation
Installing, Updating, and Removing Drivers
Loading and Unloading Drivers
Driver Packaging
Testing Drivers
18. Debugging
Machine Configuration
Runtime Debugging Tools
The kadb Kernel Debugger
Post-Mortem Debugging
19. Recommended Coding Practices
Debugging
Defensive Programming
Declaring a Variable Volatile
Serviceability
A. Hardware Overview
SPARC Processor Issues
IA Processor Issues
Endianness
Store Buffers
System Memory Model
Bus Architectures
Bus Specifics
Device Issues
PROM on SPARC Machines
B. Summary of Solaris 9 DDI/DKI Services
Introduction
C. Making a Device Driver 64-Bit Ready
Introduction to 64–Bit Driver Design
General Conversion Steps
Well-known ioctl Interfaces
News Center
About Sun
Contact Sun
Terms of Use
Privacy
Copyright
1994-2009
Sun Microsystems, Inc.