summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-07-07 12:44:30 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2013-07-07 12:44:30 +0200
commite32940f7269306a108fbe3f2ee742a3a8e74133e (patch)
tree5dd895141b666800c14a0132d4a4337ca8679179 /sys
parentc333697c41b66e8157821fd174c114034b8c1733 (diff)
acpi: skip disabled LAPIC entries
disabled LAPIC entries overwrote the bootstrap processor apic causing the machine panic with: "no bootstrap processor". (problem with lenovo X230) just ignore entries that are disabled or collide with entries already found. (should not happen)
Diffstat (limited to 'sys')
-rw-r--r--sys/src/9/pc/archacpi.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/sys/src/9/pc/archacpi.c b/sys/src/9/pc/archacpi.c
index 45e3b938d..9a27f79c7 100644
--- a/sys/src/9/pc/archacpi.c
+++ b/sys/src/9/pc/archacpi.c
@@ -401,16 +401,21 @@ Foundapic:
a->lintr[0] = ApicIMASK;
a->lintr[1] = ApicIMASK;
a->flags = p[4] & PcmpEN;
- if(a->flags & PcmpEN){
- a->machno = machno++;
-
- /*
- * platform firmware should list the boot processor
- * as the first processor entry in the MADT
- */
- if(a->machno == 0)
- a->flags |= PcmpBP;
+
+ /* skip disabled processors */
+ if((a->flags & PcmpEN) == 0 || mpapic[a->apicno] != nil){
+ xfree(a);
+ break;
}
+ a->machno = machno++;
+
+ /*
+ * platform firmware should list the boot processor
+ * as the first processor entry in the MADT
+ */
+ if(a->machno == 0)
+ a->flags |= PcmpBP;
+
mpapic[a->apicno] = a;
break;
case 0x01: /* I/O APIC */