Subject: Re: UFS root, how? was Re: 2.0 rc1 default catch
To: Tim Kelly <hockey@dialectronics.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: port-macppc
Date: 10/06/2004 13:27:50
--gj572EiMnwbLXET9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Oct 06, 2004 at 01:26:01PM -0400, Tim Kelly wrote:
> At 10:16 AM -0700 10/6/04, Kendall Shaw wrote:
>=20
> >The result was:
> >
> >0 > boot hd:,\ofwboot.xcf netbsd load-size=3De148 adler32=3Ddb640f80
> >
> >loading XCOFF
> >
> >tsize=3Dcbc0 dsize=3D14a8 bsize=3D2670 entry=3D640000
> >SECTIONS:
> >.text    00640000 00640000 0000cbc0 000000e0
> >.data    0064d000 0064d000 000014a8 0000cca0
> >.bss     0064e4a8 0064e4a8 00002670 00000000
> >loading .text, done..
> >loading .data, done..
> >clearing .bss, done..
> >
> >>> NetBSD/macppc OpenFirmware Boot, Revision 1.6
> >>> (autobuild@tgm.daemon.org, Sun Sep  8 21:53:46 UTC 2002)
> >4917880+334992 [247424+225003
> >DEFAULT CATCH!, code=3D300 at   %SRR0: 00640334   %SRR1: 00003030
> >  ok
> >0 > .registers
> >Client's Fix Pt Regs:
> >  00 00000000 00650194 00000000 0064d094 0063f0b4 00036eeb 006501bc 0000=
0000
> >  08 00000000 00650000 00000000 ffffffff 00000040 00000000 00000000 0000=
0000
> >  10 00000000 00000000 00100000 00602708 006504ac 00000000 00000012 0000=
0000
> >  18 00000000 0060273c 0000003d 00000000 00036eeb 0063f0b4 006501bc 0064=
d094
> >Special Regs:
> >     %IV: 00000000   %SRR0: 00640334   %SRR1: 00003030
> >     %CR: 20000004     %LR: 00640334    %CTR: 00000000    %XER: 20000000
> >    %DAR: 00658000  %DSISR: 42000000   %SDR1: 3ffe0000
> >  ok
> >0 >
>=20
> According to the registers, this is in the bootloader, not the kernel.
> Looks like it occurs after a return from a branch and link (bl), since bo=
th
> the PC and the LR are the same.
>=20
> There's no closing "]" nor "=3D" from the size readouts, so I'd guess that
> this is in libsa's reading in of the file, possibly a problem with symbols
> or the data segment.

Actually, the problem is that the boot loader is being overwritten by the=
=20
kernel. We've seen this before, and it's why we moved the boot loader. The=
=20
current bootloader is version 1.10.

> >I'll try using objdump when I get a chance. I don't have objdump under
> >macos x at the moment.

Note you'll need NetBSD-specific versions of the tools. MacOS X uses a=20
different file format than NetBSD (MachO not ELF), so the standard Apple=20
tools probably won't be able to figure out what's going on.

I think the debugging techniques described in this thread are very good,=20
however they won't help much with this error. They will, however, help=20
with other issues.

Take care,

Bill

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

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

iD8DBQFBZFVGWz+3JHUci9cRAmDXAJ98KTmmTtlFS1tqhICr6LhG56AK1gCfce5T
4M2kS8uWrsuadMiWdybMkFY=
=/8Po
-----END PGP SIGNATURE-----

--gj572EiMnwbLXET9--