DMA Operations
DMAState: TYPE = {active, inactive};
SetDMAState:
PROC [dMAState: DMAState];
DMAMode: TYPE = {printer, display, versatecOneShot, versatecStream};
SetDMAMode: PUBLIC PROC [dMAMode: DMAMode];
DMAAddressRegisterLoad:
PROC [ byteAddress:
CARD32 ];
The starting address will be byteAddress troncated to closest 64 bits word bondary. => It is strongely recommanded to start any DMA buffer on a 64 bits word bondary
Map Access
VMSpaceName: TYPE = {dMA, iOP, cP, sparcUserData, sparcUserProgram, sparcSuperData, sparcSuperProgram};
VMSpace:
TYPE =
RECORD [
name: VMSpaceName,
task: CARD32 ← 0
];
Flags:
TYPE =
RECORD [
dirty: BOOLEAN ← FALSE,
referenced: BOOLEAN ← FALSE,
readOnly: BOOLEAN ← FALSE,
nonCachable: BOOLEAN ← FALSE,
interrupt: BOOLEAN ← FALSE
];
MapEntry:
TYPE =
RECORD [
flags: Flags,
vMSpace: VMSpace,
virtualAddressByte: CARD32,
realAddressByte: CARD32
];
Exact layout of the bits inside a map entry:
MapEntryConcrete:
TYPE =
MACHINE
DEPENDENT
RECORD [
dirty: BOOLEAN,
referenced: BOOLEAN,
readOnly: BOOLEAN,
nonCachable: BOOLEAN,
interrupt: BOOLEAN,
task: BYTE,
virtualPageHiHi: [0..7H], -- 3 bits,
virtualPageHiLow: [0..3H], -- 2 bits,
trash: BOOL,
realPage: [0..1FFFH] -- 13 bits
];
WriteMapEntry:
PROC [mapEntry: MapEntry];
ReadMapEntry:
PROC [ mapEntry: MapEntry ]
RETURNS [ oldMapEntry: MapEntry ];
The map is a in fact a cache. The space can be occupied by another entry.
Memory configuration
MemoryConfig: TYPE = ARRAY [0..7] OF BOOLEAN;
MemoryConfigPointer: TYPE = LONG POINTER TO MemoryConfig;
FindMemoryConfig:
PROC [memoryConfigPointer: MemoryConfigPointer];
The SparcSoftcard holds from 1 to 8 banks of 8 MegaBytes of DRAM. This procedure tests witch bank is present. A boolean is TRUE it the bank is present.
}.