Check for the (local) APIC feature on the CPU before moving on to SMP config and
APIC enumeration. As the local APIC is the basis for inter-CPU communication, we can't do SMP when it's absent. Fixes #7692, but indeed it makes no real sense for QEMU to provide the APIC info in the MP and ACPI tables (and actually emulate the hardware) when it disables the APIC support flag at the same time. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42215 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -612,6 +612,17 @@ smp_init(void)
|
||||
return;
|
||||
#endif
|
||||
|
||||
cpuid_info info;
|
||||
if (get_current_cpuid(&info, 1) != B_OK)
|
||||
return;
|
||||
|
||||
if ((info.eax_1.features & IA32_FEATURE_APIC) == 0) {
|
||||
// Local APICs aren't present; As they form the basis for all inter CPU
|
||||
// communication and therefore SMP, we don't need to go any further.
|
||||
dprintf("no local APIC present, not attempting SMP init\n");
|
||||
return;
|
||||
}
|
||||
|
||||
// first try to find ACPI tables to get MP configuration as it handles
|
||||
// physical as well as logical MP configurations as in multiple cpus,
|
||||
// multiple cores or hyper threading.
|
||||
|
||||
Reference in New Issue
Block a user