The Map Cache implements five commands. Its main function is to provide mapping from virtual to real addresses, using the following transaction (MapRqst):
Map [aid, vp] Returns [rp, flags].
The entries of the Map Cache can also be accessed directly with the IORead and IOWrite commands. Because the format of the IORead and IOWrite commands is of limited size, it is not possible to pass both vp and aid as parameters to these transactions; consequently, the value of the aid is first stored in the AID internal register and is used implicitly:
WriteEntry [vp, rp flags].
ReadEntry [vp] Returns [rp, flags].
The Map Cache contains 8 internal registers, which can be accessed directly with IORead and IOWrite:
WriteRegister [registerNumber, value].
ReadRegister [registerNumber] Returns [value].
The Map Cache also implements the broadcast version of both IOWrite's.
5.1 DynaBus Transactions
Each DynaBus command is two cycles long. The first cycle presents header information and a 32-bit address. (See Figure 1). The use of the second cycle is command dependent.
[Artwork node; type 'Artwork on' to command tool]
Figure 1: Encoding of Header Cycle. During requests, bit 5 is indicates the mode (kernel=0, user=1); for replies, bit 5 indicates an error (error=1). The replyShared bit is always set to 0 by the Map Cache. The DeviceID is the requestor's for all headers.
The replies are also two cycles long. Note that for all of the transactions except MapRequest, the first cycle of the reply reflects most of the information contained in the header cycle of the command; bits 0-4 and 7-63 are identical. The second cycle is command dependent and may contain the requested data, error information or be unused.
Figure 4 illustrates the address pattern for all IO transactions addressed to the Map Cache.
—————————————————————————————————————
Here are the specifications for the DynaBus commands to which the Map Cache responds:
5.1.1 Mapping: MapRqst and MapRply
This command takes a 16-bit address space identifier (aid) and a 22-bit virtual page number as inputs.
[Artwork node; type 'ArtworkInterpress on' to command tool]
If the Map Cache contains the requested entry, it returns the corresponding 22-bit real page number and 4 flags.
[Artwork node; type 'ArtworkInterpress on' to command tool]
If the Map Cache does not contain the requested entry, a 32-bit FaultCode is returned. The 10, high-order bits of the FaultCode are the Dynabus DeviceID of the reporting device. The 3, least significant bits of the FaultCode report the specific error, MapFault which is 010.
[Artwork node; type 'ArtworkInterpress on' to command tool]
5.1.2 Read Map Cache Entry
The Map Cache extends the opcode of the IOReadRequest so that it can be used to read Map Cache entries. Bit 40 of the header cycle is the extention: if bit 40 = 0, a ReadMapCacheEntry is executed.
This command is logically equivalent to the Map Request, and should be used mostly for debugging purposes. The command takes a virtual page as input, and uses the AID register as aid corresponding to the virtual page.
[Artwork node; type 'ArtworkInterpress on' to command tool]
If the entry is present, the command returns the corresponding real page and flags:
[Artwork node; type 'ArtworkInterpress on' to command tool]
If the Map Cache does not contain the requested entry, a 32-bit FaultCode is returned. For ReadMapCacheEntryReply, the specific error is categorized as DynaBusOtherFault, 111.
[Artwork node; type 'ArtworkInterpress on' to command tool]
5.1.3 Read Map Cache Register
The Map Cache extends the opcode of the IOReadRequest so that it can be used to read Map Cache registers. Bits 40 and 41 of the header cycle are the extention. If bits 40 and 41 are 10, the ReadMapCacheRegister is executed.
This command takes a 3-bit register number as input and returns the contents of the register. (For a description of the 8 Map Cache registers, see Section 5.2.)
[Artwork node; type 'ArtworkInterpress on' to command tool]
Since there are exactly 8 registers, and read access to these registers is not restricted, no error is possible for this command. The value of the register (16 or 22 bits) is left-filled with 0's.
[Artwork node; type 'ArtworkInterpress on' to command tool]
5.1.4 Write Map Cache Entry
The opcode of the IOWriteRequest is extended so that it can be used to write Map Cache entries. Bit 40 header cycle is the extention. If bit 40 of the IOWriteRequest is a zero, a WriteMapCacheEntry is executed.
This command writes an entry containing a virtual page, a real page, 4 flags, and a valid bit in the Map Cache Entry Table. The valid bit is specified in position 41 of the header, and is really an extension of the opcode: if TRUE (1), the entry is written; if FALSE (0), the entry is flushed. Since the Map Cache uses a very simple (and somewhat heavy-handed) direct map scheme, flushing an entry which is not in the Map Cache causes any entry that uses the same location to be flushed instead.
The aid corresponding to the virtual page should be written into the AID register using WriteMapCacheRegister before this command is executed.
[Artwork node; type 'ArtworkInterpress on' to command tool]
If no error, the reply is:
[Artwork node; type 'ArtworkInterpress on' to command tool]
If the write is attempted in user mode, the IOAccessFault, 001, meaning insufficient privilege to access an IO location is returned.
[Artwork node; type 'ArtworkInterpress on' to command tool]
5.1.5 Write Map Cache Register
This commands takes two arguments, a register number and the data to be written. (For a description of the 8 Map Cache registers, see Section 5.3.) The opcode is bit 40=1, bit 41=0.
[Artwork node; type 'ArtworkInterpress on' to command tool]
If no error occurs, the reply is:
If the write is attempted in user mode, the IOAccessFault, 001, meaning insufficient privilege to access an IO location is returned.
[Artwork node; type 'ArtworkInterpress on' to command tool]
5.1.6 Broadcast Writes
The WriteMapCacheEntry and WriteMapCacheRegister commands have their broadcast counterpart which are almost identical. The Memory Controller provides the reply to all broadcast commands. These commands are only valid in kernel mode: if issued in user mode, they are simply ignored.
5.1.6.1 Broadcast Write Map Cache Entry
[Artwork node; type 'ArtworkInterpress on' to command tool]
5.1.6.2 Broadcast Write Map Cache Register
This command writes the data provided to the specified register in all of the Map Caches in the system.
[Artwork node; type 'ArtworkInterpress on' to command tool]