-- File: YStuffers.cm - last edit:
-- BJackson.Pa         18-Dec-85 18:15:36
-- Fiala.Pa            19-Nov-86 17:58:47

-- Copyright (C) 1985, 1986 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
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.
CedarExtras.df			Unassigned files
RavenCedar.df			Residual Raven stuff (not used)
CedarCPMicrocode.df		Cedar microcode and extra banks patch
CedarInitialMicrocode.df	New 6/3/86 for Initial
PreEtherInitial.df		New 6/3/86 for PreEtherInitial


-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
--	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 not yet in the Cedar emulator)
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


--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 <Cedar6.1>Top> store/c CedarEtherInitialDLion.db CedarEtherInitialTriDLion.db InitialDiskDLion.db InitialDiskTriDLion.db
SModel CedarInitialMicrocode.df



-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
-- 	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 <Cedar6.1>Top> store/c HowardsInitial.db



-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
-- 	Cedar6.1 Microcode SA4000, Raven, Trident, and Dicentra versions
-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

-- Build extra banks kernel and ExtraBanksPatch
Mass ExtraBanksKernel/o ExtraBanksKernel
Asm8085 BootSubs LoadExtraBanks
Bind8085 ExtraBanksPatch

-- SAx000 bank 0
Mass CedarIO/o Dandelion/d Mesa/d EtherDLion FixedDisplay IOPMain DiskDlion/d DiskDlionA DiskDlionB CedarDefs/d 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 StartMesa CedarMisc CedarFpt CedarB1 MBusB1/ta

-- Finish building SAx000 Cedar microcode
MakeDLionMicroboot CedarIO.db ← ExtraBanksKernel.fb CedarIO.fb ExtraBanksPatch.bin
MakeDLionMicroboot Cedar1.db ← Cedar1.fb Domino.bin
MakeDlionMicroboot CedarDLion.db ←  CedarIO.db Cedar1.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 CedarB0 BlockB0 MBusB0/ta

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

MakeDLionMicroboot RavenBank0.db ← ExtraBanksKernel.fb RavenBank0.fb ExtraBanksPatch.bin
MakeDLionMicroBoot RavenBank1.db ← RavenBank1.fb Domino.bin
MakeDLionMicroBoot RavenCedarDLion.db ← RavenBank0.db RavenBank1.db


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

-- 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 StartMesa CedarMisc CedarFpt CedarB1 MBusB1/ta 2/ct

-- Finish building Trident Cedar microcode
MakeDLionMicroboot TriCedarB0.db ← ExtraBanksKernel.fb TriCedarB0.fb ExtraBanksPatch.bin
MakeDLionMicroboot TriCedarB1.db ← TriCedarB1.fb Domino.bin
MakeDlionMicroboot CedarTriDLion.db ←  TriCedarB0.db TriCedarB1.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

-- 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 DicCedarB0.db ← ExtraBanksKernel.fb DicCedarB0.fb ExtraBanksPatch.bin
MakeDLionMicroboot DicCedarB1.db ← DicCedarB1.fb Domino.bin
MakeDlionMicroboot CedarDicDLion.db ←  DicCedarB0.db DicCedarB1.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 <Cedar6.1>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, and 24 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 <Cedar6.1>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 <Cedar6.1>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 CedarIO.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 CedarIO.db ← ExtraBanksKernel.fb CedarIO.fb
MakeDLionMicroBoot Cedar1.db ← Cedar1.fb SmallDomino.bin

MakeDLionMicroBoot SmallCedar.db ← CedarIO.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 = ?
3 = ?
4 = ?
5 = ?
6 = HowardsInitial boot produces a subboot sequence:
	3 = old 3
	6 = old 6
	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
	26..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...