From owner-svn-src-head@FreeBSD.ORG Thu Mar 5 16:03:44 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4D0D1065670; Thu, 5 Mar 2009 16:03:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A2C348FC1C; Thu, 5 Mar 2009 16:03:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n25G3iIB088718; Thu, 5 Mar 2009 16:03:44 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n25G3iqq088716; Thu, 5 Mar 2009 16:03:44 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200903051603.n25G3iqq088716@svn.freebsd.org> From: John Baldwin Date: Thu, 5 Mar 2009 16:03:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189404 - in head/sys: amd64/acpica i386/acpica X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2009 16:03:45 -0000 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;