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@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) {