[coreboot-gerrit] Patch set updated for coreboot: b66c31e timestamp: Fix collection without EARLY_CBMEM_INIT
Kyösti Mälkki (kyosti.malkki@gmail.com)
gerrit at coreboot.org
Tue May 26 16:08:33 CEST 2015
Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10300
-gerrit
commit b66c31e655f4604d7daee8d4b70fd50da224ccd4
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date: Tue May 26 06:23:02 2015 +0300
timestamp: Fix collection without EARLY_CBMEM_INIT
With LATE_CBMEM_INIT, do not search for the initial collection from
CBMEM in ramstage. On S3 resume this would find the non-empty
collection from previous run of ramstage. Start with an empty table
instead.
Remove a spurious error message as the stamps get stashed and
will be copied to CBMEM later.
Change-Id: Ib94049531c0ac23af25407bd2ca7644ee0163d69
Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
src/lib/timestamp.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/lib/timestamp.c b/src/lib/timestamp.c
index 98ab243..8c82649 100644
--- a/src/lib/timestamp.c
+++ b/src/lib/timestamp.c
@@ -42,10 +42,8 @@ static void timestamp_real_init(uint64_t base)
sizeof(struct timestamp_table) +
MAX_TIMESTAMPS * sizeof(struct timestamp_entry));
- if (!tst) {
- printk(BIOS_ERR, "ERROR: failed to allocate timestamp table\n");
+ if (!tst)
return;
- }
tst->base_time = base;
tst->max_entries = MAX_TIMESTAMPS;
@@ -142,10 +140,12 @@ void timestamp_init(uint64_t base)
/* Copy of basetime, it is too early for CBMEM. */
car_set_var(ts_basetime, base);
#else
- struct timestamp_table* tst;
+ struct timestamp_table *tst = NULL;
/* Locate and use an already existing table. */
- tst = cbmem_find(CBMEM_ID_TIMESTAMP);
+ if (!IS_ENABLED(CONFIG_LATE_CBMEM_INIT))
+ tst = cbmem_find(CBMEM_ID_TIMESTAMP);
+
if (tst) {
car_set_var(ts_table_p, tst);
return;
More information about the coreboot-gerrit
mailing list