Subject: Re: ofwboot.xcf issues
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Bill Studenmund <wrstuden@netbsd.org>
List: port-macppc
Date: 11/28/2003 21:19:58
--jL2BoiuKMElzg3CS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Nov 29, 2003 at 02:04:34PM +0900, Izumi Tsutsui wrote:
> In article <20031129004351.GA10852@netbsd.org>
> wrstuden@netbsd.org wrote:
>=20
> > > Current GENERIC kernel is ~5MB, so it seems ofwboot could not load it
> > > if RELOC (and DEFAULT_ENTRY_POINT in bootxx.c) is 0x600000.
> >=20
> > ?? bootxx only loads ofwboot, and 0x600000 is ofwboot's entry point.
>=20
> bootxx loads ofwboot at DEFAULT_ENTRY_POINT (=3D=3D RELOC =3D=3D 0x600000)
> and jumps there. Then, the loaded ofwboot loads a kernel at
> TEXTADDR, which is 0x100000.
> (For ofwboot.xcf case, I guess OF loads ofwboot.xcf at RELOC.)
> If kernel is larger than 5MB (=3D=3D 0x500000), ofwboot will
> overwrite itself with loading kernel, so it results DEFAULT_CATCH.

See other note in thread.

OF loads ofwboot.{xcf,elf} into a temporary buffer at load-base, then=20
relocates the file out of it. That is why ofwboot.xcf's entry point is=20
different from load-base.

What I don't understand is why we change load-base. From reading the code,=
=20
we no longer need load-base set to the same thing as DEFAULT_ENTRY_POINT=20
and RELOC. Do _you_ know why we keep them the same?

> > Could it be that we need a new real-base setting??
>=20
> No. (BTW, what's the "current" setting? FAQ suggests F00000, though..)

f00000 is what I've heard for OF 1 & 2 machines.

> real-base is used to specify address which is used for OF
> (at least OF 1 and 2), not ofwboot. If read-base is the default
> value (-1), OF uses around 0x400000 so we have to change it
> to higher address first to load kernels more than 3MB.

Ahhh... I wondered what it was doing.

Take care,

Bill

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQE/yCx+Wz+3JHUci9cRAvYmAJ9s9/yxYU4RCmt5OyQv0CHjIGZMvgCePTQ+
qXymzbdCCpyobM0iTkR0m/s=
=yEgV
-----END PGP SIGNATURE-----

--jL2BoiuKMElzg3CS--