SparcSoftcardOps.Mesa
Copyright Ó 1988 by Xerox Corporation. All rights reserved.
Bill Jackson (bj) April 19, 1988 1:56:49 am PDT
Christophe Cuenod September 12, 1988 9:34:53 am PDT
DIRECTORY
SparcSoftcard;
SparcSoftcardOps: CEDAR DEFINITIONS ~ {
OPEN SparcSoftcard;
Sparc Operations
SparcReset: PROC;
SparcResetAndStart: PROC;
Cache Operations
SparcCacheDisable: PROC;
SparcCacheEnable: PROC;
Should not be implemented in cedar. Only the Sparc is allowed to enable his cache after making shure he flushed everything.
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: BOOLEANFALSE,
referenced: BOOLEANFALSE,
readOnly: BOOLEANFALSE,
nonCachable: BOOLEANFALSE,
interrupt: BOOLEANFALSE
];
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.
}.