summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cpu/x86/lapic/apic_timer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cpu/x86/lapic/apic_timer.c b/src/cpu/x86/lapic/apic_timer.c
index a4106d40f3..1fd0c60234 100644
--- a/src/cpu/x86/lapic/apic_timer.c
+++ b/src/cpu/x86/lapic/apic_timer.c
@@ -79,7 +79,9 @@ void udelay(u32 usecs)
{
u32 start, value, ticks;
- if (!timer_fsb)
+ if (!timer_fsb || (lapic_read(LAPIC_LVTT) &
+ (LAPIC_LVT_TIMER_PERIODIC | LAPIC_LVT_MASKED)) !=
+ (LAPIC_LVT_TIMER_PERIODIC | LAPIC_LVT_MASKED))
init_timer();
/* Calculate the number of ticks to run, our FSB runs at timer_fsb Mhz */