[coreboot-gerrit] New patch to review for coreboot: x86/cpu/tsc: Allow use of monotonic_timer_get in early boot stages.
Andrey Petrov (andrey.petrov@intel.com)
gerrit at coreboot.org
Fri Apr 8 23:49:49 CEST 2016
Andrey Petrov (andrey.petrov at intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14297
-gerrit
commit ce222c00b950f83cc5774b620df844bc8f30c01d
Author: Andrey Petrov <andrey.petrov at intel.com>
Date: Fri Apr 8 14:29:54 2016 -0700
x86/cpu/tsc: Allow use of monotonic_timer_get in early boot stages.
This change allows using of monotonic_timer_get() in pre-ram stages
by storing variables in CAR memory.
Change-Id: I2253960fd7f5da1f6b06af289911c08441b6c74c
Signed-off-by: Andrey Petrov <andrey.petrov at intel.com>
---
src/cpu/x86/tsc/delay_tsc.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/cpu/x86/tsc/delay_tsc.c b/src/cpu/x86/tsc/delay_tsc.c
index 0ad5d3b..f8ec53f 100644
--- a/src/cpu/x86/tsc/delay_tsc.c
+++ b/src/cpu/x86/tsc/delay_tsc.c
@@ -1,3 +1,4 @@
+#include <arch/early_variables.h>
#include <console/console.h>
#include <arch/io.h>
#include <cpu/x86/msr.h>
@@ -6,9 +7,9 @@
#include <delay.h>
#include <thread.h>
-#if !defined(__PRE_RAM__)
+static unsigned long clocks_per_usec CAR_GLOBAL;
-static unsigned long clocks_per_usec;
+#if !defined(__PRE_RAM__)
#if CONFIG_TSC_CONSTANT_RATE
static unsigned long calibrate_tsc(void)
@@ -188,7 +189,7 @@ void udelay(unsigned us)
}
}
-#if CONFIG_TSC_MONOTONIC_TIMER && !defined(__PRE_RAM__)
+#if CONFIG_TSC_MONOTONIC_TIMER
#include <timer.h>
static struct monotonic_counter {
More information about the coreboot-gerrit
mailing list