<> <> <> <> <> <> <<>> <> <<>> DIRECTORY DiskFace USING [DiskAddress, DontCare, FileID, wordsPerPage], PrincOps USING [ControlLink, FrameHandle, PageCount, PageValue], Pup USING [Host, Net], XNS USING [Address]; BootFile: DEFINITIONS = BEGIN OPEN PrincOps; <> HostNumber: TYPE = MACHINE DEPENDENT RECORD [a, b, c, d, e, f: BYTE]; nullHostNumber: HostNumber = [0, 0, 0, 0, 0, 0]; -- Not assigned as either a physical or multicast address. DiskFaceFilePageNumber: TYPE = LONG CARDINAL; DeviceType: TYPE = PRIVATE RECORD [CARDINAL]; FloppyDiskFaceDiskAddress: TYPE = MACHINE DEPENDENT RECORD [ cylinder(0): CARDINAL, --must be IN [0..numberOfCylinders) head(1:0..7): BYTE, --must be IN [0..numberOfHeads) sector(1:8..15): BYTE]; --must be IN [1..maxSectorsPerTrack] <<>> <> currentVersion: CARDINAL = 102; <> <<(102 corresponds to changes that allow > 1 Mword physical memory)>> <<(103 corresponds to increased boot Locations (types) )>> Location: TYPE = MACHINE DEPENDENT RECORD[ deviceType(0:0..15): DeviceType, deviceOrdinal(1:0..15): CARDINAL, vp(2:0..9*16-1): SELECT OVERLAID * FROM disk => [ diskFileID(2:0..9*16-1): DiskFileID ], ethernetBSP => [ -- pup bootFileNumber(2:0..15): CARDINAL, net(3:0..15): Pup.Net _ [0], host(4:0..15): Pup.Host _ [0] ], ethernetSPP => [ -- xns ethernetRequest(2:0..9*16-1): EthernetRequest ], floppy => [ floppyDiskFileID(2:0..9*16-1): FloppyDiskFileID ], any => [word(2:0..9*16-1): ARRAY [0..9) OF WORD], ENDCASE ]; <> DiskFileID: TYPE = MACHINE DEPENDENT RECORD[ <> fID (0:0..5*16-1): DiskFace.FileID, -- for disk label firstPage (5:0..2*16-1): INT, -- for disk label firstLink (7:0..2*16-1): DiskFace.DontCare -- initial boot chain link ]; FloppyDiskFileID: TYPE = MACHINE DEPENDENT RECORD[ <> fID (0:0..5*16-1): DiskFace.FileID, -- for disk label firstPage (5:0..2*16-1): INT, da (7:0..2*16-1): FloppyDiskFaceDiskAddress -- initial boot chain link ]; DiskBootChainLink: TYPE = DiskFace.DiskAddress; nullDiskBootChainLink: DiskBootChainLink = LOOPHOLE[LONG[0]]; <> eofDiskBootChainLink: DiskBootChainLink = LOOPHOLE[LAST[CARD32]]; <<"End of file". This must be written in the boot chain link field of the last page of the bootable portion of a file which is loaded by the microcode (hard microcode, soft microcode, diagnostic microcode, germ). It is required to delimit the end of the file to the microcode.>> <<>> nullLink: DiskFace.DontCare = LOOPHOLE[LONG[0]]; <> EthernetRequest: TYPE = MACHINE DEPENDENT RECORD [ bfn(0:0..3*16-1): EthernetBootFileNumber, address(3:0..6*16-1): XNS.Address ]; EthernetBootFileNumber: TYPE = RECORD [HostNumber]; <> nullEthernetBootFileNumber: EthernetBootFileNumber = [nullHostNumber]; <> <> <> <<>> <> <> <> <> <<>> <> <<>> <> <> Header: TYPE = MACHINE DEPENDENT RECORD [ -- first page of boot file version(0): CARDINAL _ currentVersion, creationDate(1): LONG CARDINAL, -- System.GreenwichMeanTime pStartListHeader(3): POINTER, -- when continuation kind=initial (relative to that mds) inLoadMode(4): InLoadMode, continuation(5): Continuation, countData(7): CARDINAL, -- number of nonvacant pages (not counting germ) entries(HeaderStart): HeaderArray ]; HeaderStart: NAT = 10B; HeaderArray: TYPE = ARRAY [0..maxEntriesPerHeader) OF Entry; maxEntriesPerHeader: CARDINAL = (DiskFace.wordsPerPage-HeaderStart)/SIZE[Entry]; Trailer: TYPE = MACHINE DEPENDENT RECORD [ -- entry table after exhausting "Header" version(0): CARDINAL _ currentVersion, entries(1): TrailerArray ]; TrailerStart: NAT = 1; TrailerArray: TYPE = ARRAY [0..maxEntriesPerTrailer) OF Entry; maxEntriesPerTrailer: CARDINAL = (DiskFace.wordsPerPage-TrailerStart)/SIZE[Entry]; Entry: TYPE = MACHINE DEPENDENT RECORD [ page(0:0..15): CARDINAL, --PageNumber-- value(1:0..31): PageValue ]; InLoadMode: TYPE = {load, restore}; Continuation: TYPE = MACHINE DEPENDENT RECORD [ vp(0): SELECT kind(0:0..7): ContinuationKind FROM initial => [ mdsi(0:8..15): MDSIndex, destination(1): ControlLink ], resumptive => [ mdsi(0:8..15): MDSIndex, -- for WriteMDS hack -- resumee(1): FrameHandle ], ENDCASE ]; ContinuationKind: TYPE = {initial, resumptive}; MDSIndex: TYPE = RECORD [index: [0..256)]; -- high order bits of MDS base pointer MemorySizeToFileSize: PROC [countReal: PageCount] RETURNS [INT] = INLINE { <> RETURN[ countReal -- total data pages +1 -- header page +(MAX[countReal, maxEntriesPerHeader]-maxEntriesPerHeader+maxEntriesPerTrailer-1) /maxEntriesPerTrailer -- trailer pages ] }; <<>> END.