[Index]


Table of Contents


Title and Copyright Pages

About This Book
Audience
New and Changed Features
Scope of the Book
Organization
Related Documentation
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
1.7    VMEbus Porting Information

2    VMEbus Architectures
2.1    VMEbus Hardware Architecture
2.1.1    Address Spaces
2.1.2    Data Sizes
2.1.3    Byte Ordering
2.1.4    Interrupt Vectors
2.1.5    Interrupt Priorities
2.2    VMEbus Software Architecture
2.2.1    VMEbus Address Space
2.2.2    Direct Memory Access Support
2.2.2.1    VMEbus-to-Host DMA
2.2.2.2    VMEbus Device-to-Device DMA
2.2.2.3    Rules for Performing DMA on Multiple VMEbus Adapters
2.2.3    I/O Access
2.2.4    Writes to the Hardware Device Register

3    Structure of a VMEbus Device Driver
3.1    Include Files Section
3.2    Configure Section
3.3    Autoconfiguration Support Section
3.3.1    Setting Up a probe Interface
3.3.2    Setting Up the slave Interface
3.3.3    Setting Up a Controller attach Interface
3.3.4    Setting Up a Controller unattach Interface

4    Data Structures That VMEbus Device Drivers Use
4.1    The controller Structure Members Specific to the VMEbus
4.2    The driver Structure Members Specific to the VMEbus
4.3    The VBA_Option VMEbus Configuration Structure
4.3.1    Example: dmaex Driver Configuration
4.3.2    Example: vb Driver Configuration

5    Kernel Interfaces That VMEbus Device Drivers Use
5.1    Allocating Resources for Direct Memory Access Data Transfers
5.2    Unloading System Direct Memory Access Resources
5.3    Obtaining the VMEbus Address
5.4    Reading and Writing Data from a Device Register
5.5    Using Events to Synchronize Driver Actions
5.5.1    Initializing an Event
5.5.2    Clearing an Event
5.5.3    Waiting For an Event
5.5.4    Posting an Event
5.5.5    Terminating an Event
5.6    Passing Mechanism for the busphys_to_iohandle Interface.

6    VMEbus Device Driver Example
6.1    Device Register Header File dmaexreg.h
6.2    Include Files Section
6.3    Declarations Section
6.4    Configure Section
6.4.1    Providing Declarations Required for Configuration
6.4.2    Implementing the dmaex_configure Interface
6.4.2.1    Implementing register_configuration
6.4.2.2    Implementing register_major_number
6.4.2.3    Implementing callback_register_configuration
6.4.2.4    Implementing callback_register_major_number
6.5    Autoconfiguration Support Section
6.5.1    Implementing the dmaex_probe Interface
6.5.2    Implementing the dmaex_cattach Interface
6.5.3    Implementing the dmaex_ctlr_unattach Interface
6.6    Open and Close Device Section
6.6.1    Implementing the dmaex_open Interface
6.6.2    Implementing the dmaex_close Interface
6.7    Memory Map (mmap) Section
6.8    Driver-Specific ioctl Section
6.8.1    Implementing a dmaex_setup_blk_mode Interface
6.8.2    Implementing the dmaex_ioctl Interface
6.8.2.1    Implementing SET_MMAP_MODE
6.8.2.2    Implementing GET_MMAP_MODE
6.8.2.3    Implementing SET_STRATEGY_XFER_MODE
6.8.2.4    Implementing GET_STRATEGY_XFER_MODE
6.8.2.5    Implementing SETUP_VME_FOR_MMAP_PIO
6.8.2.6    Implementing GET_VME_INFO_FOR_MMAP_PIO
6.8.2.7    Implementing UNMAP_VME_FOR_MMAP_PIO
6.8.2.8    Implementing SET_STRATEGY_INFO_BLK_DMA
6.8.2.9    Implementing GET_STRATEGY_INFO_BLK_DMA
6.8.2.10    Implementing CLR_STRATEGY_INFO_BLK_DMA
6.8.2.11    Implementing SETUP_VME_FOR_STRATEGY_PIO
6.8.2.12    Implementing GET_VME_INFO_FOR_STRATEGY_PIO
6.8.2.13    Implementing UNMAP_VME_FOR_STRATEGY_PIO
6.8.2.14    Implementing MAP_SYS_MEM_TO_VME
6.8.2.15    Implementing GET_SYS_MEM_INFO
6.8.2.16    Implementing UNMAP_SYS_MEM_TO_VME
6.8.2.17    Implementing SETUP_DMA_BLK_WRT
6.8.2.18    Implementing GET_DMA_BLK_WRT
6.8.2.19    Implementing DO_DMA_BLK_WRT
6.8.2.20    Implementing CLR_DMA_BLK_WRT
6.8.2.21    Implementing SETUP_DMA_BLK_RD
6.8.2.22    Implementing GET_DMA_BLK_RD
6.8.2.23    Implementing DO_DMA_BLK_RD
6.8.2.24    Implementing CLR_DMA_BLK_RD
6.8.2.25    Implementing SET_INT_HANDLER
6.8.2.26    Implementing CLR_INT_HANDLER
6.8.2.27    Implementing VME_POST_IRQ
6.8.2.28    Implementing VME_CLR_IRQ
6.9    Read and Write Device Section
6.9.1    Implementing the dmaex_read Interface
6.9.2    Implementing the dmaex_write Interface
6.9.3    Implementing the dmaex_minphys Interface
6.10    Strategy Section
6.10.1    Implementing PIO Transfer Mode
6.10.2    Implementing Device DMA Transfer Mode
6.10.3    Implementing Block DMA Transfer Mode
6.11    Interrupt Sections

