Don't check the CPUID_APIC bit in the cpu_features flags field to determine
if the boot CPU has a local APIC because some BIOS vendors are not competent enough to set this bit. Instead, just assume that we always have a local APIC on amd64. For i386 the check is a bit more subtle. FreeBSD requires either an MP Table or an ACPI MADT table to enumerate APICs. The only systems that have one of those tables that don't have local APICs are some presumably rare (and old) SMP 486 systems using external APICs. Thus, instead of checking the CPUID_APIC flag, check the CPU class and abort if we are running on a 486. MFC after: 1 week Reported by: bz
This commit is contained in:
parent
412295fdbd
commit
15b7edbeaa
@ -831,10 +831,6 @@ 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;
|
||||
|
@ -834,8 +834,15 @@ apic_init(void *dummy __unused)
|
||||
uint64_t apic_base;
|
||||
int retval, best;
|
||||
|
||||
/* We only support built in local APICs. */
|
||||
if (!(cpu_feature & CPUID_APIC))
|
||||
/*
|
||||
* 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)
|
||||
return;
|
||||
|
||||
/* Don't probe if APIC mode is disabled. */
|
||||
|
Loading…
Reference in New Issue
Block a user