RDC.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
McJones on: July 18, 1980 5:25 PM
Birrell, November 3, 1983 10:03 am
Russ Atkinson (RRA) February 19, 1985 3:01:07 pm PST
Doug Wyatt, February 22, 1985 4:37:57 pm PST
Definitions for the D0 Rigid Disk Controller.
DIRECTORY
DiskFace USING [Attributes],
SA4000Face USING [DiskAddress, Operation];
RDC: DEFINITIONS
= BEGIN
RDC I/O Command Block
IOCB: TYPE = MACHINE DEPENDENT RECORD [ -- 16-word aligned
operation (0): SA4000Face.Operation,
serviceLateRetryCount (15B): CARDINAL, -- microcode retry count
rdcCommand (16B): WORD, -- command to be executed by the RDC
next (17B): IOCBshortPtr, -- points to next IOCB in the queue, set by Initiate
clientHeader (20B): SA4000Face.DiskAddress,
dontcare (22B): RECORD [a, b: UNSPECIFIED], -- clobbered by disk microcode
clientLabel (24B): PackedLabel, -- input to verify and write label operations
diskLabel (34B): PackedLabel, -- output from verify and read label operations
rateErrorRetryCount (44B): CARDINAL -- microcode retry count
];
Base: TYPE = LONG BASE POINTER;
IOCBshortPtr: TYPE = Base RELATIVE POINTER TO IOCB;
IOCBlongPtr: TYPE = LONG POINTER TO IOCB;
Restore the explicit bit positions in the following declaration as soon as Mesa AR 4670 is fixed:
PackedLabel: TYPE = MACHINE DEPENDENT RECORD [
sequence0Bit2 --(0:0..0)--: CARDINAL[0..2),
processorID0 --(0:1..15)--: CARDINAL[0..32768),
processorID1 --(1)--: CARDINAL,
processorID2 --(2)--: CARDINAL,
sequence1 --(3)--: CARDINAL,
sequence0Bits3Thru15 --(4:0..12)--: CARDINAL[0..8192),
immutable --(4:13..13)--: BOOL, -- clear after first (or every) page in run
temporary --(4:14..14)--: BOOL, -- clear after first (or every) page in run
zeroSize --(4:15..15)--: BOOL, -- clear after first (or every) page in run
filePageLo --(5)--: CARDINAL, -- increment after every page in run
type --(6)--: DiskFace.Attributes,
bootChainLink --(7)--: PackedDiskAddress
];
Under pilot, the "bootChainLink" field was replaced by:
vp --(7)--: SELECT OVERLAID * FROM
volumeFile => [
fill: CARDINAL[0..512) ← 0, -- delete when Mesa AR 4670 is fixed
filePageHi --(7)--: CARDINAL[0..128)],
normalFile => [bootChainLink --(7)--: PackedDiskAddress],
ENDCASE];
PackedDiskAddress: TYPE = MACHINE DEPENDENT RECORD [
cylinder (0:0..7): [0..256), -- =fixedHeadCylinder => next field is a fixed head
head (0:8..10): [0..8),
sector (0:11..15): [0..32)
];
eof: PackedDiskAddress = LOOPHOLE[-1]; -- cylinder=255;
fixedHeadCylinder: CARDINAL = 254;
firstFixedHead: CARDINAL = 8;
PackDiskAddress: PROC [da: SA4000Face.DiskAddress]
RETURNS
[PackedDiskAddress] = INLINE {
IF da=LOOPHOLE[37777777777B--PilotDisk.nullAddress: i.e. a null bootChainLink--] THEN
RETURN[eof]
ELSE IF da.head>=firstFixedHead THEN
RETURN[[cylinder: fixedHeadCylinder, head: da.head-firstFixedHead, sector: da.sector]]
ELSE
RETURN[[cylinder: da.cylinder, head: da.head, sector: da.sector]]
};
UnpackDiskAddress: PROC [pda: PackedDiskAddress]
RETURNS
[SA4000Face.DiskAddress] = INLINE {
IF pda=eof THEN
RETURN[LOOPHOLE[37777777777B]]
ELSE IF pda.cylinder=fixedHeadCylinder THEN
RETURN[[cylinder: 0, head: pda.head+firstFixedHead, sector: pda.sector]]
ELSE
RETURN[[cylinder: pda.cylinder, head: pda.head, sector: pda.sector]]
};
DeviceStatus: TYPE = MACHINE DEPENDENT RECORD [
outcome (0: 0..3): Outcome,
rdcBits (0: 4..15): RDCStatusBits
];
Outcome: TYPE = MACHINE DEPENDENT {inProgress (0), goodCompletion, dataError, labelError, labelCheck, seekTimeout, sectorTimeout, notReady, headerError};
RDCStatusBits: TYPE = MACHINE DEPENDENT RECORD [
unused (0:0..0),
serviceLate (0:1..1),
one (0:2..2), -- should always be 1
rateError (0:3..3),
sector00S (0:4..4),
track00S (0:5..5),
seekCompS (0:6..6),
devSelOK (0:7..7),
bufErr (0:8..8),
rdErr (0:9..9),
writeFault (0:10..10),
oFault (0:11..11): BOOL
];
END.
LOG
Time: November 19, 1979 6:32 PM By: Frandeen Action: Create file
Time: June 3, 1980 10:22 AM By: McJones Action: 48-bit processor ids