Subject: Re: Kernel startup and entry vectors
To: Bill Studenmund <wrstuden@zembu.com>
From: Louis Gerbarg <gerbal@cs.rpi.edu>
List: port-macppc
Date: 04/24/2001 16:25:09
On Tue, 24 Apr 2001, Bill Studenmund wrote:

> On Tue, 24 Apr 2001, Louis Gerbarg wrote:
> 
> > On Tue, 24 Apr 2001, Tsubai Masanari wrote:
> > 
> > > >> 4. Does the kernel expect to be in real-mode on entry
> > > >
> > > >Blah. Haven't looked at low-level ppc stuff in too long. Does "real
> > > >mode" mean no memory mapping? If so, then yes.
> > > 
> > > No.  OF needs virtual-mode on PowerMac.
> > > So, the kernel must be in virtual-mode on startup too.
> > 
> > Interesting. Mac OS X comes up with all no translations enabled. The
> > reason was explained on the Darwin list last night (>> is me, > is Josh
> > de Cesare, who wrote BootX and a number of OF patches Apple distributes):
> 
> As Sanjay mentioned, one of the first things the kernel does is disable
> translations. :-) So they need to be set up in a 1-1 mapping.
> 
> > So, I am not going to get that changed. As I see it I have a couple of
> > options. One, I can drop the endeavor. Two, I can try to make an alternate
> > entry vector for the NetBSD kernel that sets up some the translation
> > mechanism (this will deprive the kernel of the OF CI though). I can also
> > attempt to make BootX detect NetBSD kernels, and alter its behaviour (do
> > you guys place anything special in a note section, or something like
> > that?). The later is probably the simplest, though it is not the cleanest.
> > Josh seems pretty convinced the Old World OF CI can not be used reliably
> > in a general manner, I would what your thoughs on the issue.
> 
> I think alternalte entry points would be fine, especially with some code
> which fakes up an OF interface. We have expressed an interest in working
> with NuBus machines, and they too don't have OF. So adding an OF-less
> entry point would be a good thing. :-)

Cool. Whether ot not I actually have time to do something like that soon
is an issue, but it is good to hear.

I am still curious, what do you guys actually use OF for after boot. I
have heard references to offb, which I suppose could be referring to
either a very simple framebuffer inited by OF and left behind, or actually
accessing the framebuffer device's methods.

If you guys are only using the client interface to build a device tree
than everything is fine, BootX provides a completely filled out tree for
the kernel. If you are actually using it to run interpret of call-method
things are going to be a lot hairier.

Louis