Subject: Re: ofwboot.xcf issues
To: Izumi Tsutsui <>
From: Bill Studenmund <>
List: port-macppc
Date: 11/30/2003 14:16:29
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Nov 29, 2003 at 02:41:45PM +0900, Izumi Tsutsui wrote:
> In article <>
> wrote:
> > OF loads ofwboot.{xcf,elf} into a temporary buffer at load-base, then=
> > relocates the file out of it. That is why ofwboot.xcf's entry point is=
> > different from load-base.
> I think load-base is used only when OF loads XCOFF files,
> and ofwboot.elf can't be loaded by OF directly.

Yes it can. OF 3.X does it fine. :-)

> If no filename is specified on boot command,
> OF checks apple partition map (set by installboot) and loads
> bootxx at 0x4000, which is specified writeapplepartmap() in
> usr.sbin/installboot/arch/macppc.c (um, bad magic..).

You're describing the "partition zero" boot method, which is why some boot=
sequences need the ":0" (they don't all default to it).

> > What I don't understand is why we change load-base. From reading the co=
> > we no longer need load-base set to the same thing as DEFAULT_ENTRY_POIN=
> > and RELOC. Do _you_ know why we keep them the same?
> ??
> There is no such restriction to sync load-base and DEFAULT_ENTRY_POINT.
> (load-base on my Apus is 0x100000 now, but it just works.)

Ok. Previous documentation/code/experience gave me that impression back
when I started playing with this four years ago.

Oh, have you tried boot floppies? We should make sure they are happy with=
this change.

> As noted above, OF doesn't use load-base to load bootxx,
> and bootxx doesn't refer load-base either.
> If you are using ofwboot.xcf, bootxx is not used at all to load it.
> What I said is that we have to sync DEFAULT_ENTRY_POINT in bootxx
> and RELOC (which is also passed to ld for TEXT address) in ofwboot.

Ok, then I like your patch. Let's move it to e00000. We won't have to move
it after that for QUITE a while. :-)

Take care,


Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.3 (NetBSD)