Subject: Re: 1.6 miniroot won't boot
To: None <bouyer@antioche.lip6.fr, eeh@netbsd.org>
From: None <eeh@netbsd.org>
List: port-sparc64
Date: 06/07/2002 17:26:14
This is the second call to strategy....

| Looking for ofwboot in directory...
| : strategy                ( fffe6809 2 fffebca9 0 fffebca2 7 0 0 fffadff0 800 51 fff97ff0 800 144 )
| raid-offset               ( fffe6809 2 fffebca9 0 fffebca2 7 0 0 fffadff0 800 51 fff97ff0 800 144 0 )

The raid-offset is 0 which should be correct if you are not
using raidframe.

| +                         ( fffe6809 2 fffebca9 0 fffebca2 7 0 0 fffadff0 800 51 fff97ff0 800 144 )
| bsize                     ( fffe6809 2 fffebca9 0 fffebca2 7 0 0 fffadff0 800 51 fff97ff0 800 144 200 )

The block size is 0x200 or 512, which sounds right.

| *                         ( fffe6809 2 fffebca9 0 fffebca2 7 0 0 fffadff0 800 51 fff97ff0 800 28800 )
| 0                         ( fffe6809 2 fffebca9 0 fffebca2 7 0 0 fffadff0 800 51 fff97ff0 800 28800 0 )

We want to seek 0x28800 bytes into the partition.

| " seek"                   ( fffe6809 2 fffebca9 0 fffebca2 7 0 0 fffadff0 800 51 fff97ff0 800 28800 0 f007a565 4 )
| boot-ihandle              ( fffe6809 2 fffebca9 0 fffebca2 7 0 0 fffadff0 800 51 fff97ff0 800 28800 0 f007a565 4 fffad940 )
| $call-method              ( fffe6809 2 fffebca9 0 fffebca2 7 0 0 fffadff0 800 51 fff97ff0 800 0 )

The seek seems to have succeeded.

| -1                        ( fffe6809 2 fffebca9 0 fffebca2 7 0 0 fffadff0 800 51 fff97ff0 800 0 ffffffffffffffff )
| l=                        ( fffe6809 2 fffebca9 0 fffebca2 7 0 0 fffadff0 800 51 fff97ff0 800 0 )
| l->n                      ( fffe6809 2 fffebca9 0 fffebca2 7 0 0 fffadff0 800 51 fff97ff0 800 0 )
| if                        ( fffe6809 2 fffebca9 0 fffebca2 7 0 0 fffadff0 800 51 fff97ff0 800 )

We want to read 0x800 (2K) bytes to address 0xfff97ff0...

| " read"                   ( fffe6809 2 fffebca9 0 fffebca2 7 0 0 fffadff0 800 51 fff97ff0 800 f007a5b5 4 )
| boot-ihandle              ( fffe6809 2 fffebca9 0 fffebca2 7 0 0 fffadff0 800 51 fff97ff0 800 f007a5b5 4 fffad940 )
| $call-method              ( fffe6809 2 fffebca9 0 fffebca2 7 0 0 fffadff0 800 51 0 )
| ;

It read 0 bytes.  Strange.  It looks like it should work.
The only other thing I can think of is to look at the contents
of the destination buffer (in this case fff97ff0) and see if
anything's changed.  Otherwise we probably need to add a SCSI
analyzer or something.

| ok
|
|
| I guess $call-method jumps into OFW ?

$call-method calls the named method associated with the supplied ihandle.
In this case it should be the method to read from partition `b'.

| BTW, is 0x144 a block offset from the start of the disk ? In which unit is it ?
| My partition table is :
| a:  3073440        0     4.2BSD     1024  8192    16   # (Cyl.    0 - 2021)
| b:  1080720  3073440     4.2BSD     1024  8192    16   # (Cyl. 2022 - 2732)
| c:  4152640        0    unknown                        # (Cyl.    0 - 2731)
|
| 0x144 is 324 in decimal, and if it's inside the b partition I can't see
| which unit it is ... 

It should be 0x144 sectors into the partition we're booting from.  However,
it may well be that some versions of the firmware do not recognize this
and seek from the beginning of the disk instead.  But I don't think this
is the issue since the seek succeeded but the read is what failed.

Eduardo