diff --git a/sys/amd64/amd64/local_apic.c b/sys/amd64/amd64/local_apic.c index df8bcd88e9b..e81ac65ed77 100644 --- a/sys/amd64/amd64/local_apic.c +++ b/sys/amd64/amd64/local_apic.c @@ -831,6 +831,10 @@ apic_init(void *dummy __unused) struct apic_enumerator *enumerator; int retval, best; + /* We only support built in local APICs. */ + if (!(cpu_feature & CPUID_APIC)) + return; + /* Don't probe if APIC mode is disabled. */ if (resource_disabled("apic", 0)) return; diff --git a/sys/i386/i386/local_apic.c b/sys/i386/i386/local_apic.c index 53ebc0a108f..f2d96b57217 100644 --- a/sys/i386/i386/local_apic.c +++ b/sys/i386/i386/local_apic.c @@ -834,15 +834,8 @@ apic_init(void *dummy __unused) uint64_t apic_base; int retval, best; - /* - * We only support built in local APICs. Unfortunately, we can't - * just check the CPUID_APIC bit in cpu_features because some BIOSen - * don't set that flag. Instead, we assume that all Pentium-class - * and later machines have a local APIC. The only non-Pentium-class - * CPUs that can talk to an external APIC are 486s, so we just - * bail if we are on a 486. - */ - if (cpu_class == CPUCLASS_486) + /* We only support built in local APICs. */ + if (!(cpu_feature & CPUID_APIC)) return; /* Don't probe if APIC mode is disabled. */