-- File: YStuffers.cm - last edit:
-- BJackson.Pa         17-Feb-87  1:35:04
-- Fiala.Pa            31-Mar-87 22:59:06

-- Copyright (C) 1985, 1986, 1987 by Xerox Corporation. All rights reserved.

-- This file contains assorted stuffers and other information
-- associated with the Cedar Dlion microcode.  The product 12.2
-- microcode is on Huey:Osbu North APilot/12.2/DLionMicrocode/Private
-- and on 9/3/86 some io microcode was picked up from that place.


-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
-- 		saving state
-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 

--Obsolete method from HES
@SaveDlionDebugger.cm
@GetDlionDebugger.cm

ftp ivy dir/c <sturgis>dlion>debugger store/ua stuffers.cm EtherBootPatchCode.asm bootether.cfg bootether.burdock IOPPreEtherInitial.mc apilot100dandelion.mc preetherinitial.mc testPreEther.burdock TestPreEtherProtected.mc bootmultiether.cfg EtherInitial.mc TestEtherInitial.burdock EtherInitial.db DlionDebuggerFiles.cm junk.burdock TestBEtherInitial.burdock EtherInitialDefs.df

-- these commands depend on following files:
--	DlionDebuggerFiles.cm
--	DlionTopFiles.cm
--	DlionMicroCodeFiles.cm
--	SDDCopies.cm

-- Obsolete DF files from BJ
SModel/ap DLion-All.df DLion-APilot70.df DLion-Unknown.df

-- Current DF files not used by Cedar (??)
Domino.df		8.0 Domino
EPromMicrocode.df	8.0 EProm
FilmingMesaMicrocode.df	Slowed display for XDE system
InitialMicrocode.df	8.0 Product
MesaCPMicrocode.df	8.0 Mesa microcode from which Cedar derived
			Replaced by 12.2 file on 1/30/87
MesaMicrocode.df
MiscMicrocode.df
xMiscMicrocode.df
MultiBankMicrocode.df
xDiagMicrocode.df	11.1 diagnostic microcode? ("Moon" in names)

-- Current DF files for Cedar stuff.  Each of these stores in [Indigo]<DLion>
-- in a particular subdirectory.
PreEtherInitial.df		New 6/3/86 for PreEtherInitial
CedarInitialMicrocode.df	New 6/3/86 for Initial
CedarExtraBanks.df		New 3/6/87 Extra Banks booting code for Cedar emulator
CedarCPMicrocode.df		Cedar microcode
CedarDomino.df			New 3/6/87 Domino
CedarExtras.df			Unassigned files
RavenCedar.df			Residual Raven stuff (not used)


-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
-- 	PreEtherInitial Microcode
-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

--HES patch to burnt in code to replace boot 6 with multiple boot choice sequence.
asm8085 Defs EtherBootPatchCode BootSubs
bind8085 BootMultiEther.cfg

-- build the .db file for the boot server '6' slot
-- ***May have smashed Protected.mc with file of same name for new
-- **initial microcode smodeled on 25 July 1986.

mass PreEtherInitialProtected/o APilot100dandelion/d Protected IOPPreEtherInitial

mass PreEtherInitial/o APilot100dandelion/d PreEtherInitial

MakeDLionMicroBoot HowardsInitial.db ←  PreEtherInitialProtected.fb PreEtherInitial.fb BootMultiEther.bin


-- following is for burdock testing of PreEtherInitial
--	because burdock cannot load multiple files into CP correctly

Mass PreEtherBurdock/o APilot100dandelion/d TestPreEtherProtected IOPPreEtherInitial PreEtherInitial/t

-- following binds for test under BootEther.burdock just as BootMultiEther binds the non-test version(??)

bind BootEther


SModel PreEtherInitial.df
Ftp Cyan direc/c <Cedar7.0>Top> store/c HowardsInitial.db



-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
--	SAInitial, TridentInitial, and EtherInitial microcode
-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

--InitialProtected used by all initials
Mass InitialProtected/o Dandelion/d Boot/d Protected IOP/t

--SAx000Initial (Uses 12.1 disk microcode)
MakeDLionCpr DiskBootIOCBs.cpr ← DiskBootIOCBs.bravo

Mass SAx000Initial/o Dandelion/d DiskDLion/d Boot/d InitDLion NewDiskDLionA DiskDLionB CoreInitial SAx000Initial Recalibrate/t

MakeDLionMicroBoot InitialDiskDLion.db ← DiskBootIOCBs.cpr SAx000Initial.fb InitialProtected.fb

