-- OthelloOps.mesa (last edited by: Forrest on: July 26, 1980 7:35 PM)
-- Operations usfull to volume utilities.
DIRECTORY
Device USING [Type],
File USING [Capability, PageNumber],
PhysicalVolume USING [Handle, ID, PageNumber],
TemporaryBooting USING [Switches],
Volume USING [ID, nullID, PageCount];
OthelloOps: DEFINITIONS =
BEGIN
-- Convert a string into Switches for booting.
BadSwitch: SIGNAL [c: CHARACTER]; -- ignores character if resumed
DecodeSwitches: PROC [
switchString: STRING] RETURNS [switches: TemporaryBooting.Switches];
-- logical volume must be closed
VolumeNotClosed: ERROR;
DeleteTempFiles: PROCEDURE [Volume.ID];
-- returns total size, ignoring reserved spaces, etc.
GetDriveSize: PROC [
h: PhysicalVolume.Handle] RETURNS [nPages: LONG CARDINAL];
-- There are four types of boot files. Clients may create as many of each type as they wish.
BootFileType: TYPE = {hardMicrocode, softMicrocode, germ, pilot};
-- Prepare (or undo) chains for making a file bootable. The file must be writable and permanent, and its logical volume must be open for either operation. There is no need to remove bootlinks merely to delete a file. Boot links should be removed before any increase or decrease in the size of a file, and reinstalled after the operation.
MakeBootable, MakeUnbootable: PROC [
file: File.Capability, type: BootFileType, firstPage: File.PageNumber];
-- For each logical and physical volume clients may indicate one of each type of boot files to comprise the "default" boot files. These operations set the file to be that default for the logical (physical) volume that it resides on. The file’s logical volume must be open to allow Pilot to access internal pointers.
SetVolumeBootFile, SetPhysicalVolumeBootFile: PROC [
file: File.Capability, type: BootFileType, firstPage: File.PageNumber];
-- Return information last set by the previous operations. The logical volume need not be opened for this operation; however, desired logical or physical volume must be online.
GetVolumeBootFile: PROC [lvID: Volume.ID, type: BootFileType]
RETURNS [cap: File.Capability, firstPage: File.PageNumber];
GetPhysicalVolumeBootFile: PROC [
pvID: PhysicalVolume.ID, type: BootFileType]
RETURNS [cap: File.Capability, firstPage: File.PageNumber];
-- Forget about a BootFile. lvID must be Open; pvID must be online.
VoidVolumeBootFile: PROC [lvID: Volume.ID, type: BootFileType];
VoidPhysicalVolumeBootFile: PROC [
pvID: PhysicalVolume.ID, type: BootFileType];
-- Install debugger pointers int the debugee’s boot file. This makes it possible to go to the debugger VERY early in initialization (key stop 0). Debugee’s logical volume must be open, and debuggeeCap must support writing.
setDebuggerSuccess: TYPE = {
success, nullBootFile, noDebugger, cantWriteBootFile, notInitialBootFile,
cantFindStartListHeader, startListHeaderHasBadVersion, other};
SetDebugger: PROC [
debuggeeCap: File.Capability, debuggeeFirstPage: File.PageNumber,
debugger: Volume.ID, debuggerType: Device.Type,
debuggerOrdinal: CARDINAL]
RETURNS [setDebuggerSuccess];
-- Find out physical layout of subvolumes on the physical Volume
LogicalVolumePageNumber: TYPE = LONG CARDINAL;
SubVolume: TYPE = RECORD [
lvID: Volume.ID, subVolumeSize: Volume.PageCount,
firstLVPageNumber: LogicalVolumePageNumber,
firstPVPageNumber: PhysicalVolume.PageNumber];
nullSubVolume: SubVolume = [Volume.nullID, 0, 0, 0];
GetNextSubVolume: PROC [pvID: PhysicalVolume.ID, thisSv: SubVolume]
RETURNS [nextSV: SubVolume];
SubVolumeUnknown: ERROR [sv: SubVolume];
END...
LOG
Time: July 13, 1980 7:17 PMBy: ForrestAction: Create from old OthelloOps and Old OthelloInternalInterface