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 May 24, 1983 10:05 am
DIRECTORY
BasicLoadStateFormat USING [ConfigIndex, nullConfig],
BcdDefs USING [SPHandle],
BootStartList USING [SwapUnitIndex, SwapUnitInfo],
Segments USING [FHandle, SHandle];
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 = REF Object;
DataSeg: TYPE = REF data Object;
CodeSeg: TYPE = REF code Object;
FileSeg: TYPE = REF file Object;
BIndex: TYPE = BasicLoadStateFormat.ConfigIndex;
nullIndex: BIndex = BasicLoadStateFormat.nullConfig;
Object: TYPE = RECORD [
base: Base,
pages: Pages,
index: BootStartList.SwapUnitIndex,
info: BootStartList.SwapUnitInfo ← [readOnly: TRUE, state: swappable],
bootLoaded: BOOLEANFALSE,
body: SELECT objType: ObjectType FROM
data => [],
code => [
file: Segments.FHandle,
fileBase: CARDINAL,
segment: Segments.SHandle,
sph: BcdDefs.SPHandle,
shared: BOOLEANFALSE
],
file => [
file: Segments.FHandle,
fileBase: CARDINAL,
segment: Segments.SHandle,
bIndex: BIndex,
nUnits: CARDINAL ← 1
],
ENDCASE
];
ObjectType: TYPE = {data, code, file};
Segs: TYPE = REF SegsSequence;
SegsSequence: TYPE = RECORD[SEQUENCE length: NAT OF Seg];
From MBVMemory
Direction: TYPE = {up, down};
AllocData: PROC [base: Base, pages: Pages, dir: Direction ← down] RETURNS [DataSeg];
AllocMDSData: PROC [base: Base, pages: Pages, dir: Direction ← down] RETURNS [DataSeg];
AllocCode: PROC [
file: Segments.FHandle, base: Base, pages: Pages, fileBase: CARDINAL, sph: BcdDefs.SPHandle]
RETURNS [CodeSeg];
AllocFile: PROC [file: Segments.FHandle, base: Base, pages: Pages, fileBase: CARDINAL]
RETURNS [FileSeg];
SortSegs: PROC RETURNS [Segs];
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.