Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34972 )
Change subject: lib/bootblock: Add simplified entry with basetime ......................................................................
lib/bootblock: Add simplified entry with basetime
This allows for minor optimization as num_timestamps becomes a constant zero for a function with local scope. The loop with calls to timestamp_add() gets removed from bootblock.
Change-Id: Id230075c0e76fe377b6ea8c8ddf8318e07d29b91 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/cpu/intel/car/bootblock.c M src/cpu/qemu-x86/bootblock.c M src/include/bootblock_common.h M src/lib/bootblock.c M src/soc/intel/apollolake/bootblock/bootblock.c M src/soc/intel/braswell/bootblock/bootblock.c M src/soc/intel/cannonlake/bootblock/bootblock.c M src/soc/intel/denverton_ns/bootblock/bootblock.c M src/soc/intel/icelake/bootblock/bootblock.c M src/soc/intel/quark/bootblock/bootblock.c M src/soc/intel/skylake/bootblock/bootblock.c 11 files changed, 19 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/34972/1
diff --git a/src/cpu/intel/car/bootblock.c b/src/cpu/intel/car/bootblock.c index d751d86..664c2b5 100644 --- a/src/cpu/intel/car/bootblock.c +++ b/src/cpu/intel/car/bootblock.c @@ -21,7 +21,7 @@ { saved_bist = bist; /* Call lib/bootblock.c main */ - bootblock_main_with_timestamp(base_timestamp, NULL, 0); + bootblock_main_with_basetime(base_timestamp); }
void __weak bootblock_early_northbridge_init(void) { } diff --git a/src/cpu/qemu-x86/bootblock.c b/src/cpu/qemu-x86/bootblock.c index 8dcf576..6459beb 100644 --- a/src/cpu/qemu-x86/bootblock.c +++ b/src/cpu/qemu-x86/bootblock.c @@ -29,5 +29,5 @@ }
/* Call lib/bootblock.c main */ - bootblock_main_with_timestamp(base_timestamp, NULL, 0); + bootblock_main_with_basetime(base_timestamp); } diff --git a/src/include/bootblock_common.h b/src/include/bootblock_common.h index 08b2b7a..da10307 100644 --- a/src/include/bootblock_common.h +++ b/src/include/bootblock_common.h @@ -46,8 +46,12 @@ * entered from C code. This function assumes that the timer has already been * initialized, so it does not call init_timer(). */ +#if 0 asmlinkage void bootblock_main_with_timestamp(uint64_t base_timestamp, struct timestamp_entry *timestamps, size_t num_timestamps); +#endif + +void bootblock_main_with_basetime(uint64_t base_timestamp);
/* This is the argument structure passed from decompressor to bootblock. */ struct bootblock_arg { diff --git a/src/lib/bootblock.c b/src/lib/bootblock.c index 3925e90a..7fd70f2 100644 --- a/src/lib/bootblock.c +++ b/src/lib/bootblock.c @@ -30,7 +30,7 @@ __weak void bootblock_soc_init(void) { /* do nothing */ } __weak void bootblock_mainboard_init(void) { /* do nothing */ }
-asmlinkage void bootblock_main_with_timestamp(uint64_t base_timestamp, +static void bootblock_main_with_timestamp(uint64_t base_timestamp, struct timestamp_entry *timestamps, size_t num_timestamps) { /* Initialize timestamps if we have TIMESTAMP region in memlayout.ld. */ @@ -60,6 +60,11 @@ run_romstage(); }
+void bootblock_main_with_basetime(uint64_t base_timestamp) +{ + bootblock_main_with_timestamp(base_timestamp, NULL, 0); +} + void main(void) { uint64_t base_timestamp = 0; diff --git a/src/soc/intel/apollolake/bootblock/bootblock.c b/src/soc/intel/apollolake/bootblock/bootblock.c index f86c18e..a07c462 100644 --- a/src/soc/intel/apollolake/bootblock/bootblock.c +++ b/src/soc/intel/apollolake/bootblock/bootblock.c @@ -69,7 +69,7 @@ enable_rtc_upper_bank();
/* Call lib/bootblock.c main */ - bootblock_main_with_timestamp(base_timestamp, NULL, 0); + bootblock_main_with_basetime(base_timestamp); }
static void enable_pmcbar(void) diff --git a/src/soc/intel/braswell/bootblock/bootblock.c b/src/soc/intel/braswell/bootblock/bootblock.c index 2d1a3e8..d8d953c 100644 --- a/src/soc/intel/braswell/bootblock/bootblock.c +++ b/src/soc/intel/braswell/bootblock/bootblock.c @@ -31,7 +31,7 @@ asmlinkage void bootblock_c_entry(uint64_t base_timestamp) { /* Call lib/bootblock.c main */ - bootblock_main_with_timestamp(base_timestamp, NULL, 0); + bootblock_main_with_basetime(base_timestamp); }
static void program_base_addresses(void) diff --git a/src/soc/intel/cannonlake/bootblock/bootblock.c b/src/soc/intel/cannonlake/bootblock/bootblock.c index 30c2266..653ba30 100644 --- a/src/soc/intel/cannonlake/bootblock/bootblock.c +++ b/src/soc/intel/cannonlake/bootblock/bootblock.c @@ -44,7 +44,7 @@ asmlinkage void bootblock_c_entry(uint64_t base_timestamp) { /* Call lib/bootblock.c main */ - bootblock_main_with_timestamp(base_timestamp, NULL, 0); + bootblock_main_with_basetime(base_timestamp); }
void bootblock_soc_early_init(void) diff --git a/src/soc/intel/denverton_ns/bootblock/bootblock.c b/src/soc/intel/denverton_ns/bootblock/bootblock.c index e9800c8..f75de1f 100644 --- a/src/soc/intel/denverton_ns/bootblock/bootblock.c +++ b/src/soc/intel/denverton_ns/bootblock/bootblock.c @@ -51,7 +51,7 @@ asmlinkage void bootblock_c_entry(uint64_t base_timestamp) { /* Call lib/bootblock.c main */ - bootblock_main_with_timestamp(base_timestamp, NULL, 0); + bootblock_main_with_basetime(base_timestamp); };
void bootblock_soc_early_init(void) diff --git a/src/soc/intel/icelake/bootblock/bootblock.c b/src/soc/intel/icelake/bootblock/bootblock.c index b76dc4b..db43e50 100644 --- a/src/soc/intel/icelake/bootblock/bootblock.c +++ b/src/soc/intel/icelake/bootblock/bootblock.c @@ -23,7 +23,7 @@ asmlinkage void bootblock_c_entry(uint64_t base_timestamp) { /* Call lib/bootblock.c main */ - bootblock_main_with_timestamp(base_timestamp, NULL, 0); + bootblock_main_with_basetime(base_timestamp); }
void bootblock_soc_early_init(void) diff --git a/src/soc/intel/quark/bootblock/bootblock.c b/src/soc/intel/quark/bootblock/bootblock.c index ff5b9b2..2b2fc29 100644 --- a/src/soc/intel/quark/bootblock/bootblock.c +++ b/src/soc/intel/quark/bootblock/bootblock.c @@ -82,7 +82,7 @@ if (CONFIG(ENABLE_DEBUG_LED_BOOTBLOCK_ENTRY)) light_sd_led();
- bootblock_main_with_timestamp(base_timestamp, NULL, 0); + bootblock_main_with_basetime(base_timestamp); }
void bootblock_soc_early_init(void) diff --git a/src/soc/intel/skylake/bootblock/bootblock.c b/src/soc/intel/skylake/bootblock/bootblock.c index 4358fba..e9ca2d8 100644 --- a/src/soc/intel/skylake/bootblock/bootblock.c +++ b/src/soc/intel/skylake/bootblock/bootblock.c @@ -22,7 +22,7 @@ asmlinkage void bootblock_c_entry(uint64_t base_timestamp) { /* Call lib/bootblock.c main */ - bootblock_main_with_timestamp(base_timestamp, NULL, 0); + bootblock_main_with_basetime(base_timestamp); }
void bootblock_soc_early_init(void)