BootStartList.mesa
Copyright Ó 1985, 1986 by Xerox Corporation. All rights reserved.
Levin on June 20, 1983 2:14 pm
Birrell, March 30, 1983 4:51 pm
Russ Atkinson (RRA) January 30, 1985 7:01:00 pm PST
Willie-Sue, October 22, 1986 5:52:18 pm PDT
Doug Wyatt, December 12, 1986 6:28:08 pm PST
DIRECTORY
BootFile USING [Location],
PrincOps USING [ControlModule, MachineType, PageCount, PageNumber, Priority],
SystemVersion USING [Date, ReleaseNumber];
BootStartList: DEFINITIONS
= BEGIN
This interface defines the format of the start list, which is constructed by MakeBoot and interpreted by initialization code. It also defines some procedures to be used during initialization to access the actual start list instance.
The start list has the following properties:
1) It consists of a Header (h) and a sequence of Entries.
2) The sequence of entries contains an arbitrary mixture of "space" and "swapUnit" variants and is terminated by a "stop" variant.
3) No guarantee is made about the order of virtual memory intervals spanned by the space Entries or of the subintervals spanned by the swapUnit Entries.
4) No guarantee is made about the order of swapUnit Entries relative to their parent space Entry.
5) The set of space Entries completely tiles the virtual memory range [PageNumber.FIRST..h.lastVMPage].
6) The start list contains a swapUnit Entry that describes itself.
versionID: CARDINAL = 06203;
Limit: CARDINAL = 37777B;
Base: TYPE = LONG BASE POINTER TO Header;
Index: TYPE = Base RELATIVE POINTER [0..Limit] TO Entry;
nullIndex: Index = Index.FIRST;
startIndex: Index = LOOPHOLE[SIZE[Header]];
SpaceIndex: TYPE = Base RELATIVE POINTER [0..Limit] TO space Entry;
nullSpaceIndex: SpaceIndex = LOOPHOLE[nullIndex];
SwapUnitIndex: TYPE = Base RELATIVE POINTER [0..Limit] TO swapUnit Entry;
nullSwapUnitIndex: SwapUnitIndex = LOOPHOLE[nullIndex];
Switches: TYPE = RECORD [a, b, c, d: CARDINAL];
StateVectorCounts: TYPE = ARRAY PrincOps.Priority OF CARDINAL;
Header: TYPE = MACHINE DEPENDENT RECORD [
version(0:0..1*16-1): CARDINAL,
release(1:0..3*16-1): SystemVersion.ReleaseNumber,
buildDate(4:0..2*16-1): SystemVersion.Date,
requiredUCode(6:0..32*16-1): ARRAY PrincOps.MachineType OF SystemVersion.Date,
controlList(38:0..1*16-1): PrincOps.ControlModule,
initLoadState(39:0..1*16-1): SwapUnitIndex,
mdsBase(40:0..2*16-1): PrincOps.PageNumber,
pdaPages(42:0..2*16-1): PrincOps.PageCount,
stateVectorCounts(44:0..8*16-1): StateVectorCounts,
stateVectorSize(52:0..1*16-1): CARDINAL,
nProcesses(53:0..1*16-1): CARDINAL,
lastVMPage(54:0..2*16-1): PrincOps.PageNumber,
lastBootLoadedPage(56:0..2*16-1): PrincOps.PageNumber,
switches(58:0..4*16-1): Switches,
The following four fields are for early linkage to a world-swap debugger before the file system is able to find one.
locDebuggerMicrocode(62:0..11*16-1): BootFile.Location,
locDebuggerGerm(73:0..11*16-1): BootFile.Location,
locDebugger(84:0..11*16-1): BootFile.Location,
locDebuggee(95:0..11*16-1): BootFile.Location
];
EntryType: TYPE = {space, swapUnit, stop};
SpaceClass: TYPE = {empty, unitary, family};
SwapUnitState: TYPE = {resident, residentDescriptor, swappable};
SwapUnitInfo: TYPE = MACHINE DEPENDENT RECORD [
readOnly(0:0..0): BOOL,
state(0:1..2): SwapUnitState
];
SpaceType: TYPE = MACHINE DEPENDENT RECORD [
body(0): SELECT class(0:0..1): SpaceClass FROM
empty => [fill(0:2..17B): Index ← nullIndex], -- an unused Space
unitary => [ -- a Space with no swap units.
swapUnit(0:2..17B): SwapUnitIndex -- (only swapUnit.info is significant.)
],
family => [ -- a Space tiled with swap units.
anyResidentChildren(0:2..2): BOOL,
anyResidentDescriptorChildren(0:3..3): BOOL,
anySwappableChildren(0:4..4): BOOL,
allResidentChildren(0:5..5): BOOL,
allResidentDescriptorChildren(0:6..6): BOOL,
allSwappableChildren(0:7..17B): BOOL
],
ENDCASE
];
BackingLocation: TYPE = {null, self};
EntryPointer: TYPE = LONG POINTER TO Entry;
SpaceEntryPointer: TYPE = LONG POINTER TO space Entry;
SwapUnitEntryPointer: TYPE = LONG POINTER TO swapUnit Entry;
Entry: TYPE = MACHINE DEPENDENT RECORD [
body(0): SELECT option(0:0..1): EntryType FROM
space => [
readOnly(0:2..2): BOOL,
bootLoaded(0:3..16B): BOOL,
backingStore(0:17B..17B): BackingLocation,
type(1): SpaceType,
pages(2): PrincOps.PageCount,
vmPage(4): PrincOps.PageNumber,
backingPage(6): --File.PageNumber-- LONG CARDINAL
],
swapUnit => [
info(0:2..17B): SwapUnitInfo,
parent(1): SpaceIndex,
base(2): PrincOps.PageCount, -- relative to parent.vmPage
pages(4): PrincOps.PageCount
],
stop => [fill(0:2..17B): Index ← nullIndex], -- terminates the Start List.
ENDCASE];
Procedures
h: Base;
Initialize: PROC [LONG POINTER TO Header];
Proc: TYPE = PROC [index: Index] RETURNS [stop: BOOL ← FALSE];
Enumerate: PROC [proc: Proc];
"proc" will be called for all entries except the "stop" entry.
StartListHasBeenDestroyed: ERROR;
This signal is raised by Enumerate if Destroy has been called.
Destroy: PROC RETURNS [page: PrincOps.PageNumber, count: PrincOps.PageCount];
IndexToEntryPointer: PROC [index: Index]
RETURNS [EntryPointer] = INLINE { RETURN[@h[index]] };
IndexToSpaceEntryPointer: PROC [index: SpaceIndex]
RETURNS [SpaceEntryPointer] = INLINE { RETURN[@h[index]] };
IndexToSwapUnitEntryPointer: PROC [index: SwapUnitIndex]
RETURNS [SwapUnitEntryPointer] = INLINE { RETURN[@h[index]] };
END.