NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/46732: setroot(9) is called twice after "MI root on wedges"changes

The following reply was made to PR kern/46732; it has been noted by GNATS.

From: Michael van Elst <>
To: Izumi Tsutsui <>
Subject: Re: kern/46732: setroot(9) is called twice after "MI root on
Date: Mon, 23 Jul 2012 20:24:38 +0200

 On Mon, Jul 23, 2012 at 11:55:46PM +0900, Izumi Tsutsui wrote:
 > How about:
 > - call MD cpu_rootconf() from main() (where currently it calls MI rootconf())
 > - change MD cpu_rootconf() to set booted_foo variables as the above
 > - also make MD cpu_rootconf() call MI rootconf() (for wedge)
 >   instead of setroot()
 > so that we could have post setroot() MD ops as before.
 That doesn't really work because the MD code then has to interpret
 whatever root device (including wedges) is selected and transform
 that back into something it or the boot code understands.
 And as my idea for rootconf() was to also clean up the root-on-raidframe
 hack later, things would be even more complicated.
 I guess the only reason for hp300 to use root_device to guess the
 boot device is that it wants to honor the users choice in the RB_ASKNAME
 case. No other port does this.
 > BTW, I wonder if booted_device == NULL check in rootconf() is appropriate.
 > Shouldn't setroot() be called for RB_ASKNAME even in that case?
 The patched code now always calls setroot(). Only the wedge lookup
 is now restricted to booted_device != NULL.
                                 Michael van Elst
                                 "A potential Snark may lurk in every tree."

Home | Main Index | Thread Index | Old Index