Subject: Re: NetBSD without MacOS: Coding time!
To: None <paul@whooppee.com>
From: Michael R. Zucca <mrz5149@acm.org>
List: port-mac68k
Date: 02/28/1999 17:17:36
At 7:04 PM -0500 2/27/99, Paul Goyette wrote:

>Yep.  But how much of the ROM-based OS and ToolBox traps are adequately
>initialized at this point?  Many of these routines rely on the settings
>of low-memory globals.

I would imagine the ROM probably intializes a small set of critical pacakges.
However, the initialization of other packages might be left up to the system.
The code to do it is in the ROM, it's just not called until the System loads.

>Yep, again.  But there are different ways to access different parts of
>the PRAM, and some of them rely on the proper set-up of the Cuda/Egret
>chips on some systems.  Of course, since the Start Manager has to read
>from PRAM to figure out which disk to boot from, PRAM should be useable
>at this point.

Bingo. And again, the PRAM is also used by NuBus devices during Primary Init.
If you look at Cards'n'drivers you can see that at least a few things
(like the device manager) are already intialized and running at Primary Init
which happens before the system is loaded. This is how the system is able to
display an X mac on your fancy NuBus video card's screen when it can't find
a bootable disk. And how did it know what screen to use? That's right, PRAM.

>Need to be careful here, with respect to the monitor.  If you're on a
>non-internal monitor, things could get dicey.

Again, this shouldn't be a problem. The card takes card of this.

>> Again, once you have the SCSI manager you can just push the data into
>>memory.
>> However, you'll probably need to write a little piece of assembler that will
>> copy the kernel so that it starts at address 0 and then kick off the kernel.
>> You can probably rip this out of the current booter.
>
>Don't forget to find some place to store all of the info that the
>current booter grabs (various low-memory globals, and RAM ranges) before
>loading the kernel!

There is precious little that we actually need. In fact, I would imagine that
with a little work, the kernel should need very little info from the booter,
if any at all.

>Hmmm.  Some of this will rely on the existence of QuickDraw as well as
>the Font Manager (dialog boxes are drawn with Chicago IIRC).  Most of
>this will be unuseable once you've started to load NetBSD.

The service is provided by the System Error Handler package. It uses a
slightly different, and more primitive, mechanism. Besides, you'll find that
much of Quickdraw is resident in the ROMs and that the Chicago font is also
found in ROMs.


_______________________________________________________________________
 Michael Zucca - mrz5149@acm.org - http://www.mdc.net/~mrz5149/
 "I will choose a path that's clear. I will choose Freewill. "
  --Rush, Freewill
_______________________________________________________________________