7    Using VMEbus Device Drivers

A    VMEbus-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 Structures
A.1.4    Conventions for Device Driver Interfaces
A.2    Header File

vbareg.h

A.3    Kernel Interfaces
vba_clear_irq
vba_display_addr_type
vba_dma
vba_get_dma_addr
vba_get_vmeaddr
vba_get_vmeaddr_am
vba_map_csr
vba_post_irq
vba_set_dma_addr
vba_unmap_csr

A.4    Data Structures
controller
driver
vme_handler_info

A.5    Device Driver Interfaces
xxprobe
xxslave

B    VMEbus Device Driver Source Listing
B.1    VMEbus /dev/dmaex DM100.list Registration File
B.2    VMEbus /dev/dmaex files File Fragment
B.3    VMEbus /dev/dmaex sysconfigtab File Fragment
B.4    VMEbus /dev/dmaex dmaexreg.h Device Register Header File
B.5    VMEbus /dev/dmaex dmaex.c Source File

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

D    Running Digital UNIX Software on AXPvme and Alpha VME Systems
D.1    VMEbus Configuration Instructions
D.1.1    Configuring the VMEbus Adapter
D.1.2    Specifying the VMEbus Request Level
D.1.3    Specifying the VIC Arbitration Mode
D.1.4    Specifying the VMEbus Fairness Timer Value
D.1.5    Specifying the Local Bus and VMEbus Timeout Periods
D.1.6    Specifying the VMEbus Release Mode
D.1.7    Specifying the VMEbus Adapter as System Controller
D.1.8    Special Considerations for Receipt of VMEbus Resets
D.1.8.1    Receipt of VMEbus Resets on Digital Alpha VME 2100 Systems
D.1.8.2    Receipt of VMEbus Resets on Digital AXPvme and Alpha VME SBCs
D.1.9    Specifying VMEbus Master Write Posting
D.1.10    Specifying the VMEbus DMA Interleave Gap
D.1.11    Specifying an 8 KB Limit on VMEbus DMA Reads
D.1.12    Specifying an 8 KB Limit on VMEbus DMA Writes
D.1.13    Specifying the DMA Method for SMP Systems
D.1.14    Configuring A32 and A24 Address Spaces
D.1.14.1    Specifying A32 and A24 Address Space Overlapping
D.1.14.2    Configuring A32 and A24 Window Sizes
D.1.14.3    Specifying the A32 Base Address
D.1.14.4    Specifying the A24 Base Address
D.1.15    Configuring the A16 Address Space
D.1.16    VMEbus and VME Adapter Interrupt Request Levels
D.1.17    Setting VMEbus Interrupt Vector Parameters
D.1.17.1    Specifying VMEbus Interrupt Vectors and Interrupt Request Levels
D.1.17.2    Specifying Autovector Interrupt Vectors
D.1.17.3    Specifying Module Switch Interrupt Vectors
D.1.17.4    Specifying Global Switch Interrupt Vectors
D.1.18    Using VMEbus Byte-Swap Modes
D.1.18.1    VME_BS_NOSWAP Mode
D.1.18.2    VME_BS_BYTE Mode
D.1.18.3    VME_BS_WORD Mode
D.1.18.4    VME_BS_LWORD Mode
D.1.18.5    Shared Memory Between Big Endian and Little Endian Processors
D.2    VMEbus Slave Block Transfers
D.3    VMEbus Master Block Transfers with Local DMA
D.3.1    Digital UNIX Interfaces for Master Block-Mode Transfer
D.3.2    Restrictions on VMEbus Master Block Transfers with Local DMA
D.4    Realtime Interrupt-Handling Function
D.5    VMEbus Backplane (vb) Network Driver
D.5.1    DECnet Support
D.5.2    vb Driver Concepts
D.5.2.1    VMEbus Address Use by the vb Driver
D.5.2.1.1    VMEbus Addresses Used for Mapping Data
D.5.2.1.2    VMEbus Addresses Used for Interrupting
D.5.2.2    Box Manager Node
D.5.2.3    Network Participation
D.5.3    Configuring the vb Network Driver
D.5.3.1    Editing the if_vb_data.c File
D.5.3.1.1    Per-Node Configurable Data
D.5.3.1.2    Per-Network Configurable Data
D.5.3.2    Editing the /etc/sysconfigtab File
D.5.4    Summary of Configuration Steps
D.5.5    Adding the vb Driver to Digital AXPvme or Alpha VME Systems
D.5.6    Registering the vb Driver as a Network Device

Index