Kyösti Mälkki ([email protected]) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1844
-gerrit commit 916fddbf960a79e56f71a1c5c0c6b36583b6c526 Author: Kyösti Mälkki <[email protected]> Date: Wed Nov 14 08:01:44 2012 +0200 Refactor bootblock initialisation Makes it a bit easier to implement mainboard-specific behaviour while executing the bootblock. Change-Id: I04e87f89efb4fad1c0e20b62ea6a50329a286205 Signed-off-by: Kyösti Mälkki <[email protected]> --- src/arch/x86/include/bootblock_common.h | 20 +++++++++++++------- src/arch/x86/init/bootblock_normal.c | 4 +--- src/arch/x86/init/bootblock_simple.c | 4 +--- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/arch/x86/include/bootblock_common.h b/src/arch/x86/include/bootblock_common.h index c9674f4..d7c591d 100644 --- a/src/arch/x86/include/bootblock_common.h +++ b/src/arch/x86/include/bootblock_common.h @@ -1,22 +1,28 @@ #include <cpu/x86/lapic/boot_cpu.c> +#include <arch/cbfs.h> #ifdef CONFIG_BOOTBLOCK_CPU_INIT #include CONFIG_BOOTBLOCK_CPU_INIT -#else -static void bootblock_cpu_init(void) { } #endif #ifdef CONFIG_BOOTBLOCK_NORTHBRIDGE_INIT #include CONFIG_BOOTBLOCK_NORTHBRIDGE_INIT -#else -static void bootblock_northbridge_init(void) { } #endif #ifdef CONFIG_BOOTBLOCK_SOUTHBRIDGE_INIT #include CONFIG_BOOTBLOCK_SOUTHBRIDGE_INIT -#else -static void bootblock_southbridge_init(void) { } #endif -#include <arch/cbfs.h> +static void bootblock_mainboard_init(void) +{ +#ifdef CONFIG_BOOTBLOCK_NORTHBRIDGE_INIT + bootblock_northbridge_init(); +#endif +#ifdef CONFIG_BOOTBLOCK_SOUTHBRIDGE_INIT + bootblock_southbridge_init(); +#endif +#ifdef CONFIG_BOOTBLOCK_CPU_INIT + bootblock_cpu_init(); +#endif +} #if CONFIG_USE_OPTION_TABLE #include <pc80/mc146818rtc.h> diff --git a/src/arch/x86/init/bootblock_normal.c b/src/arch/x86/init/bootblock_normal.c index 19b3d5a..82bad53 100644 --- a/src/arch/x86/init/bootblock_normal.c +++ b/src/arch/x86/init/bootblock_normal.c @@ -13,9 +13,7 @@ static void main(unsigned long bist) const char *default_filenames = "normal/romstage\0fallback/romstage"; if (boot_cpu()) { - bootblock_northbridge_init(); - bootblock_southbridge_init(); - bootblock_cpu_init(); + bootblock_mainboard_init(); #if CONFIG_USE_OPTION_TABLE sanitize_cmos(); diff --git a/src/arch/x86/init/bootblock_simple.c b/src/arch/x86/init/bootblock_simple.c index fd9ba22..204636e 100644 --- a/src/arch/x86/init/bootblock_simple.c +++ b/src/arch/x86/init/bootblock_simple.c @@ -3,9 +3,7 @@ static void main(unsigned long bist) { if (boot_cpu()) { - bootblock_northbridge_init(); - bootblock_southbridge_init(); - bootblock_cpu_init(); + bootblock_mainboard_init(); #if CONFIG_USE_OPTION_TABLE sanitize_cmos(); -- coreboot mailing list: [email protected] http://www.coreboot.org/mailman/listinfo/coreboot

