Skip to Content
Sun and Oracle
Channel Sun
How to Buy
Log In
Svenska
docs.sun.com Hem
>
Solaris 2.4 Driver Developer AnswerBook
> Writing Device Drivers
Writing Device Drivers
Sök endast i den här boken
Hjälp för sökning
Inom
Solaris 2.4 Driver Developer AnswerBook
Hitta mer dokumentation
Bläddra Titlar Dokumentation
Bläddra i Produktdokumentation
Supportresurser som ingår
Suns kurser
Systemportalen BigAdmin
Suns supportcenter
Sun Solve
Ladda ner denna bok i PDF (660 KB)
Writing Device Drivers
Cover
Credits
Contents
Figures
Tables
Preface
1 Overview of the SunOS Kernel
What is the Kernel?
Multithreading
Virtual Memory
Special Files
Dynamic Loading of Kernel Modules
Overview of the Solaris 2.x DDI/DKI
2 Hardware Overview
SPARC Processor Issues
x86 Processor Issues
System Memory Model
SPARC Memory Model
Bus Architectures
Bus Specifics
Device Issues
The PROM on SPARC Machines
Reading and Writing
3 Overview of SunOS Device Drivers
What is a Device Driver?
Types of Device Drivers
Device Issues
Driver Interfaces
Callback functions
Interrupt Handling
Driver Context
Printing Messages
Dynamic Memory Allocation
Software State Management
Properties
Driver Layout
The C Language and Compiler Modes
4 Multithreading
Threads
Multiprocessing Changes Since SunOS 4.x
Locking Primitives
Thread Synchronization
Choosing a Locking Scheme
5 Autoconfiguration
Overview
State Structure
Data Structures
Device Configuration
6 Interrupt Handlers
Overview
Types of Interrupts
Registering Interrupts
Responsibilities of an Interrupt Handler
State Structure
Handling High-Level Interrupts
7 DMA
The DMA Model
Types of Device DMA
DMA and DVMA
Handles, Windows, Segments and Cookies
DMA Operations
Cancelling DMA Callbacks
Synchronizing Memory Objects
Allocating Private DMA Buffers
8 Drivers for Character Devices
Entry Points
Autoconfiguration
Controlling Device Access
I/O Request Handling
Mapping Device Memory
Multiplexing I/O on File Descriptors
Miscellaneous I/O Control
9 Drivers for Block Devices
File I/O
State Structure
Entry Points
Autoconfiguration
Controlling Device Access
Data Transfers
Synchronous Data Transfers
Asynchronous Data Transfers
Miscellaneous Entry Points
10 SCSI Target Drivers
Overview
Reference Documents
Sun Common SCSI Architecture Overview
SCSA Functions
SCSA Compatibility Functions
SCSI Target Drivers
Building and Transporting a Command
11 Device Context Management
What Is A Device Context?
Context Management Model
Context Management Operation
12 Loading and Unloading Drivers
Preparing for Installation
Installing and Removing Drivers
Removing the Driver
Loading Drivers
Getting the Driver Module's ID
Unloading Drivers
13 Debugging
Machine Configuration
Coding Hints
Using Existing Drivers
Debugging Tools
Testing
A Converting a Device Driver to SunOS 5.4
Before Starting the Conversion
Development Environment
Overview of Changes
Conversion Notes
B Advanced Topics
Multithreading
Sun Disk Device Drivers
SCSA
C Summary of Solaris 2.4 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
Polling
Printing System Messages
Process Signaling
Properties
Register and Memory Mapping
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
Index
News Center
About Sun
Contact Sun
Terms of Use
Privacy
Copyright
1994-2009
Sun Microsystems, Inc.