Kyösti Mälkki has uploaded this change for review.

View Change

timestamps: Fix syncing to CBMEM

For timestamps added before CBMEM coming online and call to
timestamp_sync_cache_to_cbmem(), ts_table->base_time was
subtracted twice.

Change-Id: Ia786c12c68c8921c0d09bc58a29fefdc72bf0c6d
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
---
M src/lib/timestamp.c
1 file changed, 2 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/01/38301/1
diff --git a/src/lib/timestamp.c b/src/lib/timestamp.c
index d2206f6..3855f6d 100644
--- a/src/lib/timestamp.c
+++ b/src/lib/timestamp.c
@@ -128,7 +128,7 @@

tse = &ts_table->entries[ts_table->num_entries++];
tse->entry_id = id;
- tse->entry_stamp = ts_time - ts_table->base_time;
+ tse->entry_stamp = ts_time;

if (ts_table->num_entries == ts_table->max_entries)
printk(BIOS_ERR, "ERROR: Timestamp table full\n");
@@ -148,6 +148,7 @@
return;
}

+ ts_time -= ts_table->base_time;
timestamp_add_table_entry(ts_table, id, ts_time);

if (CONFIG(TIMESTAMPS_ON_CONSOLE))

To view, visit change 38301. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia786c12c68c8921c0d09bc58a29fefdc72bf0c6d
Gerrit-Change-Number: 38301
Gerrit-PatchSet: 1
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki@gmail.com>
Gerrit-MessageType: newchange