Subject: Re: Mode32
To: Eric Damien Berna <eric@thiel.com>
From: Wonko the Sane (Brian Hechinger) <wonko@users.tmok.com>
List: port-mac68k
Date: 11/12/1999 17:57:35
Eric Damien Berna drunkenly mumbled...
> 
> Although Apple was far sighted enough to know that the century will 
> end, they weren't far sighted enough to know that the Mac OS would 
> use more that 8 Megs of RAM.  The initial Mac OS used 24 bit memory 
> addressing, but stored address in 32 bit words.  The extra byte was 
> used for flags indicating what type of memory was at that address, (a 
> pointer, a handle, the status of the memory at that handle, etc.). 
> Apple told developers not to manipulate those flags directly, but use 
> special routines.  Later, if the system went 32 bit, the routines 
> would still work, storing the information somewhere else.

smart thinking.

> Of course Apple didn't follow it's own guidelines, and directly 
> manipulated those flags.

which is usually what happens to good thinking, it's never used correctly.

> Apple embedded a large amount of code into the ROM on older machines 
> (they've gotten away from that lately).  Some of the code in ROM 
> directly manipulates the extra bye of 24 bit addresses, so it breaks 
> in 32 bit mode.  Connetix analyzed the code in the ROMs, patched the 
> routines that break in 32 bit mode, and developed code that puts 
> those computers into 32 bit mode.  That's what Mode32 does.

so it cleans up after Apple. (Good Housekeeping article available?? *grin*)

> NetBSD, since it never used the interesting memory management of the 
> MacOS, never had a problem with 32 bit addressing.  Also, it doesn't 
> use the code in the ROM, so that code doesn't need to be patched 
> under NetBSD.  Under our current booting method, NetBSD uses Mac OS 
> to initialize the computer into an environment that NetBSD can use. 
> NetBSD want's the computer to be in 32 bit mode, and the only way to 
> get many older Macs into 32 bit mode is by using Mode32.

so we're booting MacOS to boot NetBSD because

a) there is no native NetBSD loader for mac68k.

b) we need Mode32 to twiddle the bits.

> Back to the question at hand, "BTW, if there comes a point when 
> NetBSD is booted natively w/o MacOS, what will happen to machines 
> that require Mode32?"  All NetBSD really needed from Mode32 was the 
> computer in 32 bit mode.  The developers that take on this task will 
> only need to figure out that step, a relatively easy task.  They will 
> not have to port any of the rest of Mode32.

i don't think i said what i said well enough.  this is what i meant, just 
figure out which bits are twiddled by Mode32 and do that.

Finally someone answered my question the way i wanted it answered.  this is
the level of information i'm looking for.  i don't know crap about Macs so
i need to be told.  i do know about computers though (i started out as an
intel guy then went SUN.  the most modern x86 machine i bought is a 486.)

thanks eric!!

-wonko