-- test loop code for bj/burdock

Mass SAx000InitialLooper/o Dandelion/d DiskDLion/d Boot/d InitDLion DiskDLionA DiskDLionB CoreInitial SAx000InitialLoop Recalibrate/t

MakeDLionMicroBoot InitialDiskDLionLooper.db ← DiskBootIOCBs.cpr SAx000InitialLooper.fb InitialProtected.fb


--CedarEtherInitialDLion (uses burnt in IOP code from ROMs, SAx000 disk)
Mass CedarEtherInitialDLion/o Dandelion/d Boot/d InitDLion CoreInitial EtherInitial 3/ct

MakeDLionMicroBoot CedarEtherInitialDLion.db ← CedarEtherInitialDLion.fb InitialProtected.fb


--CedarEtherInitialTriDLion (uses burnt in IOP code from ROMs, Trident disk)
Mass CedarEtherInitialTriDLion/o Dandelion/d Boot/d InitDLion CoreInitial EtherInitial 4/ct

MakeDLionMicroBoot CedarEtherInitialTriDLion.db ← CedarEtherInitialTriDLion.fb InitialProtected.fb


--TridentInitial
MakeDLionCpr TridentBootIOCBs.cpr ← TridentBootIOCBs.bravo

Mass InitialDiskTriDLion/o Dandelion/d Boot/d InitDLion TridentDLion CoreInitial TridentInitial 2/ct

MakeDLionMicroBoot InitialDiskTriDLion.db ← TridentBootIOCBs.cpr InitialDiskTriDLion.fb InitialProtected.fb

--Save initial microcode changes
Ftp Cyan direc/c <Cedar7.0>Top> store/c CedarEtherInitialDLion.db CedarEtherInitialTriDLion.db InitialDiskDLion.db InitialDiskTriDLion.db
SModel CedarInitialMicrocode.df



-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
-- 	Cedar7.0 Extra Banks Booting Patch
-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

--I retrieved [Pebbles:OSBU North]<WMicroTools>DF>IOPTools.df,
--UCodeMakeTools.df, and Mass.df to get the various tools needed for building microcode;
--maybe these should be moved to [Indigo]<DLion>.  I also retrieved
--[BamBam:OSBU North]<WMicro>DF>Domino.df and MultiBankMicrocode.df for the extra banks
--loading fixes; I did not do bringovers on these.  I manually retrieved
--[BamBam:OSBU North]<WMicro>DLion>ExtraBanksKernel.mc, BankNo0.asm, BankNo1.asm,
--IOPBoot.mc, LoadExtraBanks.asm, Bank0.cfg, Bank1.cfg, and ExtraBanksPatch.cfg.

-- Build extra banks kernel and ExtraBanksPatch
Mass ExtraBanksKernel/o Dandelion/d ExtraBanksKernel IOPBoot/a
Asm8085 BootSubs LoadExtraBanks BankNo0 BankNo1
Bind8085 ExtraBanksPatch
Bind8085 Bank0
Bind8085 Bank1
MakeDLionMicroboot EBBoot.db ← ExtraBanksKernel.fb ExtraBanksPatch.bin Bank1.bin

SModel ExtraBanks.df



-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
-- 	Cedar7.0 Domino.bin
-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

-- Derived from AsmDomino.cm of 27 Sep 84 14:29:30
Asm8085 BisyncInterrupts BisyncInput BookKeepingTask Buffer Burdock Common ↑
  CPSubs DirectFormat DmaSubs FloppyTask LSEPTask MPTask RS232CGet ↑
  RS232CInterrupts RS232CMisc RS232CPut SIOSubs Start TTYTask VoiceTask

--Derived from BindDomino.cm of 27-Sep-84 14:29:34
Bind8085 Domino.cfg
Copy DominoBind.log ← Bind8085.log

Bind8085 SmallDomino.cfg
Copy SmallDominoBind.log ← Bind8085.log

SModel CedarDomino.df



-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
-- 	Cedar7.0 Microcode SA4000, Raven, Trident, and Dicentra versions
-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

-- SAx000 bank 0
Mass Cedar0/o Dandelion/d Mesa/d EtherDLion FixedDisplay IOPMain DiskDlion/d DiskDlionA DiskDlionB CedarDefs/d StartMesa CedarB0 BlockB0 MBusB0/ta

-- SAx000 bank 1
Mass Cedar1/o Dandelion/d Mesa/d BBSubs BBInit BBLoops FixedBlock CommonSubs Jump FixedLoadStore Process Read FixedRefill Stack StringField Write FixedXfer CedarDefs/d CedarMisc CedarFpt CedarB1 MBusB1/ta

