Specifications

Device Driver Entry Points
Interrupt Service Routine
Interrupt Service Routine
Processes interrupts generated by a device.
Specified in
UNIBUS, Q22–bus, and generic VAXBI devices require an interrupt service
routine for each interrupt vector the device has. Use the DPT_STORE macro to
place the address of the interrupt service routine into CRB$L_INTD+VEC$L_ISR.
If the device has two interrupt vectors, use the DPT_STORE macro to place the
address of the second interrupt service routine into CRB$L_INTD2+VEC$L_ISR.
Tape devices on the MASSBUS require an interrupt service routine that
interrogates the tape formatter (the controller) to determine which drive needs
attention and whether the interrupt is unsolicited.
Disk devices on the MASSBUS use the interrupt service routine provided by the
operating system and do not need to provide their own interrupt service routine.
Called by
The interrupt service routine is called either by the system interrupt dispatcher
(for direct-vectored adapters) or by an adapter interrupt service routine (for
non-direct-vector adapters).
Synchronization
A driver’s interrupt service routine is called, executes, and returns at device IPL.
In a multiprocessing environment, the interrupt service routine must obtain the
device lock associated with its device IPL. It performs this acquisition as soon as
it obtains the address of the UCB of the interrupting device. It must release this
device lock before dismissing the interrupt.
Context
At the execution of a driver’s interrupt service routine, the processor is running
in kernel mode on the interrupt stack. As a result, an interrupt service routine
can reference only those virtual addresses that reside in system (S0) space.
Register usage
If an interrupt service routine uses R6 through R11, the AP, or the FP, it must
first save the contents of those registers, restoring their contents before exiting by
means of the REI instruction. MASSBUS drivers must also preserve the contents
of R0 and R1.
4–13