Specifications

Operating System Routines
EXE$CRAM_CMD
EXE$CRAM_CMD
Processes a CSR read or write to a device connected to a remote bus.
Module
[SYSLOA]CRAM_ROUTINES_LSB
Input
Location Contents
04(SP) Pseudo CSR address (PCA)
08(SP) Flags longword, containing data length,
environment flag, and disposition flags, as supplied
by the READ_CSR or WRITE_CSR macro
0A(SP) Operation, either read or write
0C(SP) Data to be written; reserved for data to be read
10(SP) Address of user-supplied CRAM (optional)
R5 Address of CRB
Output
Location Contents
R0 Status indicating success or failure of the operation
Synchronization
EXE$CRAM_CMD executes at the IPL necessary to read and write CSRs.
Description
EXE$CRAM_CMD is called from the READ_CSR and WRITE_CSR macros
with all necessary parameters pushed on the stack. It processes the entire I/O
transaction.
If no CRAM address has been supplied, the routine first allocates a CRAM by
calling routine IOC$ALLOCATE_CRAM. Then, according to the requirements
of the specified I/O interconnect (as determined from the PCA) and the input
parameters, the routine calculates and fills the following fields of the hardware
I/O mailbox within the CRAM:
HW_CRAM$L_COMMAND
HW_CRAM$B_BYTE_MASK
HW_CRAM$Q_RBADR
HW_CRAM$Q_WDATA (if the operation is a write)
EXE$CRAM_CMD then calls routine IOC$CRAM_IO to perform the actual
hardware mailbox I/O transaction.
3–19