mac-rom/Internal/Asm/BootEqu.a

154 lines
7.6 KiB
Plaintext
Raw Normal View History

;
; File: BootEqu.a
;
; Contains: equates for the boot time environment
;
; Copyright: <09> 1989-1994 by Apple Computer, Inc., all rights reserved.
;
; Change History (most recent first):
;
; <SM8> 2/6/94 IH Added ROM version equates.
; <SM7> 3/11/93 SAM Added sgEDiskStealFLag to boot globs that tells the MMU init
; code whether or not to steal RAM chunks from the map.
; <SM6> 2/20/93 SAM Added emuWarmStartConst - a new warmstart flag for the native
; startup code. Too bad Paula is 5 characters...
; <SM5> 8/19/92 CSS Update from Reality:
; <11> 8/18/92 DTY Change the name of BootGlobs, which is used by the ROM Start
; Manager to StartGlobals to avoid confusion with BootGlobals,
; which is used by the boot code in Boot[1-3].a.
; <SM4> 8/17/92 CCH Added scratch area in boot globs.
; <10> 7/1/92 DTY #1031401: Bump the slop in the system heap up from 44K to 64K.
; This gives a little more room for 'PACK' resource to get loaded
; when the system heap is packed down in low memory conditions.
; <9> 5/28/92 DTY #1030972: Add systemEnabledBit. 'boot' 2 will set this bit if it
; couldn<64>t find any Gibblies to boot the machine. 'boot' 3 will
; check this bit and display the <20>This disk is too old to be used
; on this Macintosh.<2E> message.
; <8> 1/23/92 KC Roll in Terror patches from BootEqu.a. Original comments follow.
; {2} 12/20/90 CCH Added defStackAddr equate.
; <7> 1/17/92 DTY Take the kROMVersion equates out of this file; they<65>re defined
; in LinkedPatchMacros.a
; <6> 1/14/92 csd Move the BootGlobals record here from BootCode.a and
; StartSystem.a so we don<6F>t have to keep the two versions in sync.
; NOTE: BootGlobals is not the same as BootGlobs!
; <5> 12/30/91 RB Added space for Edisk variables in the BootGlobals record.
; <4> 8/21/91 JSM Clean up header.
; <3> 1/30/91 gbm sab, #38: Change the <20>already including this file<6C> variable to
; all uppercase (for security reasons)
; <1.3> 5/30/89 rwh moved warm start to near top of boot globals record. Added
; bgTopOff, bgPhysicalTableOff.
; <1.2> 5/26/89 rwh renamed BootGlobs fields for consistency. Added HoleSysHeap,
; HoleLowMem.
; <1.1> 5/16/89 rwh added warm start to the boot globals record
; <1.0> 5/13/89 rwh New today
;
IF &TYPE('__INCLUDINGBOOTEQU__') = 'UNDEFINED' THEN
__INCLUDINGBOOTEQU__ SET 1
StartGlobals RECORD {sgRamTable},DECR
sgTestSpace ds.l 2 ; 2 longs for diagnostics to trash
sgRamTable equ * ; table of start/size physical RAM, -1 ended
sgMaxChunks equ 8 ; maximum # RAM chunks we can accomodate
sgWarmStart ds.l 1 ; warm start constant
sgTopOff ds.l 1 ; offset to top of boot globals area
sgAllocOff ds.l 1 ; offset to bottom of allocated area
sgPhysicalTableOff ds.l 1 ; offset to physical space table (for VM et al)
sgTotalRAM ds.l 1 ; total RAM in the system
sgPhys2Log ds.l 1 ; physical to logical offset for MMU tables
sgMMFlags ds.b 1 ; memory manager start mode flags
sgTypeMMU ds.b 1 ; type of MMU
sg24Info ds.b MMUConfigInfo ; 24 bit mode MMU info
sg32Info ds.b MMUConfigInfo ; 32 bit mode MMU info
sgRamDiskSize ds.l 1 ; size of RAM disk, if any <5> rb
sgRamDiskBase ds.l 1 ; logical base of RAM disk, if any <5> rb
sgScratch ds.l 4 ; 4 longs of scratch space <SM11>
sgEDiskStealFlag ds.b 1 ; 1 byte flag to tell INIT code to steal RAM for the EDisk <SM7>
sgAlign ds.b 1 ; alignment
sgBottom equ * ; last field
ENDR
HoleSysHeap equ $38000000 ; start of system heap when using 'black hole'
HoleLowMem equ $10000 ; real RAM space for low mem w/'black hole'
defStackAddr EQU $180000 ; start stack at 1.5M for systems with <20>2 meg {2}
; From StartSystem.a and BootCode.a: <6>
BootGlobals record -400 ; offsets from A5 for boot time globals
initialSP equ * ; value of stack pointer during boot
paramBlock ds.b 194 ; 194 parameter block for file system and driver calls
quickDrawGlobals ds.b QDGlobals ; 206 QuickDraw globals
initialA5 equ * ; this is a place holder; it must be at offset 0
quickDrawGlobalsPtr ds.l 1 ; 4 pointer to QuickDraw globals
physicalMemTop ds.l 1 ; 4 MemTop as set from diagnostics
logicalMemTop ds.l 1 ; 4 MemTop after loading VM
postBootNewPtrStartup ds.l 1 ; 4 pointer to implementation of NewPtrStartup
bufPtrLimit ds.l 1 ; 4 barrier; how low bufPtr is allowed to go
resetFlag ds.w 1 ; 2 clear if don<6F>t reset; -1 if do reset
reservedForAfterBoot ds.l 1 ; 4 minSysHeapFreeAfterBoot until launch time
ds.b 86 ; 86 padding (so we match the ROM boot code)
port ds.b portRec ; 108 GrafPort already opened by the boot code
fileName ds.b 256 ; 256 file name used by INIT file opening code
ds.b 148 ; 148 padding (so we match the ROM boot code)
initialA6 equ * ; value of A6 that the ROM boot code sets up
bootBlocks ds.b 1024 ; 1024 the boot blocks themselves
lowestBufPtr equ * ; here is the lowest that INITs can use
fileBuffer ds.b 524 ; 524 buffer used to load StartupScreen, MacsBug, etc.
size equ *-initialSP ; how big is this record, anyway?
endr
emuWarmStartConst equ 'SamB' ; Emulated Mac Warmstart constant <SM6>
processMgrCode0 equ -16470 ; resource ID of jump table for the Process Mgr.
; the following are the sizes of things
; the boot code has far-reaching responsibilities for making sure there is enough RAM
minRAMNeededToBoot equ 3*512*1024 ; 1.5 MB You just gotta have it.
; MacsBug sizes
debuggerGlobalSize equ 1*1024 ; size above BufPtr needed by MacsBug
; system heap sizes
initialSysHeapSize equ 700*1024 ; for Finder and 1 cdev
minSysHeapFreeForINIT equ 24*1024 ; minimum amount that INITs need in the system heap
minSysHeapFreeAfterBoot equ 100*1024 ; minimum amount that must remain free in system heap
sysHeapFreeSpaceSlop equ 16*1024 ; slop for MakeSysFree routine
minSysHeapFreeSpace equ 64*1024 ; this goes into emMinSysHeapFreeSpace for use by Finder & Process Mgr
; size of heap used to load INITs, script systems, and
minBootAppHeapSize equ 32*1024 ; smallest heap for INIT loading
; Process Mgr. sizes
processMgrStackSize equ 8*1024 ; stack size
minProcessMgrSpace equ 500*1024 ; stack & heap size for Finder and 1 cdev
;
elbowRoomCacheCantHave equ 400*1024 ; special-case adjustment to limit File Cache<68>s use of BufPtr <38>
systemEnabledBit equ 2 ; bit number to prevent booting the System on an unknown machine.
extensionsEnabledBit equ 5 ; bit number to disable extensions *** move to SysEqu.a?
ExtensionsEnabledByte equ $B20 ; byte to disable extensions *** move to SysEqu.a?
CurNamePtr equ CurApName+4 ; pointer to name of currently executing file
; IIci/Terror/Horror ROM minors ($67C)
kROMMajorIIci equ $67C ; IIci, Horror, Terror, Kaos
kROMMinorTERROR equ $15
kROMMinorTERROR2 equ $17 ; Zydeco's flavor of TERROR
kROMMinorDart equ $18 ; PowerBook 160,165,165c,180,180c version of HORROR.
kROMMinorSlice equ $24 ; Slice<63>s version of HORROR.
kROMMinorPO equ $26 ; Primus/Optimus HORROR.
kROMMinorEscher equ $27 ; PowerBook 270c<30>s ROM, a revision of HORROR.
kROMMinorYeager equ $29 ; Yeager<65>s flavor of HORROR.
kROMMinorBlackBird equ $30 ; BlackBird is using Kaos, which is a 2MB overpatch of HORROR.
; SuperMario ROM minors ($77D)
kROMMajorSuperMario equ $77D ; SuperMario
kROMMinorPDM equ $20 ; PDM, LAW, Cold Fusion using SuperMario.
kROMMinorSTP equ $21 ; STP using SuperMario.
ENDIF ; ...already included