Specifications

Operating System Routines
IOC$CRAM_IO
IOC$CRAM_IO
Initiates an I/O operation to a device on a remote bus and waits for the operation
to complete.
Module
[SYSLOA]CRAM_ROUTINES_LSB
Input
Location Contents
04(SP) Address of CRAM
Output
Location Contents
R0 Status indicating success or failure of the operation
Synchronization
IOC$CRAM_IO executes at the IPL necessary to read and write CSRs.
Description
IOC$CRAM_IO is called by routine EXE$CRAM_CMD. It performs the entire
hardware I/O mailbox transaction by queuing the hardware I/O mailbox to the
mailbox pointer register (MBPR) and waiting for the transaction to complete.
IOC$CRAM_IO initiates the I/O operation by writing the physical address of
the hardware I/O mailbox portion of the specified CRAM to the MBPR. If the
routine is unable to post the mailbox to the MBPR within the queuing timeout
interval (found at location CRAM$Q_QUEUE_TIME), it returns a status of SS$_
INTERLOCK.
If the routine does successfully queue the mailbox, it sets the CRAM$V_IN_USE
bit in location CRAM$B_CRAM_FLAGS and then repeatedly checks bit HW_
CRAM$V_MBX_DONE in location HW_CRAM$W_MBX_FLAGS of the hardware
I/O mailbox to determine when the operation has completed:
If the operation completes successfully, the routine clears the CRAM$V_IN_
USE bit and returns a status of SS$_NORMAL.
If the operation completes with an error (bit HW_CRAM$V_MBX_ERROR set
in location HW_CRAM$W_MBX_FLAGS), the routine clears the CRAM$V_
IN_USE bit and returns a status of SS$_CTRLERR.
3–88