Specifications

Writing Device-Driver Tables
4.1 Driver Prologue Table
Code identifying the device by its adapter type in the adapter argument.
You can supply any name that, when appended to the string "AT$_", results
in a symbol defined by the $DCDEF macro in SYS$LIBRARY:STARLET.MLB.
Of these symbols, the driver-loading procedure takes special action only
when the keyword NULL is present. The driver-loading procedure creates
no ADP for a null adapter (AT$_NULL) and clears the VEC$PS_ADP and
IDB$L_ADP fields.
Size of the unit control block (UCB) in the ucbsize argument.
The DPTAB also allows you to specify the following information, if applicable to
the device driver:
Whether the driver needs a permanently allocated system page
Whether the driver needs controller register access mailboxes (CRAMs) to be
preallocated and associated with the unit control block (UCB) or interrupt
dispatch block (IDB).
Maximum number of units supported by the driver (default is 8)
Number of UCBs to be created when the driver is loaded by means of the
System Management (SYSMAN) utility’s autoconfiguration facility and the
address of a unit delivery routine to be called by that facility
A driver typically follows the DPTAB macro invocation with several instances
of the DPT_STORE macro and the DPT_STORE_ISR macro, which allow the
driver to communicate its initialization needs to the driver-loading procedure and
reloading procedures. A driver uses these macros in the following manner:
A driver invokes the DPT_STORE macro once, specifying the INIT keyword,
to automatically generate a driver I/O database initialization routine. This
routine, which executes when the driver is first loaded into the system,
initializes those fields specified by the series of DPT_STORE macros that
intervene between the DPT_STORE INIT and DPT_STORE REINIT
declarations.
Drivers use the DPT_STORE macro with the INIT table marker label to
begin a list of DPT_STORE invocations that supply initialization data for the
following fields:
UCB$B_FLCK Index of the fork lock under which the driver performs
fork processing. Fork lock indexes are defined by the
$SPLCODDEF definition macro (invoked by DPTAB) as
follows:
IPL Fork Lock Index
8 SPL$C_IOLOCK8
9 SPL$C_IOLOCK9
10 SPL$C_IOLOCK10
11 SPL$C_IOLOCK11
UCB$B_DIPL Device interrupt priority level
Other commonly initialized fields are as follows:
UCB$L_DEVCHAR Device characteristics
4–2