Lowest level interface to booting facilities
Booting.mesa
Andrew Birrell June 27, 1983 11:39 am
DIRECTORY
MicrocodeBooting USING[ BootFileNumber, MicrocodeType, nullBootFileNumber ],
File USING[ FP, nullFP, PageNumber, VolumeID, nullVolumeID ],
GermSwap USING[ defaultSwitches, Switches ];
Booting: CEDAR DEFINITIONS =
BEGIN
Beware: clients should not call this interface directly if running in a world that contains the Cedar abstract machine implementation (particularly WorldVM and AMEventsImpl). In that case, use AMEvents.Boot. Otherwise, you will fail to cause an outload if you're running in a world-swap debugger.
Switches: TYPE = GermSwap.Switches;
switches: READONLY Switches;
The switches with which we were booted. Get them here in preference to GermSwap.
defaultSwitches: GermSwap.Switches = GermSwap.defaultSwitches;
MicrocodeType: TYPE = MicrocodeBooting.MicrocodeType;
= { altoMesa, lisp, smalltalk76, smalltalk80, pilotMesa, cedarMesa }
BootFileNumber: TYPE = MicrocodeBooting.BootFileNumber;
BootFile: TYPE = RECORD[file: File.FP, firstPage: File.PageNumber ← [0]];
nullMicrocode: BootFileNumber = MicrocodeBooting.nullBootFileNumber;
nullBootFile: BootFile = [file: File.nullFP];
Bootee: TYPE = RECORD[
SELECT type: * FROM
bootButton => NULL,
microcode => [ bfn: BootFileNumber ← nullMicrocode ],
physical => [ volume: File.VolumeID ← File.nullVolumeID ],
logical => [ volume: File.VolumeID ← File.nullVolumeID ],
file => [ file: BootFile ],
inload => [ file: BootFile ],
none => NULL,
ENDCASE ];
Boot: PROC[boot: Bootee, switches: Switches ← defaultSwitches, outload: BootFile ← nullBootFile];
Performs boot.
If "outload" is not null, first outloads to specified place. Note that in this case, this procedure is a subroutine - it will return after the corresponding inload (immediately if boot=[none[]]).
"switches" is ignored by some variants. (Today, "bootButton" and "microcode".)
Variant "bootButton" emulates pressing the physical boot button
Variant "microcode" boots new microcode. Default will use installed disk microcode.
Variant "physical" boots from the physical volume containing page 0 of "volume"
Variant "file" boots from the specified file (first makes the file bootable).
Variant "logical" boots from the specified logical volume.
Variant "inload" inloads the specified outload file
Defaulted volume means the current system volume.
GetBootFileNumber: PROC[MicrocodeType] RETURNS[BootFileNumber];
Returns the BootFileNumber of the specified microcode for this machine and (in the case of pilotMesa or cedarMesa) for the release of Pilot currently running on this machine. Returns nullBootFileNumber if no such microcode is known to exist.
END.