tech-kern archive

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

cpu_rootconf() vs booted_device issues



hi folks.


i recently changed the evbmarm/fdt code to avoid forcing the
'booted_device' to be set to something if it was already set
(in that case, by the raidframe "soft root" code).

i surveyed all the cpu_rootconf() implementations.  there are
a lot, some are fixed but many are not.

i'm not planning on fixing any of these right now, though many
will use an idential patch (eg, all hpc{arm,mips.sh}, many of
the m68k/ppc/mips ports, use similar or identical code here
already), and some require thinking a little more about it
(eg, the sparc* ports set "booted_device" during autoconf when
the boot device is found in the tree.)  however, here's the
list of them all and my vague notes.


.mrg.


cpu_rootconf problems.    most of these only need to have eg
"if (booted_device) return;" added to a function usually
called findroot() or set_root_device():
    amiga
    amigappc
    atari
    - also checks RB_ASKNAME, which means no default will be set
      (consider removing this check here)
    cats
    - might need to avoid setting boot_args?    few others too.
    evbppc/ev64260
    evbppc/pmppc
    ews4800mips
    hp300
    hpcarm
    hpcmips
    hpcsh
    hppa
    ibmnws
    mac68k
    mipsco
    mvmeppc
    news68k
    newsmips
    next68k
    prep
    shark
    sparc
    sparc64
    - both sparc/sparc64 set booted_device during autoconfig
      when the device is found, matched with the ofw provided
      boot path info.
    sun3
    sun68k
    usermode

these ones have an always-true test could be fixed:
    evbmips/cavium
    evbmips/gdium
    evbmips/loongson
    evbmips/malta
    evbmips/rmixl
	if (booted_device)
		return;
	if ((booted_device == NULL) && netboot == 0) {


Home | Main Index | Thread Index | Old Index