MBVM.mesa
Last edited by Sandman on 16-Feb-81 15:37:15
Last edited by Lewis on 17-Sep-81 11:50:14
Last edited by Levin on April 5, 1983 2:00 pm
DIRECTORY
BcdOps USING [SPHandle],
PilotLoadStateFormat USING [ConfigIndex, NullConfig],
Segments USING [FHandle, SHandle],
StartList USING [SwapUnitIndex, SwapUnitInfo];
MBVM: DEFINITIONS =
BEGIN
DefaultFile: Segments.FHandle = NIL;
Base: TYPE = CARDINAL; -- VM page number
Pages: TYPE = CARDINAL;
DefaultBase: Base = LAST[Base];
Code: Base = LAST[Base]-1;
First64K: Base = LAST[Base]-2;
MDS: Base = LAST[Base]-3;
HyperSpace: Base = LAST[Base]-4;
MaxBase: Base = LAST[Base]-5; -- largest usable VM page number
Seg: TYPE = LONG POINTER TO Object;
DataSeg: TYPE = LONG POINTER TO data Object;
CodeSeg: TYPE = LONG POINTER TO code Object;
FileSeg: TYPE = LONG POINTER TO file Object;
BIndex: TYPE = PilotLoadStateFormat.ConfigIndex;
nullIndex: BIndex = PilotLoadStateFormat.NullConfig;
Object:
TYPE =
RECORD [
link: Seg,
seal: [0..1777B] ← ObjectSeal,
bootLoaded: BOOLEAN ← FALSE,
index: StartList.SwapUnitIndex,
info: StartList.SwapUnitInfo ← [readOnly: TRUE, state: swappable],
base: Base,
pages: Pages,
body:
SELECT objType: ObjectType
FROM
data => [],
code => [
file: Segments.FHandle,
fileBase: CARDINAL,
segment: Segments.SHandle,
sph: BcdOps.SPHandle,
shared: BOOLEAN ← FALSE
],
file => [
file: Segments.FHandle,
fileBase: CARDINAL,
segment: Segments.SHandle,
bIndex: BIndex,
nUnits: CARDINAL ← 1
],
ENDCASE
ObjectType: TYPE = {data, code, file};
ObjectSeal: [0..1777B] = 1235B;
From MBVMemory
Direction: TYPE = {up, down};
AllocData: PROC [base: Base, pages: Pages, dir: Direction ← down] RETURNS [s: DataSeg];
AllocMDSData: PROC [base: Base, pages: Pages, dir: Direction ← down] RETURNS [s: DataSeg];
AllocCode:
PROC [
file: Segments.FHandle, base: Base, pages: Pages, fileBase: CARDINAL, sph: BcdOps.SPHandle]
RETURNS [s: CodeSeg];
AllocFile:
PROC [file: Segments.FHandle, base: Base, pages: Pages, fileBase:
CARDINAL]
RETURNS [s: FileSeg];
SortSegs: PROC RETURNS [LONG DESCRIPTOR FOR ARRAY OF Seg];
ReleaseCodeSegs: PROC;
PointerFromSeg: PROC [s: Seg] RETURNS [p: POINTER];
LongPointerFromSeg: PROC [s: Seg] RETURNS [p: LONG POINTER];
SegFromPointer: PROC [p: POINTER] RETURNS [s: Seg];
SegFromLongPointer: PROC [p: LONG POINTER] RETURNS [s: Seg];
From MBCache
GetPage: PROC [page: Base] RETURNS [p: LONG POINTER];
MDS-relative reads and writes
Read: PROC [p: POINTER] RETURNS [v: UNSPECIFIED];
Write: PROC [p: POINTER, v: UNSPECIFIED];
CopyRead: PROC [from, to: POINTER, nwords: CARDINAL];
CopyWrite: PROC [from, to: POINTER, nwords: CARDINAL];
VM-relative reads and writes
LongRead: PROC [p: LONG POINTER] RETURNS [v: UNSPECIFIED];
LongWrite: PROC [p: LONG POINTER, v: UNSPECIFIED];
LongCopyRead: PROC [from: LONG POINTER, to: LONG POINTER, nwords: CARDINAL];
LongCopyWrite: PROC [from: LONG POINTER, to: LONG POINTER, nwords: CARDINAL];
END.