diff options
author | Stefan Reinauer <reinauer@chromium.org> | 2012-07-10 15:19:23 -0700 |
---|---|---|
committer | Patrick Georgi <patrick@georgi-clan.de> | 2012-07-23 20:58:29 +0200 |
commit | ac2ec34fd28dad54269774b3881bc7aebfb40229 (patch) | |
tree | 17e5cbda916209bfdb81d621a5d2367cd9920def /src/cpu | |
parent | 505414a6cfb2aeef455b5144e4b96fc27f19eb39 (diff) | |
download | coreboot-ac2ec34fd28dad54269774b3881bc7aebfb40229.tar.xz |
Re-initialize Local APIC timer on APs
In order to be able to use udelay in code running on AP cores
the timer has to be initialized on the according local APICs
or the system will just hang when udelay is used.
Change-Id: I776bc96aa6d876ff2582d0c05cbc9c7611cb06b5
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/1267
Tested-by: build bot (Jenkins)
Reviewed-by: Sven Schnelle <svens@stackframe.org>
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/x86/lapic/apic_timer.c | 4 |
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 */ |