4

While digging through a classic Mac 68k disassembly I got to the point where I need to know more about the "Boot Globals" residing in lowmem's system global variables.

BootGlobPtr lives at $DDC, that's for sure, and it points to different locations on different machines - that's what a pointer was meant for.

So far so good, but what's the structure of the data living there? Here's some sample of its usage:

MOVEA.L BootGlobPtr,A1  ; $DDC points to $04FFFFE4 on a SE/30, $04FFFFF4 on IIci
ADDA.L  -16(A1),A1     
MOVE.L  20(A1),D0

Besides some Emulator source, I can't find anything on the web providing more insight... Does anyone in here have a hint or can remember where to look it up?

Cheers and thanks for helping!

2 Answers 2

4

The structure of StartGlobals (aka BootGlobs) is not publicly documented. However, a widely disseminated leak of System 7.1 source code includes the following definition of the structure in Internal/Asm/BootEqu.a. As best I can tell, this information is primarily used in the early boot process and in certain low-level drivers.

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

The MMUConfigInfo structure referenced in sg24Info and sg32Info is, in turn, defined as follows in Internal/Asm/MMUEqu.a:

MMUConfigInfo   RECORD  0               ; MMU configuration info
theCRP          ds.l    1               ;    start of the 64-bit CRP on 020/030's           <4>
theSRP          ds.l    1               ;    start of the 32-bit SRP on 040's               <4>
theTC           ds.l    1               ;    the TC (Translation Control Register) value
                                        ;    (the lsw contains the TC on a 68040)           <3>
theTT0          ds.l    1               ;    the {I}TT0 (Transparent Translation Reg 0) value
theTT1          ds.l    1               ;    the {I}TT1 (Transparent Translation Reg 1) value
MMUInfoSize     equ     *-MMUConfigInfo ;    size of an MMU info record
                ENDR
2

Your description leaves me a little confused about the global variables you are actually searching for. Code in the ROM sets up a whole bunch of global values, and these are only sparsely documented.

This archived copy of the Mac Almanac II lists all the global variables. The original source of this information is the Linux/m68k for Mac project.

2
  • The one in Italic, "BootGlobPtr" (@ 0xDDC). It's not documented in the Mac Almanac 2 which ends as 0xDA0...
    – Axel Muhr
    Commented Mar 4, 2018 at 19:10
  • In the meantime I learned that in ~1992 they changed the name of BootGlobs into StartGlobals to avoid confusion with BootGlobals (which is indeed another thing).
    – Axel Muhr
    Commented Mar 4, 2018 at 19:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .