aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2021-12-28 22:44:57 +0000
committerMark Johnston <markj@FreeBSD.org>2021-12-28 22:47:49 +0000
commit0ecda8d5ae896b229f13bfe73ffa3a7fc81cc550 (patch)
tree9b0b8345c8d2dd64fdf0554e8f093cab9f9b5e92 /sys
parentdeca0138dc659747c9edd4648690cdfdb01f58e8 (diff)
Diffstat (limited to 'sys')
-rw-r--r--sys/x86/x86/local_apic.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c
index 1264eeaaf7b8..23b780b121e1 100644
--- a/sys/x86/x86/local_apic.c
+++ b/sys/x86/x86/local_apic.c
@@ -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()];