Subject: Re: Mode32
To: Eric Damien Berna <wonko@entropy.tmok.com, eric@thiel.com>
From: Henry B. Hotz <hotz@jpl.nasa.gov>
List: port-mac68k
Date: 11/12/1999 17:00:44
At 2:57 PM -0800 11/12/99, Wonko the Sane wrote:
>Eric Damien Berna drunkenly mumbled...
>> 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.
>

Remember this only applies to the Mac II, IIcx, and SE/30.  All newer Macs
have "32-bit clean" ROM's.

Also don't be too sure about not needing the Mac ROM's in NetBSD.  We still
have the MRG (Mac Rom Glue) in the kernel as an option.  It served us very
well for a very long time.  And I think there are still some color NuBus
cards that can only run X using that code.

As to just twiddling bits to get into 32-bit mode:  it's more complicated
than that.  The Mac has a completely different (and more rational, I'm
told) memory map in 32-bit mode.  Anyone wanting to do that themselves will
need to learn the 24-bit memory map of all the relevant models and take
care of the boot transition issues related to the new maps.  If you just
change the mapping you could be changing where your own code appears.

Signature failed Preliminary Design Review.
Feasibility of a new signature is currently being evaluated.
h.b.hotz@jpl.nasa.gov, or hbhotz@oxy.edu