At least one BIOS bogusly includes duplicate entries for I/O APICs. The

bogus entries have a starting IRQ that is invalid (> 255, so won't fit
into a PCI intline config register).  It had the side effect of breaking
MSI by "claiming" several IRQs in the MSI range.  Fix this by ignoring such
I/O APICs.

MFC after:	2 weeks
This commit is contained in:
John Baldwin 2009-03-05 16:03:44 +00:00
parent c4e8c9df9e
commit b25fc07f53
2 changed files with 8 additions and 0 deletions

View File

@ -483,6 +483,10 @@ madt_parse_apics(ACPI_SUBTABLE_HEADER *entry, void *arg __unused)
apic->Id);
if (ioapics[apic->Id].io_apic != NULL)
panic("%s: Double APIC ID %u", __func__, apic->Id);
if (apic->GlobalIrqBase >= FIRST_MSI_INT) {
printf("MADT: Ignoring bogus I/O APIC ID %u", apic->Id);
break;
}
ioapics[apic->Id].io_apic = ioapic_create(apic->Address,
apic->Id, apic->GlobalIrqBase);
ioapics[apic->Id].io_vector = apic->GlobalIrqBase;

View File

@ -482,6 +482,10 @@ madt_parse_apics(ACPI_SUBTABLE_HEADER *entry, void *arg __unused)
apic->Id);
if (ioapics[apic->Id].io_apic != NULL)
panic("%s: Double APIC ID %u", __func__, apic->Id);
if (apic->GlobalIrqBase >= FIRST_MSI_INT) {
printf("MADT: Ignoring bogus I/O APIC ID %u", apic->Id);
break;
}
ioapics[apic->Id].io_apic = ioapic_create(apic->Address,
apic->Id, apic->GlobalIrqBase);
ioapics[apic->Id].io_vector = apic->GlobalIrqBase;