-- Finish building SAx000 Cedar microcode
MakeDLionMicroboot Cedar1.db ← Cedar1.fb Bank0.bin
MakeDLionMicroboot Cedar0.db ← Cedar0.fb Domino.bin
MakeDlionMicroboot CedarDLion.db ← EBBoot.db Cedar1.db Cedar0.db


-- Raven configuration (w/o BandBlt).  Source files are the same as
-- regular Cedar except that Raven.mc is substituted for FixedDisplay.mc;
-- also, CedarMisc.mc and StartMesa.mc have Config switches.
Mass RavenBank0/o Dandelion/d Mesa/d EtherDLion CedarRaven IOPMain DiskDLion/d DiskDLionA DiskDLionB CedarDefs/d StartMesa CedarB0 BlockB0 MBusB0/ta 1/ct

Mass RavenBank1/o Dandelion/d Mesa/d BBSubs BBInit BBLoops FixedBlock CommonSubs Jump FixedLoadStore Process Read FixedRefill Stack StringField Write FixedXfer CedarDefs/d CedarMisc CedarFpt CedarB1 MBusB1/ta 1/ct

MakeDLionMicroBoot RavenBank1.db ← RavenBank1.fb Bank0.bin
MakeDLionMicroboot RavenBank0.db ← RavenBank0.fb Domino.bin
MakeDLionMicroBoot RavenCedarDLion.db ← EBBoot.db RavenBank1.db RavenBank0.db


-- Trident bank 0
Mass TriCedarB0/o Dandelion/d Mesa/d EtherDLion FixedDisplay IOPMain TridentDLion CedarDefs/d StartMesa CedarB0 BlockB0 MBusB0/ta 2/ct

-- Trident bank 1
Mass TriCedarB1/o Dandelion/d Mesa/d BBSubs BBInit BBLoops FixedBlock CommonSubs Jump FixedLoadStore Process Read FixedRefill Stack StringField Write FixedXfer CedarDefs/d CedarMisc CedarFpt CedarB1 MBusB1/ta 2/ct

-- Finish building Trident Cedar microcode
MakeDLionMicroboot TriCedarB1.db ← TriCedarB1.fb Bank0.bin
MakeDLionMicroboot TriCedarB0.db ← TriCedarB0.fb Domino.bin
MakeDlionMicroboot CedarTriDLion.db ← EBBoot.db TriCedarB1.db TriCedarB0.db


--***THIS DICENTRA STUFF WAS ABANDONED WHEN HAL MURRAY LEFT***
-- Dicentra bank 0
Mass DicCedarB0/o Dandelion/d Mesa/d CedarDefs/d CedarB0 BlockB0/ta 7/ct

-- Dicentra bank 1
Mass DicCedarB1/o Dandelion/d Mesa/d BBSubs BBInit BBLoops FixedBlock CommonSubs Jump FixedLoadStore Process Read FixedRefill Stack StringField Write FixedXfer CedarDefs/d StartMesa CedarMisc CedarFpt CedarB1 MiscDicentraB1/ta 7/ct

-- Finish building Dicentra Cedar microcode
MakeDLionMicroboot DicCedarB1.db ← DicCedarB1.fb Bank0.bin
MakeDLionMicroboot DicCedarB0.db ← DicCedarB0.fb Domino.bin
MakeDlionMicroboot CedarDicDLion.db ← EBBoot.db DicCedarB1.db DicCedarB0.db

SModel CedarCPMicrocode.df

--This step is really done through the .df file Fiala keeps on his Dorado
--which includes various things besides the Cedar microcode.
Ftp Cyan direc/c <Cedar7.0>Top> store/c CedarDLion.db RavenCedarDLion.db TriCedarDLion.db

-- Printing template
oldprint gacha8/f CedarFpt.mc CedarDefs.df CedarMisc.mc CedarB1.mc CedarB0.mc

print gacha8/f Dandelion.dfn



-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
-- 		Updating boot servers
-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

-- Put assorted files on Dexter, all designed for the 6 boot, 20 subboot slot.
-- Look at [Dexter]Dexter.txt entries
--	DLion: Microcode 25200000120 CedarEtherInitialDLion20.db
--	DLion: Microcode 25200000130 CedarDLion20.db
--	DLion: Germ 25200000140 CedarDLion20.germ
--	Alto: 25205445201 BasicCedarDLion20.pb
-- also look at [Dexter]pupgateway.typescript to see what happened
-- Subboot 21 is for the release master, 22 for Bill Jackson, 23 for
-- Ed Fiala, 24 for Tim Diebert, and 25 for Tim Diebert.

