[coreboot] domain vs device statictree order

Peter Stuge peter at stuge.se
Wed Jan 7 18:29:29 CET 2009


Myles Watson wrote:
> >> I guess it's not really breadth first.  It's just parents before
> >> siblings.

Will our scheme with 6 phases all processing devices in one and the
same way fit all hardware?

Maybe the bus scan order needs to be settable, maybe by Kconfig,
maybe even at runtime?

I'll try to clarify:

Geode and Mart needs parents before siblings for phase2 to have VSA
init before the NAND enable, VSA is in domain.p2 and NAND in ide.p2.

I can imagine that one algorithm for deciding the order of processing
all devices in the system will not be enough however.

We'll see more dynamic hardware, which will require us to be better
at running code in the right order.

HT speed reconfiguration may be another example, or does it run
already before any of the phases? Does that also require parents
before siblings, or is something else (breadth first?) more
appropriate there?


If we can actually get by with just one simple algorithm that's
great of course. Can we?


> > I don't think having different phases run in different order is a
> > good idea, as it can lead to unexpected code execution orders all
> > over again.
> 
> I agree.

Yes, me too, in the sense that whoever is filling out phases will
need code for different devices to run in some particular order, and
instead of trying to guess and document what we think is sufficient,
it would be nice to have infrastructure that allows each phase filler
to specify the order they need in a very easy way.


> Without this patch Phase1, Phase2, and Phase6 are done in
> statictree order, and Phase3, Phase4, and Phase5 are done
> Parents before children.

The merit of statictree order is that it's the only thing available
before the dynamic bus scans in phase3, or?


> I don't see Phase1 being used anywhere.  Phase2 is handled with the
> patch.  I think Phase6 should be updated, and I can send a patch.

--8<-- doc/design/newboot.lyx
Phase 1 -- very early setup
This phase existed to make printk work and has been obsoleted.
The simple traversal (forall devices) is used for this phase.

Phase 2 -- fixup.
Fix broken devices if needed. Typically used by mainboard device.

These are functions that are required before any PCI operations of
any kind are run.
The simple traversal (forall devices) is used for this phase.
-->8--

I suggest moving VSA init to domain.phase1. It's certainly very early
setup because it _creates_ the PCI devices that are to be fixed up in
phase2.

Another option might be to put the NAND init in phase3.


//Peter




More information about the coreboot mailing list