diff options
author | Julius Werner <jwerner@chromium.org> | 2018-05-15 17:48:30 -0700 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2018-05-22 02:39:11 +0000 |
commit | 12574dd72b7b0e7e59ac1b071d581f78cd8f01ad (patch) | |
tree | 812cce3b7cee495f65524a60943561ec9a9bc8d5 /src/lib | |
parent | 1ca26664e60372cb66104b4c448a442a472f7b8a (diff) |
bootblock: Allow more timestamps in bootblock_main_with_timestamp()
This patch adds more parameters to bootblock_main_with_timestamp() to
give callers the opportunity to add additional timestamps that were
recorded in the platform-specific initialization phase.
Change-Id: Idf3a0fcf5aee88a33747afc69e055b95bd38750c
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/26339
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/bootblock.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/bootblock.c b/src/lib/bootblock.c index bee28459ef..867f1b16e6 100644 --- a/src/lib/bootblock.c +++ b/src/lib/bootblock.c @@ -22,7 +22,6 @@ #include <pc80/mc146818rtc.h> #include <program_loading.h> #include <symbols.h> -#include <timestamp.h> DECLARE_OPTIONAL_REGION(timestamp); @@ -31,11 +30,17 @@ __weak void bootblock_soc_early_init(void) { /* do nothing */ } __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) +asmlinkage 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. */ - if (IS_ENABLED(CONFIG_COLLECT_TIMESTAMPS) && _timestamp_size > 0) + if (IS_ENABLED(CONFIG_COLLECT_TIMESTAMPS) && _timestamp_size > 0) { + int i; timestamp_init(base_timestamp); + for (i = 0; i < num_timestamps; i++) + timestamp_add(timestamps[i].entry_id, + timestamps[i].entry_stamp); + } sanitize_cmos(); cmos_post_init(); @@ -63,5 +68,5 @@ void main(void) if (IS_ENABLED(CONFIG_COLLECT_TIMESTAMPS)) base_timestamp = timestamp_get(); - bootblock_main_with_timestamp(base_timestamp); + bootblock_main_with_timestamp(base_timestamp, NULL, 0); } |