BootStartList.mesa
Copyright © 1985 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
Doug Wyatt, February 22, 1985 5:49:57 pm PST
DIRECTORY
BootFile USING [Location],
PrincOps USING [ControlModule, PageCount, PageNumber, Priority],
SystemVersion USING [Date, MachineType, 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): CARDINAL,
release(1): SystemVersion.ReleaseNumber,
buildDate(4): SystemVersion.Date,
requiredUCode(6): ARRAY SystemVersion.MachineType OF SystemVersion.Date,
controlList(14): PrincOps.ControlModule,
initLoadState(15): SwapUnitIndex,
mdsBase(16): PrincOps.PageNumber,
pdaPages(18): PrincOps.PageCount,
stateVectorCounts(20): StateVectorCounts,
stateVectorSize(28): CARDINAL,
nProcesses(29): CARDINAL,
lastVMPage(30): PrincOps.PageNumber,
lastBootLoadedPage(32): PrincOps.PageNumber,
switches(34): Switches,
The following four fields are for early linkage to a world-swap debugger before the file system is able to find one.
locDebuggerMicrocode(38): BootFile.Location,
locDebuggerGerm(49): BootFile.Location,
locDebugger(60): BootFile.Location,
locDebuggee(71): 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.