x86: Do not attempt to calibrate the LAPIC timer if no APIC is present
Reported and tested by: Michael Butler <imb@protected-networks.net>
Reviewed by: jhb, kib
Fixes: 62d09b46ad
("x86: Defer LAPIC calibration until after timecounters are available")
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33669
This commit is contained in:
parent
deca0138dc
commit
0ecda8d5ae
@ -913,6 +913,12 @@ native_lapic_calibrate_timer(void)
|
||||
struct lapic *la;
|
||||
register_t intr;
|
||||
|
||||
#ifdef DEV_ATPIC
|
||||
/* Fail if the local APIC is not present. */
|
||||
if (!x2apic_mode && lapic_map == NULL)
|
||||
return;
|
||||
#endif
|
||||
|
||||
intr = intr_disable();
|
||||
la = &lapics[lapic_id()];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user