[coreboot-gerrit] Change in coreboot[master]: [TEST]cpu/x86/lapic: Build the lapic monotonic timer in romstage

Arthur Heymans (Code Review) gerrit at coreboot.org
Thu Aug 2 13:22:55 CEST 2018


Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/27801


Change subject: [TEST]cpu/x86/lapic: Build the lapic monotonic timer in romstage
......................................................................

[TEST]cpu/x86/lapic: Build the lapic monotonic timer in romstage

Also link in postcar stage.

Change-Id: I08fd1795508f76abdab1618585366bf9d06482ff
Signed-off-by: Arthur Heymans <arthur at aheymans.xyz>
---
M src/cpu/x86/lapic/Makefile.inc
M src/cpu/x86/lapic/apic_timer.c
2 files changed, 3 insertions(+), 2 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/01/27801/1

diff --git a/src/cpu/x86/lapic/Makefile.inc b/src/cpu/x86/lapic/Makefile.inc
index e02dcdd..9454f8f 100644
--- a/src/cpu/x86/lapic/Makefile.inc
+++ b/src/cpu/x86/lapic/Makefile.inc
@@ -3,6 +3,7 @@
 ramstage-$(CONFIG_SMP) += secondary.S
 romstage-$(CONFIG_UDELAY_LAPIC) += apic_timer.c
 ramstage-$(CONFIG_UDELAY_LAPIC) += apic_timer.c
+postcar-$(CONFIG_UDELAY_LAPIC) += apic_timer.c
 bootblock-y += boot_cpu.c
 verstage-y += boot_cpu.c
 romstage-y += boot_cpu.c
diff --git a/src/cpu/x86/lapic/apic_timer.c b/src/cpu/x86/lapic/apic_timer.c
index ec2e71c..7369c05 100644
--- a/src/cpu/x86/lapic/apic_timer.c
+++ b/src/cpu/x86/lapic/apic_timer.c
@@ -138,14 +138,14 @@
 	} while ((start - value) < ticks);
 }
 
-#if IS_ENABLED(CONFIG_LAPIC_MONOTONIC_TIMER) && !defined(__PRE_RAM__)
+#if IS_ENABLED(CONFIG_LAPIC_MONOTONIC_TIMER)
 #include <timer.h>
 
 static struct monotonic_counter {
 	int initialized;
 	struct mono_time time;
 	uint32_t last_value;
-} mono_counter;
+} mono_counter CAR_GLOBAL;
 
 void timer_monotonic_get(struct mono_time *mt)
 {

-- 
To view, visit https://review.coreboot.org/27801
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I08fd1795508f76abdab1618585366bf9d06482ff
Gerrit-Change-Number: 27801
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur at aheymans.xyz>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180802/35cc20f1/attachment.html>


More information about the coreboot-gerrit mailing list