Specifications

4
Writing Device-Driver Tables
Every device driver declares three static tables that describe the device and
driver:
Driver prologue table (DPT)—Describes the device type, driver name,
and fields in the I/O database to be initialized during driver loading and
reloading.
Driver dispatch table (DDT)—Lists some of the driver’s entry points to
which the operating system transfers control. The function decision table lists
other entry points.
Function decision table (FDT)—Provides the names of action routines for
I/O functions the driver supports and indicates which of those functions it
supports by using an intermediate system buffer.
The operating system provides macros that drivers can invoke to initialize these
tables.
4.1 Driver Prologue Table
The driver prologue table (DPT), along with parameters to the System
Management utility (SYSMAN) command that request driver loading, describes
the driver to the driver-loading procedure. The driver-loading procedure performs
the following tasks:
Further initializes the DPT
Creates data structures for the new devices in the I/O database
Calls the OpenVMS executive loader to compute the size of the driver and
load it into nonpaged system memory
Links the new DPT into a list of all DPTs known to the system (IOC$GL_
DPTLIST).
Device drivers can pass data-structure initialization information to the
driver-loading procedure through values stored in the DPT. In addition, the
driver-loading procedure initializes some fields within the I/O database using
information from its own tables.
To create a DPT, a driver invokes the DPTAB macro, as described in OpenVMS
AXP Device Support: Reference. The DPTAB macro generates a driver prologue
table (DPT) in a program section called $$$105_PROLOGUE.
The DPTAB macro requires the following information:
An indication that the driver conforms to the coding practices for a OpenVMS
AXP device driver by supplying step=2 in the step argument.
An indication that the driver has been written to run in a symmetric
multiprocessing system. All OpenVMS AXP drivers must specify smp=YES.
4–1