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
This commit is contained in:
John Baldwin 2005-01-12 18:24:32 +00:00
parent 3e056862a2
commit 565e3eb657

View File

@ -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;