Specifications

OpenVMS System Routines Called by OpenVMS AXP Device Drivers
IOC$ALLOCATE_CRAM
Address of ADP for device.
Returns
VMS Usage: cond_value
type: longword_unsigned
access: longword (unsigned)
mechanism: write only—by value
Status indicating the success or failure of the operation.
Return Values
SS$_NORMAL CRAM has been successfully allocated.
SS$_INSFARG Insufficient arguments supplied in call
Description
IOC$ALLOCATE_CRAM allocates a single controller register access mailbox
(CRAM) and fills in the following fields:
CRAM$W_SIZE Size of CRAM
CRAM$B_TYPE Structure type (DYN$C_MISC)
CRAM$B_SUBTYPE Structure type (DYN$C_CRAM)
CRAM$Q_RBADR Address of remote tightly-coupled I/O interconnect
(from IDB$Q_CSR)
CRAM$Q_HW_MBX Physical address of hardware I/O mailbox
CRAM$L_MBPR Mailbox pointer register (from ADP$PS_MBPR)
CRAM$Q_QUEUE_TIME Default mailbox queue timeout value (from ADP$Q_
QUEUE_TIME)
CRAM$Q_WAIT_TIME Default mailbox wait-for-completion timeout value
(from ADP$Q_WAIT_TIME)
CRAM$B_HOSE Number of remote tightly-coupled I/O interconnect
(from ADP$B_HOSE_NUM)
CRAM$L_IDB IDB address
CRAM$L_UCB UCB address
A driver may choose to allocate a CRAM on a per-controller or a per-unit basis.
Typically a driver specifies values in the idb_crams and ucb_crams arguments
of the DPTAB macro that indicate how many CRAMs should be allocated to
a controller (IDB) or a unit (UCB). If these values (DPT$W_IDB_CRAMS and
DPT$W_UCB_CRAMS) are nonzero in the DPT, the driver loading procedure
automatically invokes IOC$ALLOCATE_CRAM to allocate the specified number
of CRAMs. The driver-loading procedure thereafter sets up IDB$PS_CRAM to
point to a linked list of CRAMs associated with a controller, UCB$PS_CRAM to a
linked list of CRAMs associated with a device unit.
A–11