In a way, it's just the do_normal_boot() code in src/pc80/mc146818rtc_early.c.On Tue, Dec 22, 2009 at 2:27 PM, Patrick Georgi <patrick@georgi-clan.de> wrote:
- Provide a framework to build image selection logic
In newconfig, most boards have their own code to select the image. The
goal in this layout is to have generic decision routines to take care of
that, and encourage their use.
Is it possible to have it be generic? Won't we have to unify CMOS layouts for that to happen?
The alternative at that point is to do that code in assembly, or to move CAR to the bootblock again.I think it would be a mistake to bring romcc to targets that don't need it now.
Among the reasons: The way it is done now, it's always exactly one copy of the tree walker. If it's written in C and compiled with romcc, it could end up several times in the bootblock, if there are various calls (fallback, normal, ...), probably giving the register allocator a harder time.- Look up fallback/romstage in CBFS (this can be extended with selection
logic if desired) ("selection logic" is C, compiled with romcc, lookup
is assembly)
It's more important to me to avoid assembly than to have the absolute minimum size bootblock. Especially for K8 & Fam10, there's plenty of space to not have to do this.
Fixed, thanks for the reminder. I wanted to keep things minimal and forgot about it. It's not a big issue, as in Makefiles, missing variables simply expand to the empty string, but it's cleaner the way you proposed.Picky detail:
Since CONFIG_TINY_BOOTBLOCK is referenced in a Makefile that isn't board specific, the Kconfig entry for it should go there too (with a default n). There should just be a "select" in qemu-x86/Kconfig
Thanks, r4989Acked-by: Myles Watson <mylesgw@gmail.com>