summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-01-12 18:24:32 +0000
committerjhb <jhb@FreeBSD.org>2005-01-12 18:24:32 +0000
commit2411c5a7629c0c5a07365475a77fddb9ababfb46 (patch)
tree1c7d94fb9f736cf9d03ad8f3c02f2e61d206d425 /sys/i386
parent2b05c4cf78cde4991e06333485708764b3338a80 (diff)
downloadFreeBSD-src-2411c5a7629c0c5a07365475a77fddb9ababfb46.zip
FreeBSD-src-2411c5a7629c0c5a07365475a77fddb9ababfb46.tar.gz
Try harder to work with MP table interrupt entries that claim that an
interrupt is wired up to all the I/O APICs in the system. If the system has only one I/O APIC, then just act as if the entry specified that APIC. We still don't try to handle global entries in a system with multiple I/O APICs. Tested by: Peter Trifonov pvtrifonov at mail dot ru MFC after: 1 week
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/mptable.c29
1 files changed, 22 insertions, 7 deletions
diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c
index c327c07..2026702 100644
--- a/sys/i386/i386/mptable.c
+++ b/sys/i386/i386/mptable.c
@@ -635,23 +635,38 @@ static void
mptable_parse_io_int(int_entry_ptr intr)
{
void *ioapic;
- u_int pin;
+ u_int pin, apic_id;
+ apic_id = intr->dst_apic_id;
if (intr->dst_apic_id == 0xff) {
- printf("MPTable: Ignoring global interrupt entry for pin %d\n",
- intr->dst_apic_int);
- return;
+ /*
+ * An APIC ID of 0xff means that the interrupt is connected
+ * to the specified pin on all I/O APICs in the system. If
+ * there is only one I/O APIC, then use that APIC to route
+ * the interrupts. If there is more than one I/O APIC, then
+ * punt.
+ */
+ if (mptable_nioapics == 1) {
+ apic_id = 0;
+ while (ioapics[apic_id] == NULL)
+ apic_id++;
+ } else {
+ printf(
+ "MPTable: Ignoring global interrupt entry for pin %d\n",
+ intr->dst_apic_int);
+ return;
+ }
}
- if (intr->dst_apic_id >= NAPICID) {
+ if (apic_id >= NAPICID) {
printf("MPTable: Ignoring interrupt entry for ioapic%d\n",
intr->dst_apic_id);
return;
}
- ioapic = ioapics[intr->dst_apic_id];
+ ioapic = ioapics[apic_id];
if (ioapic == NULL) {
printf(
"MPTable: Ignoring interrupt entry for missing ioapic%d\n",
- intr->dst_apic_id);
+ apic_id);
return;
}
pin = intr->dst_apic_int;
OpenPOWER on IntegriCloud