Specifications
Introduction
1.1 Driver Functions
• Preparing a device unit and its controller (or both) for operation at system
startup and during recovery from a power failure
• Performing device-dependent I/O preprocessing
• Translating programmed requests for I/O operations into device-specific
commands
• Activating a device unit
• Responding to hardware interrupts generated by a device unit
• Responding to device timeout conditions
• Responding to requests to cancel I/O on a device unit
• Reporting device errors to an error-logging program
• Returning status from a device unit to the process that requested the I/O
operation
1.2 Driver Components
A device driver module can consist of the routines and tables discussed in this
section. The order of the routines and tables within the driver module is not
important.
1.2.1 Driver Tables
The following tables appear in every driver.
The driver prologue table (DPT) defines the identity and attributes or
characteristics of the driver to the system utility that loads the driver into
virtual memory and creates the associated data structures. With the information
provided in the DPT, the driver-loading procedure can both load and reload
drivers and perform the I/O database initialization that is appropriate to either
situation.
Section 4.1 describes the procedure for creating a DPT and further discusses its
functions. The DPT contents are shown and described in the OpenVMS AXP
Device Support: Reference.
The driver dispatch table (DDT) lists the addresses of the entry points of
standard routines within the driver, and records the size of the diagnostic
and error message buffers for drivers that perform error logging. You can find
additional information and instructions on how to specify a DDT in Section 4.2.
The structure and contents of the DDT are shown and described in the OpenVMS
AXP Device Support: Reference.
The function decision table (FDT) lists all valid function codes for the device,
and associates valid codes with the addresses of I/O preprocessing routines, called
FDT routines. The driver contains device-dependent FDT routines, and the
operating system itself provides routines (described in Section 5.2.1) that perform
request preprocessing common to many I/O functions.
When a user process calls the $QIO system service, the system service uses the
I/O function code specified in the request to select the appropriate upperlevel
FDT routine. To prepare for the actual I/O operation, FDT routines perform
such tasks as allocating buffers in system space, locking pages in memory, and
validating the device-dependent arguments (p1 to p6) of the $QIO request.
Section 4.3 provides further discussion of the FDT, and Chapter 5 details
strategies and rules for writing, specifying, and exiting from an FDT routine.
1–2










