Author: jhb
Date: Thu Mar  5 16:03:44 2009
New Revision: 189404
URL: http://svn.freebsd.org/changeset/base/189404

Log:
  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

Modified:
  head/sys/amd64/acpica/madt.c
  head/sys/i386/acpica/madt.c

Modified: head/sys/amd64/acpica/madt.c
==============================================================================
--- head/sys/amd64/acpica/madt.c        Thu Mar  5 15:50:39 2009        
(r189403)
+++ head/sys/amd64/acpica/madt.c        Thu Mar  5 16:03:44 2009        
(r189404)
@@ -483,6 +483,10 @@ madt_parse_apics(ACPI_SUBTABLE_HEADER *e
                            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;

Modified: head/sys/i386/acpica/madt.c
==============================================================================
--- head/sys/i386/acpica/madt.c Thu Mar  5 15:50:39 2009        (r189403)
+++ head/sys/i386/acpica/madt.c Thu Mar  5 16:03:44 2009        (r189404)
@@ -482,6 +482,10 @@ madt_parse_apics(ACPI_SUBTABLE_HEADER *e
                            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;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to