Specifications

Device Driver Entry Points
Driver Unloading Routine
Driver Unloading Routine
A driver specifies a driver unloading routine if there is any device-specific work to
do when the driver is unloaded and reloaded.
Specified in
Specify the address of the driver unloading routine in the unload argument of
the DPTAB macro. The driver-loading procedure puts the relative address of this
routine in DPT$W_UNLOAD.
Called by
The System Generation utility (SYSGEN) calls the driver unloading routine, if it
exists, when executing a RELOAD command.
Synchronization
SYSGEN calls a driver unloading routine at IPL$_POWER. The driver unloading
routine cannot lower IPL.
Context
The driver unloading routine executes in process context.
Register usage
The driver unloading routine can use all registers.
Input
Location Contents
R6 Address of DDB
R10 Address of DPT
Exit
The driver unloading routine returns exits with an RSB instruction. If it returns
a success code (bit 0 set) in R0, SYSGEN proceeds to load the new version of the
driver. If it returns a failure code (bit 0 clear), SYSGEN neither unloads the old
version of the driver nor loads the new version.
Description
Because the driver unloading routine cannot lower IPL from IPL$_POWER or
obtain spinlocks, it is of limited usefulness. It cannot safely modify I/O database
fields, but can use COM$DRVDEALMEM to return system buffers allocated by
the driver to nonpaged pool.
4–10