SparcSoftcardOps.Mesa
Copyright Ó 1988 by Xerox Corporation. All rights reserved.
Bill Jackson (bj) April 19, 1988 1:56:49 am PDT
Christophe Cuenod September 7, 1988 9:52:08 am PDT
DIRECTORY
SparcSoftcard;
SparcSoftcardOps: CEDAR DEFINITIONS ~ {
OPEN SparcSoftcard;
Initialization Operations
SoftcardPresent: PROC RETURNS [ present: BOOL ];
InitializeCPandIOPMaps: PROC;
InsertSoftcardPhyscialMemory: PROC [ reclaim: PROC [ real: CARD16 ] ];
InitializeSoftcard: PROC [ reclaim: PROC [ real: CARD16 ] ];
ResetSoftcard: PROC;
Sparc Operations
SparcReset: PROC;
SparcResetAndStart: PROC;
Cache Operations
SparcCacheDisable: PROC;
SparcCacheEnable: PROC;
SparcCacheFlushAndEnable: PROC;
To be removed
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 ];
Flags: TYPE = RECORD [
dirty: BOOLEAN,
referenced: BOOLEAN,
readOnly: BOOLEAN,
nonCachable: BOOLEAN,
interrupt: BOOLEAN
];
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.
}.