Subject: Re: Problem : can't determine root device
To: matthew green <mrg@eterna.com.au>
From: Eduardo Horvath <eeh@NetBSD.org>
List: port-sparc64
Date: 01/08/2005 15:33:11
On Sat, Jan 08, 2005 at 01:20:13PM +1100, matthew green wrote:
> 
>    On Fri, Jan 07, 2005 at 03:27:18PM -0500, Julien Aube wrote:
>    
>    > I have this :
>    > NetBSD 2.0 (GENERIC) #0: Thu Dec  2 02:49:29 UTC 2004
>    >        
>    > builds@build:/big/builds/ab/netbsd-2-0-RELEASE/sparc64/200411300000Z-obj
>    > /big/builds/ab/netbsd-2-0-RELEASE/src/sys/arch/sparc64/compile/GENERIC
>    > total memory = 768 MB
>    > avail memory = 740 MB
>    > bootpath: /sbus@1f,0/QLGC,isp@1,10000/sd@4,0       <-------
>    
>    I think the problem is caused because isp is not in the bus_class_tab[]
>    array.  The problem with adding isp is that it can either be on a PCI
>    bus or an SBus (as yours is) so it's not obvious how to add it to the
>    list.  In fact the entire method for parsing the bootpath and locating
>    the associated driver should be reimplemented, but it's not an easy
>    task.
> 
> hmmm.  isp is in the sparc bus_class_tab[] as:
> 
>         { "isp",        BUSCLASS_SBUS },

isp is not in the sparc64 bus_class_tab[], which is the problem.

In any case, this is a huge mess.  It should be possible to open an instance
of the boot device, convert it to a phandle and compare device phandles
to determine the boot device.  Things get a bit more complicated with disks,
so in that case you need to do the comparison with the parent phandle and
and match the disk instance using the current method.  But it should not
be necessary to track every possible device node the way it's currently
done.

Eduardo