Specifications

I/O Port 6-25
Table 6-8 Wrapped Reads
Interlocked Read/Unlock Write Transactions
VAX CI-port architecture (VAXport) devices require Interlocked Read
(IREAD) and Unlock Write (UWMask) transactions to access shared soft-
ware data structures. On the XMI, an I/O device initiates an IREAD
transaction to request exclusive access to a hardware-controlled primary
lock variable which, when acquired, allows the I/O device to modify a sec-
ondary lock variable. This primary lock is a mechanism to ensure that only
one device has access to the secondary lock at any given time.
There is no corresponding primary hardware lock in the system. However,
the I/O port, in conjunction with the XMI I/O adapter, provides the support
necessary for these VAXport devices to function in the system.
To accomplish this, a hardware protocol has been defined to handle the
locking and unlocking of a software data structure in memory. These data
structures are typically headers of queues that are shared by multiple de-
vices. Bit <0> of a memory quadword is defined as the "lock bit." An as-
serted state of the lock bit indicates that the quadword is currently owned
by some device.
When the I/O port receives an IREAD command from the XMI I/O adapter,
it performs an atomic Read-Modify-Write of the corresponding hexword ad-
dress (a wrapped read occurs if appropriate). Since there can be multiple
I/O ports on the TLSB, and the second I/O port (not in slot 8) has only one
request level, a new method is required for Read-Modify-Write transac-
tions. First a Read Bank Lock command is issued (this prevents access to
the bank). When the read data is returned by the memory or CPU cache,
the I/O port sends the requested quadword to the XMI I/O adapter. Note
that IREADs are naturally aligned on quadword boundaries. The I/O port
also sets the lock bit (bit <0>) in the quadword of interest and completes
the atomic operation with a Write Bank Unlock back to memory (this frees
up the bank).
The reason the I/O port can "blindly" set the lock bit is as follows: if the
bit was previously set by another device, then setting it again would have
no effect. If the bit was not set previously, then the bit will now be set and
the I/O device that initiated this IREAD will own the quadword in mem-
ory. In either case, the I/O device will see the previous state of the lock bit
and know whether it did or did not get ownership of the quadword.
The I/O port does not have to perform any special functions to support the
relinquishing of the lock variable by the I/O device. A generic quadword
masked write on the XMI is converted to a generic octaword masked write
packet by the XMI I/O adapter, and the I/O port executes a standard Read-
Transaction Length
Byte Address
<5:0-> Wrapped
Octaword
Octaword
Hexword
Hexword
Double hexword
0XXXXX
1
1XXXXX
0XXXXX
1XXXXX
XXXXXX
No
Yes
No
Yes
No
1
X = Don’t care.