Subject: Re: 68k to ppc port info query
To: David A. Gatwood <dgatwood@deepspace.mklinux.org>
From: Roger Brown <rogerhb@xtra.co.nz>
List: port-macppc
Date: 01/12/2000 15:48:32
Does the booter load the kernel image into any part of main memory, pass
control to the kernel via a signel no-arguments entrypoint?

If so, does the kernel have to relocate the kernel(itself) to an area of
memory that can be shared between the VM processes before resetting the VM
tables.

If currently it does this stage using OpenFirmware then it sounds like there
are two stages to replacing OpenFirmware, 

1. One set of code to determine the machines layout before resetting the VM
tables.
2. A second set of code to relace the various calls that are currently used
to call OpenFirmware to find out about the rest of the machine.

I assume that the pre-VM code would need to use the standard ROMs or MacOS
to glean as much information prior to going native. My thought was that most
of this information could be determined by the Booter safely calling MacOS,
set up some tables and then pass this as input to the kernel entry point.

I can image OpenFirmware loading the kernel into a respecbe place to start
with, but if we are doing this after MacOS is loaded, then the MacOS would
already be in this safe location. Or is it the case that with VM you can
swizzle any addresses so it does not actually matter where the kernel has
been loaded?

Regards

Roger

----------
>From: "David A. Gatwood" <dgatwood@deepspace.mklinux.org>
>To: Roger Brown <rogerhb@xtra.co.nz>
>Cc: Allen Briggs <briggs@ninthwonder.com>, port-mac68k@netbsd.org,
port-macppc@netbsd.org
>Subject: Re: 68k to ppc port info query
>Date: Wed, Jan 12, 2000, 2:28 pm
>

>On Wed, 12 Jan 2000, Roger Brown wrote:
>
>> >> 2. Somehow create an OpenFirmware booter as a MacOS application that could
>> >> start either linuxppc or NetBSD/macppc. (by that I mean have a MacOS
>> >> application that adds a lump of code into memory that emulates the
>> >> OpenFirmware ROMs).
>> >
>> >Kind of like BootX, you mean?  Just add NetBSD support to it.  No point in
>> >writing a new booter....  ;-)
>> 
>> I have not come across BootX, what is the likely amount of work to...
>> 
>> 1. Make BootX work on the Peforma 6200
>
>Unknown.  Probably very little.  There's something weird display-wise that
>confuses it right now, I think.  Not positive, though.
>
>
>> 2. Make BootX able to load and start NetBSD/macppc
>
>Probably an engineer-afternoon, which means a couple of weeks for someone
>doing it in spare time, assuming relative familiarity with the kernel. 
>Admittedly, it is a little harder since NetBSD/macppc doesn't have a
>booter of any kind.  MkLinux already had a booter, and thus it just
>required some modifications to the existing code.  With NetBSD, you'd
>probably have to add a kernel entry point for BootX similar to the one
>used in NetBSD-mac68k, probably, then go from there.
>
>
>Later,
>David
>