summaryrefslogtreecommitdiff
path: root/src/lib/timestamp.c
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2018-06-03 12:29:50 +0300
committerPatrick Georgi <pgeorgi@google.com>2018-12-22 11:48:37 +0000
commit513a1a81f778b9fddbb55a36a38b2dd855215327 (patch)
treedd63ac840d855d65222f988e8dc1d8e5fa136df7 /src/lib/timestamp.c
parent8616442150f6a4777ccad9c5b29b8bbfa4be5067 (diff)
downloadcoreboot-513a1a81f778b9fddbb55a36a38b2dd855215327.tar.xz
arch/x86 cbmem: Drop tests for LATE_CBMEM_INIT
Remove all cases in code where we tested for EARLY_CBMEM_INIT or LATE_CBMEM_INIT being set. This also removes all references to LATE_CBMEM_INIT in comments. Change-Id: I4e47fb5c8a947d268f4840cfb9c0d3596fb9ab39 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/26827 Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/lib/timestamp.c')
-rw-r--r--src/lib/timestamp.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/lib/timestamp.c b/src/lib/timestamp.c
index 105b6961ff..36d02516a3 100644
--- a/src/lib/timestamp.c
+++ b/src/lib/timestamp.c
@@ -218,10 +218,10 @@ void timestamp_init(uint64_t base)
return;
}
- /* In the EARLY_CBMEM_INIT case timestamps could have already been
- * recovered. In those circumstances honor the cache which sits in BSS
+ /* Timestamps could have already been recovered.
+ * In those circumstances honor the cache which sits in BSS
* as it has already been initialized. */
- if (ENV_RAMSTAGE && IS_ENABLED(CONFIG_EARLY_CBMEM_INIT) &&
+ if (ENV_RAMSTAGE &&
ts_cache->cache_state != TIMESTAMP_CACHE_UNINITIALIZED)
return;
@@ -271,10 +271,10 @@ static void timestamp_sync_cache_to_cbmem(int is_recovery)
/*
* There's no need to worry about the base_time fields being out of
- * sync because only the following configurations are used/supported:
+ * sync because only the following configuration is used/supported:
*
- * 1. Timestamps get initialized before ramstage, which implies
- * CONFIG_EARLY_CBMEM_INIT and CBMEM initialization in romstage.
+ * Timestamps get initialized before ramstage, which implies
+ * CBMEM initialization in romstage.
* This requires the board to define a TIMESTAMP() region in its
* memlayout.ld (default on x86). The base_time from timestamp_init()
* (usually called from bootblock.c on most non-x86 boards) persists
@@ -283,18 +283,12 @@ static void timestamp_sync_cache_to_cbmem(int is_recovery)
* sync, which will adjust the timestamps in there to the correct
* base_time (from CBMEM) with the timestamp_add_table_entry() below.
*
- * 2. Timestamps only get initialized in ramstage *and*
- * CONFIG_LATE_CBMEM_INIT is set. main() will call timestamp_init()
- * very early (before any timestamps get logged) to set a base_time
- * in the BSS cache, which will later get synced over to CBMEM.
- *
* If you try to initialize timestamps before ramstage but don't define
* a TIMESTAMP region, all operations will fail (safely), and coreboot
* will behave as if timestamps only get initialized in ramstage.
*
- * If CONFIG_EARLY_CBMEM_INIT is set but timestamps only get
- * initialized in ramstage, the base_time from timestamp_init() will
- * get ignored and all timestamps will be 0-based.
+ * If timestamps only get initialized in ramstage, the base_time from
+ * timestamp_init() will get ignored and all timestamps will be 0-based.
*/
for (i = 0; i < ts_cache_table->num_entries; i++) {
struct timestamp_entry *tse = &ts_cache_table->entries[i];