Specifications
Device Driver Entry Points
Register-Dumping Routine
Register-Dumping Routine
Copies the contents of a device’s registers to an error message buffer or a
diagnostic buffer.
Specified in
Specify the name of the register-dumping routine in the regdmp argument of
the DDTAB macro. This macro places the address of the routine into DDT$L_
REGDUMP.
Called by
The system error-logging routines (ERL$DEVICERR, ERL$DEVICTMO, and
ERL$DEVICEATTN) and diagnostic buffer filling routine (IOC$DIAGBUFILL)
call the register-dumping routine.
Synchronization
The operating system calls a register-dumping routine at the same IPL at
which the driver called the system routine ERL$DEVICERR, ERL$DEVICTMO,
ERL$DEVICEATTN, or IOC$DIAGBUFILL. A register-dumping routine must not
change IPL.
Context
A register-dumping routine executes within the context of an interrupt service
routine or a driver fork process, using the kernel-mode stack. As a result, it can
only refer to those virtual addresses that reside in system (S0) space.
Register usage
The register-dumping routine preserves the contents of all registers except R0
through R2. If it uses the stack, the register-dumping routine must restore
the stack before passing control to another routine, waiting for an interrupt, or
returning control to its caller.
Input
Location Contents
R0 Address of buffer into which a register-dumping
routine copies the contents of device registers
R4 Address of device’s CSR (if the driver invoked
the WFIKPCH macro to wait for an interrupt or
timeout)
R5 Address of UCB
Exit
The register-dumping routine issues an RSB instruction to return to its caller.
4–15