Ftp Dexter store/c HowardsInitial.db
Ftp Dexter store/s EtherInitial.db CedarEtherInitialDLion20.db
Ftp Dexter store/s CedarDLion.db CedarDLion20.db

Ftp Cyan dir/c <Cedar7.0>Top> ret/s DLion.germ CheckSummedDLion.germ
FixChecksum CheckSummedDLion.germ
Ftp Dexter store/s CheckSummedDlion.germ CedarDLion20.germ
--There is also a procedure described in the Cedar ReleaseMaster
--documentation for fixing the checksums on the germ and bootfile.
 
Ftp Cyan dir/c <Cedar7.0>top> ret/c BasicCedarDLion.pb
Ftp Dexter store/s BasicCedarDLion.pb BasicCedarDLion20.pb

Ftp Dexter ret/c pupgateway.typescript



-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
-- 		Testing basic pilot microcode
--		and booting Cedar from Burdock
-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 

-- make sure that Cedar0.fb, Cedar1.fb, and the corresponding .st files are present
-- make up BurdockInitial.fb and BurdockInitial.st
-- then run Cedar.Burdock in the CP Panel of Burdock
 
Mass InitBurdock/o Dandelion/d Boot/d CoreInitial BurdockInitial DiskDLion/d InitDLion




-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
-- 		testing IOP patch for Cedar microcode (Obsolete)
-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

-- first assemble some needed binaries

Asm8085 Defs BootMain StartIOPBootRAM PreBootSimple AltBoot

-- build an IOP program to be loaded by Burdock that contains the patch,
-- along with the basic Boot code normally in the ROM.

Asm8085 LoadExtraBanks LoadExtraBanksX
Bind8085  BootExtra

-- build extra banks kernel as for regular PilotMicroCode

Mass ExtraBanksKernel/o ExtraBanksKernel

-- build a version of pilot microcode without the IOP patch, and with a small
-- version of Domino  (since BootExtra does not have room for the full Domino).
-- HES said this code is probably for testing the ExtraBanksPatch.bin itself.

MakeDLionMicroBoot Cedar0.db ← ExtraBanksKernel.fb CedarIO.fb
MakeDLionMicroBoot Cedar1.db ← Cedar1.fb SmallDomino.bin

MakeDLionMicroBoot SmallCedar.db ← Cedar0.db Cedar1.db

-- using Othello, place this version of Pilotmicrocode on the subject machine disk
-- then run BootSmallCedar.burdock in the IOP panel of Burdock



-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
-- 		map examination facilities
-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

mass scanMap/o  APilot100Dandelion/d ExamineMap


  
IOP has a ROM which is booted.  .asm files are sources for the IOP code.
This code brings up the numbers 0 to 6 on the MP.  It has burnt in what to do on each number.
0 = diag + reg boot
1 = disk boot
2 = floppy boot
3 = std ether boot
4 = diag + std ether boot
5 = ?
6 = HowardsInitial boot produces a subboot sequence:
	3 = old 3 (std ether boot)
	6 = old 6 (std ether alt-boot)
	20 = current system
	21 = reserved for the Cedar release master
	22 = reserved for Bill Jackson
	23 = reserved for Ed Fiala
	24 = reserved for Tim Diebert
	25..27 also available

A boot file contains many blocks, each of which says what it is and where it is supposed to go, stuff to go into IOP and stuff into uP, germ, etc.
Some of HES boot code overlays existing code.

Projects:
	PreEtherInitial (IOP + bank0 + bank1)
 	Initial (SAx000, Trident, and Ether) (IOP + bank0 + bank1) U reg init + storage init + map init; no other testing
	Cedar microcode ((IOP code = Domino + multibankbooting code) + bank0 + bank1 + ...)
	Domino
	Germ

Each piece of microcode is generally built in several fragments: assemble each fragment then combine.  Each fragment has a file with "protected" in name which reserves space that should not be overwritten.  During the booting process the IOP and the microcoprocessor change control frequently to allow uP to do refresh as well as to do work.  IOP puts special microcode into protected areas of microstore.  Basic IOP loop for loading microcode checks for instructions that would be loaded into the protected area and defers loading of those areas; after all loading, code outside the protected area transfers control to the kernel to load the final stuff into what was previously the protected area; the final code which does the loading is called the kernel.  Other protected regions...