Subject: Re: e450 issue
To: Peter Eisch <peter@boku.net>
From: Eduardo Horvath <eeh@NetBSD.org>
List: port-sparc64
Date: 06/02/2004 17:45:08
On Wed, Jun 02, 2004 at 11:52:29AM -0500, Peter Eisch wrote:
> 
> 
> > From: Eduardo Horvath <eeh@NetBSD.org>
> > Date: Wed, 2 Jun 2004 15:45:17 +0000
> > To: Peter Eisch <peter@boku.net>
> > Cc: NetBSD Port Sparc64 <port-sparc64@netbsd.org>
> > Subject: Re: e450 issue
> > 
> > I'm happy that worked.  At some point someone should spend some time trying
> > to determine exactly why test-method fails on those machines.  Hm...  I wonder
> > if the test_method() check is inverted...  What happens if you do:
> > 
> > 527c527
> > <         if (OF_test_method(memh, "SUNW,retain") != 0) {
> > ---
> >> if (OF_test_method(memh, "SUNW,retain") == 0) {
> > 
> 
> It croaks right there.  I can't tell if it quits at line 526 or 527, but
> regardless it looks like something isn't where its expected.

So that didn't work?  Hm.

Unfortunately, the ctrace didn't help all that much since the firmware
only has symbols for ofwboot and not the kernel.  Oh well.

Someday I suppose I should write up how to debug issues with client
interface calls.

You should take the contents of %o1, in this case 14aae78, and dump
some memory there, say:

ok  h# 14aae78 20 dump

That should be the client interface parameter block.  The first
8 bytes is the pointer to the name of the service being called.
Take that number, dump what it points to, and you should get a
string.

The other thing to do in this circumstance is a `.trap-registers'
and dump the sfar, sfsr, afar, and afsr registers to determine 
the faulting address, but I forget how to do that.

Eduardo
> 
> ...
> main: Calling loadfile(fd, /pci@1f,4000/network@1,1/netbsd -d)
> loadfile: reading header
> elf64_exec: Booting /pci@1f,4000/network@1,1/netbsd
> 5199280@0x1000000+174672@0x1800000+4019632@0x182aa50
>  start=0x1000000
> chain: calling OF_chain(800000, cbb8, 1000000, fff7fa80, 18)
> Type  'go' to resume
> {0} ok go
> OF_chain: prom returned!
> Calling entry(0, 0xfff7fa80, 18, f0075a4c, f0075a4c)
> Data Access Exception
> {0} ok ctrace
> PC: 11b84e0 
> Last leaf: jmpl  1000002    from 122a444
>      0 w  %o0-%o5: (14aae78 80c000 1000000 fff7fa80 18 18 )
>