[coreboot-gerrit] Patch set updated for coreboot: lib/bootblock: provide SoC callback parity with mainboard

Aaron Durbin (adurbin@chromium.org) gerrit at coreboot.org
Thu Feb 25 02:13:49 CET 2016


Aaron Durbin (adurbin at chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13791

-gerrit

commit e26e503c932a301f8077058e2a5a2ebbef257fc0
Author: Aaron Durbin <adurbin at chromium.org>
Date:   Wed Feb 24 18:56:00 2016 -0600

    lib/bootblock: provide SoC callback parity with mainboard
    
    There was no 'early' call into the SoC code prior to console
    getting initialized. Not having this enforces the mainboard to
    drive the setup of the console which typically just ends up
    calling into the SoC codde. Provide a SoC early init call
    to handle this without having to duplicate the same code
    in mainboards utilizing the same SoC.
    
    Change-Id: Ia233dc3ae89a77df284d6d5cf5b2b051ad3be089
    Signed-off-by: Aaron Durbin <adurbin at chromium.org>
---
 src/include/bootblock_common.h | 7 ++++++-
 src/lib/bootblock.c            | 2 ++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/include/bootblock_common.h b/src/include/bootblock_common.h
index c8156d0..2cecc3b 100644
--- a/src/include/bootblock_common.h
+++ b/src/include/bootblock_common.h
@@ -18,9 +18,14 @@
 
 #include <main_decl.h>
 
-/* These are defined as weak no-ops that can be overridden by mainboard/SoC. */
+/*
+ * These are defined as weak no-ops that can be overridden by mainboard/SoC.
+ * The 'early' variants are called prior to console initialization. Also, the
+ * SoC functions are called prior to the mainboard fucntions.
+ */
 void bootblock_mainboard_early_init(void);
 void bootblock_mainboard_init(void);
+void bootblock_soc_early_init(void);
 void bootblock_soc_init(void);
 
 #endif	/* __BOOTBLOCK_COMMON_H */
diff --git a/src/lib/bootblock.c b/src/lib/bootblock.c
index 4a36a58..658eea4 100644
--- a/src/lib/bootblock.c
+++ b/src/lib/bootblock.c
@@ -25,6 +25,7 @@
 DECLARE_OPTIONAL_REGION(timestamp);
 
 __attribute__((weak)) void bootblock_mainboard_early_init(void) { /* no-op */ }
+__attribute__((weak)) void bootblock_soc_early_init(void) { /* do nothing */ }
 __attribute__((weak)) void bootblock_soc_init(void) { /* do nothing */ }
 __attribute__((weak)) void bootblock_mainboard_init(void) { /* do nothing */ }
 
@@ -36,6 +37,7 @@ void main(void)
 	if (IS_ENABLED(CONFIG_COLLECT_TIMESTAMPS) && _timestamp_size > 0)
 		timestamp_init(timestamp_get());
 
+	bootblock_soc_early_init();
 	bootblock_mainboard_early_init();
 
 	if (IS_ENABLED(CONFIG_BOOTBLOCK_CONSOLE)) {



More information about the coreboot-gerrit mailing list