[coreboot-gerrit] Patch set updated for coreboot: 4e26c18 timestamps: Only collect from BSP CPU

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Fri Sep 13 09:36:00 CEST 2013


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/3912

-gerrit

commit 4e26c18869dae009209483da8d2f0601fedf96dd
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Sun Sep 8 13:10:28 2013 +0300

    timestamps: Only collect from BSP CPU
    
    We only have one table to collect timestamps into.
    
    Change-Id: I80180fe9a05226f0351c3e66eacaf2d0cb82c924
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
 src/lib/timestamp.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/lib/timestamp.c b/src/lib/timestamp.c
index eac33a2..63f17f7 100644
--- a/src/lib/timestamp.c
+++ b/src/lib/timestamp.c
@@ -23,6 +23,7 @@
 #include <cbmem.h>
 #include <timestamp.h>
 #include <cpu/x86/car.h>
+#include <cpu/x86/lapic.h>
 
 #define MAX_TIMESTAMPS 30
 
@@ -60,6 +61,9 @@ void timestamp_add(enum timestamp_id id, tsc_t ts_time)
 {
 	struct timestamp_entry *tse;
 
+	if (!boot_cpu())
+		return;
+
 	if (!ts_table) {
 		timestamp_stash(id, ts_time);
 		return;
@@ -114,6 +118,9 @@ static void timestamp_do_sync(void)
 
 void timestamp_init(tsc_t base)
 {
+	if (!boot_cpu())
+		return;
+
 #ifdef __PRE_RAM__
 	/* Copy of basetime, it is too early for CBMEM. */
 	ts_basetime = base;
@@ -135,6 +142,9 @@ void timestamp_init(tsc_t base)
 
 void timestamp_sync(void)
 {
+	if (!boot_cpu())
+		return;
+
 #ifdef __PRE_RAM__
 	timestamp_real_init(ts_basetime);
 #else



More information about the coreboot-gerrit mailing list