SparcSoftcard.Mesa
Copyright Ó 1988 by Xerox Corporation. All rights reserved.
Bill Jackson (bj) April 17, 1988 1:54:04 pm PDT
Christophe Cuenod September 7, 1988 11:12:09 am PDT
This interface holds the hardware dependant constants of the SparcSoftcard. All the peripherals devices addresses will be are here.
SparcSoftcard: CEDAR DEFINITIONS ~ {
Quick overview of the SparcSoftcard resources
The SparcSoftcard provides to each of the machine's 3 processors (CP, IOP and Sparc) two basic resources:
Local memory: Each processor as its own map and is using its own virtual address space or set of virtual address spaces.
Local peripherals: All low level actions on the SparcSoftcard hardware are performed via those peripherals (ie: enabling the Sparc cache...). The VM maps entries can be read or written this way.
Local Memory
Can be 8, 16, 32 or 64 MegaBytes.
- In the current software implementation a part of this memory is used as memory extension for the Cedar system running on the CP. This Cedar memory is defined as follow:
cedarMemoryStartByteAddress: CARD32 ~ 0H;
Real address of the Cedar extension memory inside the SparcSoftcard.
cedarMemoryByteSize: CARD32 ~ 200000H;
Size of the Cedar extension memory.
- The remaining of the memory can be used as Sparc memory. A small amount of it is still visible from the CP and IOP. It is called Backdoor and is used as communication area. Any page of this Backdoor can be set to point anywhere in the Sparc memory. This feature will allow in the future direct IO communications.
Local peripherals
Every peripheral in the SparcSoftcard can be reached by any of the machine's 3 processors. They have all equal rights. The exclusion is only enforced by the arbiter to the internal Softcard Bus.
For the CP (6085 mesa processor) and the IOP all the peripherals look as memory mapped IOs.
For the Sparc all the peripherals are found in an alternate address space (special ASI)
Some Base values.
IOs
IOBaseByte : CARD32 ~ 0380000H;   -- 3.5 Meg
Cedar side
cedarMemoryExtensionBaseByte: CARD32 ~ 0180000H; -- 1.5 Meg
Base of the MemoryExtension address in 6085 real address.
cedarMemoryExtensionSizeByte: CARD32 ~ 0200000H; -- 2.0 Meg
Size of the MemoryExtension.
cedarBackDoorBaseByte: CARD32 ~ 03C0000H;  -- 3.75 Meg
Base of the Backdoor memory in 6085 real address
cedarMemoryEndByte: CARD32 ~ 0400000H;  -- 4.0 Meg
End of 6085 real address
Sparc side
sparcIOASI: CARD16 ~ 080H;
sparcMapBaseByte : CARD32 ~ 0H;
Map Description
The softcard internal bus carries Virtual addresses. Each bus master has one or more virtual address space. The map translates all the virtual addresses into real addresses. => The mapping mechanism is uniform for everybody.
The map is dual ported.
During regular memory accesses it translates the addresses.
Each entry can be read or written during IO accesses.
In this mode the amount of IO space needed to access all the entries is too big for the CP or IOP. A mapPage register as been implemented and holds the high order bits of the map entry address, thus "folding" the map and reducing the amount of space needed. This map register is unique. Care must be taken to avoid access to the "folded" version of the map by two processors at the same time.
The Sparc's IO space is big enough to hold the "unfolded" version of the map. For the sake of decoding simplicity the "folded" version is also available to the Sparc.
Map page size.
softcardPageSizeByte: CARD32 ~ 02000H;
This size was chosen to be compatible with Sun implementations of the Sparc. Keep in mind that this is 16 times bigger than the current 6085 or dorado page size.
map (Unfolded version of the map)
map is a array of records. Each record contains one entry.
mapBaseByteOffset: CARD32 ~ 0H;
mapBaseByte: CARD32 ~ mapBaseByteOffset + sparcMapBaseByte;
mapWindowIndexRegister
When the folded version of the map is accessed mapWindowIndexRegister holds the 5 most significant bits of the map entry number. At any given moment only a "window" of 2048 entries can be reached.
mapPageRegister is Write only
mapWindowIndexRegisterByteOffset: CARD32 ~ 04407H;
mapWindowIndexRegisterByte: CARD32 ~ IOBaseByte + mapWindowIndexRegisterByteOffset;
mapWindow (Folded version of the map)
mapWindow is a window [2048 entry] onto the sparc softcard map. The window is controlled via the mapPageRegister.
mapEntriesPerWindow: CARD16 ~ 2048;
mapWindowBaseByteOffset: CARD32 ~ 08000H;
mapWindowBaseByte: CARD32 ~ IOBaseByte + mapWindowBaseByteOffset;
mapEntry
Each map entry is composed of 2 non contiguous 16 bits words.
mapEntryHighByteOffset: NAT ~ 6;
mapEntryLowByteOffset: NAT ~ 0EH;
mapEntrySizeByte: NAT ~ 010H;
Task Register
The task register holds a byte identifying the current user process running on the Sparc. This identifier is used inside the cache to discriminate data. It is used also in the map.
tRegisterByteOffset: CARD32 ~ 04C07H;
tRegisterByte: CARD32 ~ IOBaseByte + tRegisterByteOffset;
tRegisterAlternateByte: CARD32 ~ IOBaseByte + tRegisterByteOffset + alternatePathByteOffset;
During power up of the machine this register is also used to test the presence of the Softcard.
alternatePathByteOffset: CARD32 ~ 10000H;
Due to decoding, the peripheral registers of the softcard appear at two different locations
Control and Status bits
Command bits appear as one bit read/write registers. They are set or reset individualy by a write at their address. Their state can be read at any time.
commandBitMask: CARD16 ~ 01H;
A command bit is the low order bit of the word(LSB)
Polarity: TYPE = {ActiveLow, ActiveHigh};
Sparc Reset
sparcResetPolarity: Polarity ~ ActiveLow;
sparcResetRegisterByteOffset: CARD32 ~ 04637H;
sparcResetRegisterByte: CARD32 ~ IOBaseByte + sparcResetRegisterByteOffset;
Sparc Cache Enable
sparcCacheEnablePolarity: Polarity ~ ActiveLow;
sparcCacheEnableRegisterByteOffset: CARD32 ~ 04A0FH;
sparcCacheEnableRegisterByte: CARD32 ~ IOBaseByte + sparcCacheEnableRegisterByteOffset;
DMA Enable
dMAActivePolarity: Polarity ~ ActiveHigh;
dMAActiveRegisterByteOffset: CARD32 ~ 04827H;
dMAActiveRegisterByte: CARD32 ~ IOBaseByte + dMAActiveRegisterByteOffset;
DMA Mode
dMAMode0Polarity: Polarity ~ ActiveHigh;
dMAMode0RegisterByteOffset: CARD32 ~ 0482FH;
dMAMode0RegisterByte: CARD32 ~ IOBaseByte + dMAMode0RegisterByteOffset;
dMAMode1Polarity: Polarity ~ ActiveHigh;
dMAMode1RegisterByteOffset: CARD32 ~ 04837H;
dMAMode1RegisterByte: CARD32 ~ IOBaseByte + dMAMode1RegisterByteOffset;
DMA Address registers
The starting address of the DMA is held is this pair of registers. They are Write only.
Each time one of those registers is written the new value is loaded into the DMA address counter.
If DMA mode is display the content of those registers is loaded into the DMA address counter during vertical retrace.
dMAAddressRegisterHighByteOffset: CARD32 ~ 04006H;
dMAAddressRegisterHighByte: CARD32 ~ IOBaseByte + dMAAddressRegisterHighByteOffset;
dMAAddressRegisterLowByteOffset: CARD32 ~ 04206H;
dMAAddressRegisterLowByte: CARD32 ~ IOBaseByte + dMAAddressRegisterLowByteOffset;
Display Parameters
The SparcSoftcard Display mimics the 6085 19" display.
The few differences are:
- To keep the design simple the horizontal retrace is a multiple of 64 bits words (this is not the case in the 6085) => slight change in the appearence of the left side of the screen. It can be compensated by adjusting the horizontal amplifier gain and offset.
- The number of pixels displayed and the sweep frequencies are the same than in the 6085 but the but there is no border. => The bitmap is slightly bigger and is perimeter has to be filled by the pattern you want in order to simulate a border.
- There is NO hardware cursor.
- When a bit is set it appears white on the screen (0 => black, 0FFFFH => white).
Address of the bitmap
The DMA counter counts "DMA virtual addresses" => the bitmap can be located anywere in scattered pages of the SparcSoftcard physical memory. The byte value of the starting virtual address has to be 0 (MOD 8)
Parameters of the bitmap
There is only 2 real hardware constants.
bitMapLineLengthByte: CARD32 ~ 152;
bitMapLineNumber: CARD32 ~ 925;
Some other constants can be defined to simulate a 6085 display
leftBorderLengthByte: CARD32 ~ 4;
activeLineLengthByte: CARD32 ~ 144;
rightBorderLengthByte: CARD32 ~ bitMapLineLengthByte - leftBorderLengthByte - activeLineLengthByte;
topBorderLineNumber: CARD32 ~ 32;
activeLineNumber: CARD32 ~ 861;
bottomBorderLineNumber: CARD32 ~ bitMapLineNumber - topBorderLineNumber - activeLineNumber;
}.