Subject: Re: Mode32
To: None <wonko@entropy.tmok.com>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: port-mac68k
Date: 11/12/1999 17:10:44
On Fri, 12 Nov 1999, Wonko the Sane wrote:

> Bill Studenmund drunkenly mumbled...
> 
> > Some of the things I'm doing for macppc will help with a) (like making it
> > so that boot loaders can deal w/ MacOS partitioned disks). But the real
> > problem is, AFAICT, that we'd still need Mode32.
> 
> maybe, maybe not.  we can't get the loader to twiddle the bits? or is the
> ROM too agressive to alow us to get in there first.

Huh?

The way it works is that the roms start booting, and set part of the
ssytem up (I'm not exactly sure how much). They then go out looking for
disk drivers on the boot disk. If we wanted to make a NetBSD boot loader
(other than the Booter MacOS program), this is where it'd come in.

> > NetBSD boot blocks would work, but they'd kick in at the time when the
> > ROM's are looking at disk drivers. The problem is that on these older
> > machines, we're in 24-bit addressing mode at that point. We've not figured
> > out how to get out of 24-bit into 32-bit addressing, previously depending
> > on the ROM's to do it for us. :-)
> 
> hmm, so we need to either a) make the ROMs chill long enough to NetBSD to get
> control and/or b) wewrite the ROMs.  hmm, doesn't sound like fun.

Chill? Chill on what? The ROMs are doing what they do. The older ones were
only intended to run in 24-bit addressing, so they boot in it.

Getting into 32-bit addressing requires 2 things: 32-bit clean roms (where
Mode32 fits in) and MacOS modifying the PMMU tables to work right in
32-bit mode.

The latter (adjusting the PMMU tables) is what we need to learn to get
into 32-bit addressing.

> > We've been playing with it on and off for years, with no luck. :-(
> 
> if you are fighting the ROMs, then that is understandable.

The ROM's aren't really the problem. Our lack of understanding of what
exactly MacOS does to the PMMU is the problem. By booting via a MacOS
program after Mode32 has run, we have avoided needing to care.

> is there any merit in re-writing the ROMs?  or is that an undertaking that
> nobody is will to do?  

Nope. They have quite intemate knowledge of the hardware, which we lack.
I'd certainly not want to recreate it. :-)

> anyway, back to our assumption (people to do it), what would be the best way
> to do it?  NetBSD doesn't really even use the ROMs right?  so why not make
> a ROM that does nothing but put us in 32-bit mode (which may be automatic
> with new ROMs) and then looks on the SCSI bus for a NetBSD kernel?

Because this ROM also has to initialize the whole machine. Each machine
would need a different one..

In some cases, we do use routines still in the ROM. The MRG ADB code makes
use of the ROM adb driver, and I think there are a few other things we
use.

Take care,

Bill