[Index]


Table of Contents


Title and Copyright Pages

About This Book
Audience
New and Changed Features
Chapter 2: TURBOchannel Architecture
Chapter 4: Data Structures That TURBOchannel Device Drivers Use
Chapter 5: Kernel Interfaces That TURBOchannel Device Drivers Use
Chapter 7: TURBOchannel Device Driver Configuration
Appendix C: Summary Tables
Scope of the Book
Organization
Related Documentation
Hardware Documentation
Bus-Specific Device Driver Documentation
Operating System Overview Documentation
Programming Tools Documentation
System Management Documentation
Porting Documentation
Reference Pages
Reader's Comments
Conventions

1    Review of Device Driver Concepts
1.1    Gathering Information
1.2    Designing a Device Driver
1.3    Allocating Data Structures
1.4    Writing Portable Device Drivers
1.5    Reviewing the Device Driver Kits Delivery Process
1.6    Identifying the Method for Registering Device Interrupt Handlers

2    TURBOchannel Architecture
2.1    Writes to the Hardware Device Register
2.2    Direct Memory Access-to-Host Memory Transfers

3    Structure of a TURBOchannel Device Driver
3.1    Include Files Section
3.2    Autoconfiguration Support Section
3.2.1    Setting Up the probe Interface
3.2.2    Setting Up the slave Interface

4    Data Structures That TURBOchannel Device Drivers Use
4.1    The tc_memerr_status Data Structure

5    Kernel Interfaces That TURBOchannel Device Drivers Use
5.1    Determining the Name of an Option Module
5.2    Determining a Device's Base Address
5.3    Isolating and Handling Memory Errors
5.4    Ensuring a Write to I/O Space Has Completed
5.5    Using Scatter-Gather Maps

6    TURBOchannel Device Driver Example
6.1    Overview of the /dev/cb Device Driver
6.2    The cbreg.h Header File
6.3    Include Files Section
6.4    Autoconfiguration Support Declarations and Definitions Section
6.5    Configuration Support Declarations and Definitions Section
6.6    Local Structure and Variable Definitions Section
6.7    Autoconfiguration Support Section
6.7.1    Implementing the cbprobe Interface
6.7.2    Implementing the cbattach Interface
6.7.3    Implementing the cb_ctlr_unattach Interface
6.8    Configuration Section
6.8.1    Setting Up the cb_configure Interface
6.8.2    Configuring the /dev/cb Device Driver
6.8.3    Configuring the Driver into the System
6.8.4    Registering the Configuration Callback Routine
6.8.5    Registering the Driver's Major Number
6.8.6    Registering the Major Number Callback Routine
6.8.7    Unconfiguring the /dev/cb Device Driver
6.8.8    Performing Other Configuration Operations
6.9    Open and Close Device Section
6.9.1    Implementing the cbopen Interface
6.9.2    Implementing the cbclose Interface
6.10    Read and Write Device Section
6.10.1    Implementing the cbread Interface
6.10.2    Implementing the cbwrite Interface
6.11    Strategy Section
6.11.1    Setting Up the cbminphys Interface
6.11.2    Setting Up the cbstrategy Interface
6.11.2.1    Initializing the buf Structure for Transfer
6.11.2.2    Testing the Low-Order Two Bits and Using the Internal Buffer
6.11.2.3    Converting the Buffer Virtual Address
6.11.2.4    Converting the 32-Bit Physical Address
6.11.2.5    Starting I/O and Checking for Timeouts
6.12    Start Section
6.13    The ioctl Section
6.13.1    Setting Up the cbioctl Interface
6.13.2    Incrementing the Lights
6.13.3    Setting the I/O Mode
6.13.4    Performing an Interrupt Test
6.13.5    Returning a ROM Word, Updating the CSR, and Stopping Increment of the Lights
6.14    Increment LED Section
6.15    Interrupt Section

7    TURBOchannel Device Driver Configuration

A    TURBOchannel-Specific Reference Information
A.1    Conventions for Reference Pages
A.1.1    Conventions for Header File
A.1.2    Conventions for Kernel Interfaces
A.1.3    Conventions for Data Structure
A.1.4    Conventions for Device Driver Interfaces
A.2    Header File
tc.h
A.3    Kernel Interfaces
tc_addr_to_name
tc_isolate_memerr
tc_module_name
tc_option_control
A.4    Data Structure
tc_memerr_status
A.5    Device Driver Interfaces
xxprobe
xxslave

B    TURBOchannel Device Driver Source Listing

C    Summary Tables
C.1    List of Header Files
C.2    List of Kernel Support Interfaces
C.3    ioctl Commands
C.4    List of Global Variables
C.5    List of Data Structures
C.6    List of Device Driver Interfaces
C.7    List of Bus Configuration Interfaces

Figures

3-1    Sections of a Character Device Driver and a Block Device Driver

Tables

2-1    Summary Description of Interfaces Used in DMA Data Transfers
4-1    Members of the tc_memerr_status Data Structure
6-1    Parts of the /dev/cb Device Driver
6-2    Interfaces Implemented as Part of the Autoconfiguration Support Section
6-3    Tasks Associated with Implementing the Configuration Section
6-4    Interfaces Implemented as Part of the Open and Close Device Section
6-5    Interfaces Implemented as Part of the Read and Write Device Section
6-6    Tasks Associated with Implementing the Strategy Section
6-7    Tasks Associated with Implementing the ioctl Section
A-1    Summary Description of Kernel Interfaces Specific to TURBOchannel Device Drivers
A-2    Summary Description of Data Structure Specific to TURBOchannel Device Drivers
A-3    Summary Description of Driver Interfaces Specific to TURBOchannel Device Drivers
C-1    Summary Descriptions of Header Files
C-2    Summary Descriptions of Kernel Support Interfaces
C-3    Summary Descriptions of ioctl Commands
C-4    Summary Descriptions of Global Variables
C-5    Summary Descriptions of Data Structures
C-6    Summary of Block and Character Device Driver Interfaces
C-7    Summary Descriptions of Bus Configuration Interfaces