Don't try to talk to APIC on 486
authorLubomir Rintel <lkundrak@v3.sk>
Fri, 20 Aug 2010 11:37:54 +0000 (13:37 +0200)
committerKevin O'Connor <kevin@koconnor.net>
Tue, 24 Aug 2010 04:17:50 +0000 (00:17 -0400)
It only has one cpuid level, therefore it can't report whether it
has an APIC. It probably hasn't; assume that. Without this,
SeaBIOS would get stuck on qemu -M isapc.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
src/smp.c

index f989ec129d023f85d651e255e61662454e25c524..38e117ebb74b389e61b8c42377a0c67d8f4e5bce 100644 (file)
--- a/src/smp.c
+++ b/src/smp.c
@@ -72,7 +72,7 @@ smp_probe(void)
     ASSERT32FLAT();
     u32 eax, ebx, ecx, cpuid_features;
     cpuid(1, &eax, &ebx, &ecx, &cpuid_features);
-    if ((cpuid_features & CPUID_APIC)) {
+    if (eax < 1 || !(cpuid_features & CPUID_APIC)) {
         // No apic - only the main cpu is present.
         dprintf(1, "No apic - only the main cpu is present.\n");
         CountCPUs= 1;