IRIX® 6.3 for O2 Device Driver Programming Guide

Document Number: 007-3443-002

Front Matter

| List of Figures | List of Examples | List of Tables |


Table of Contents

About This Guide
What You Need to Know
What This Guide Contains
Other Sources of Information
Conventions Used in This Guide

I. IRIX Device Integration

1. Physical and Virtual Memory
Physical Address Space
CPU Access to Memory and Devices
The 32-Bit Address Space
The 64-Bit Address Space
Device Driver Use of Memory

2. Device Configuration
Hardware Inventory
Device Special Files
Configuration Files

3. Device Control Software
User-Level Device Control
Kernel-Level Device Control

II. Device Control From Process Space

4. User-Level Access to Devices
VME Programmed I/O
EISA Programmed I/O
VME User-Level DMA
PCI Programmed I/O

5. User-Level Access to SCSI Devices
Overview of the dsreq Driver
Generic SCSI Device Special Files
The dsreq Structure
Testing the Driver Configuration
Using the Special DS_RESET and DS_ABORT Calls
Using dslib Functions
Example dslib Program

6. Control of External Interrupts
External Interrupts in Challenge and Onyx Systems

7. User-Level Interrupts
Overview of ULI
Setting Up
Sample Program

III. Kernel-Level Drivers

8. Structure of a Kernel-Level Driver
Summary of Driver Structure
Driver Flag Constant
Initialization Entry Points
Open and Close Entry Points
Control Entry Point
Data Transfer Entry Points
Poll Entry Point
Memory Map Entry Points
Interrupt Entry Point
Support Entry Points
Handling 32-Bit and 64-Bit Execution Models
Planning for Multiprocessor Use

9. Device Driver/Kernel Interface
Important Data Types
Important Header Files
Memory Allocation
Transferring Data
Managing Virtual and Physical Addresses
User Process Administration
Waiting and Mutual Exclusion

10. Building and Installing a Driver
Defining Device Numbers
Defining Device Special Files
Compiling and Linking
Configuring a Nonloadable Driver
Configuring a Loadable Driver
Configuring for a Dynamic Major Number

11. Testing and Debugging a Driver
Preparing the System for Debugging
Producing Diagnostic Displays
Using symmon
Using idbg
Using icrash

12. Driver Example
Installing the Example Driver
Example Driver Source Files

IV. SCSI Device Drivers

13. SCSI Device Drivers
SCSI Support in Silicon Graphics Systems
Host Adapter Facilities
Designing a SCSI Driver
Example SCSI Device Driver
Designing a Host Adapter Driver
SCSI Reference Data

V. Network Drivers

14. Network Device Drivers
Overview of Network Drivers
Network Driver Interfaces
Multiprocessor Considerations
Example ifnet Driver

VI. PCI Drivers

15. PCI Device Drivers
PCI Bus in Silicon Graphics Workstations
PCI Implementation in O2 Workstations
Driver/Kernel Interface for PCI Access
Example Driver

VII. STREAMS Drivers

16. STREAMS Drivers
Driver Exported Names
Building and Debugging
Special Considerations for Multiprocessing
Special Considerations for IRIX
Summary of Standard STREAMS Functions
STREAMS Modules for X Input Devices

A. Silicon Graphics Driver/Kernel API
Driver Exported Names
Kernel Data Structures and Declarations
Kernel Functions

B. New and Updated Reference Pages
Address/Length List Reference Pages
PCI Infrastructure Reference Pages

Glossary

Index