From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LwSQT-0003BV-61 for qemu-devel@nongnu.org; Tue, 21 Apr 2009 22:43:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LwSQO-0003AL-B1 for qemu-devel@nongnu.org; Tue, 21 Apr 2009 22:43:04 -0400 Received: from [199.232.76.173] (port=39028 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LwSQO-0003AI-79 for qemu-devel@nongnu.org; Tue, 21 Apr 2009 22:43:00 -0400 Received: from e33.co.us.ibm.com ([32.97.110.151]:35998) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LwSQN-0002hu-Nu for qemu-devel@nongnu.org; Tue, 21 Apr 2009 22:42:59 -0400 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e33.co.us.ibm.com (8.13.1/8.13.1) with ESMTP id n3M2fIY5025051 for ; Tue, 21 Apr 2009 20:41:18 -0600 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n3M2guGc075568 for ; Tue, 21 Apr 2009 20:42:56 -0600 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n3M2guYb032372 for ; Tue, 21 Apr 2009 20:42:56 -0600 Message-ID: <49EE843F.3080505@us.ibm.com> Date: Tue, 21 Apr 2009 22:43:11 -0400 From: Beth Kon MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010106050504070900090806" Subject: [Qemu-devel] [PATCH] Fix non-ACPI Timer Interrupt Routing - v3 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel , bochs-developers@lists.sourceforge.net This is a multi-part message in MIME format. --------------010106050504070900090806 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Replicate ACPI irq0->inti2 override in mp table for non-acpi case. v1 -> v2 adds comment suggested by Ryan. v2 -> v3 clarifies comment and corrects entry count for non-ACPI case Anthony, the old version of this patch needs to be removed and replaced with this version. Signed-off-by: Beth Kon --------------010106050504070900090806 Content-Type: text/x-diff; name="non_acpi_irqrouting.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="non_acpi_irqrouting.patch" diff --git a/bios/BIOS-bochs-latest b/bios/BIOS-bochs-latest index ebec71b..56b17f5 100644 Binary files a/bios/BIOS-bochs-latest and b/bios/BIOS-bochs-latest differ diff --git a/bios/rombios32.c b/bios/rombios32.c index 7be4216..e0e2a95 100644 --- a/bios/rombios32.c +++ b/bios/rombios32.c @@ -1126,7 +1126,11 @@ static void mptable_init(void) putstr(&q, "0.1 "); /* vendor id */ putle32(&q, 0); /* OEM table ptr */ putle16(&q, 0); /* OEM table size */ +#ifdef BX_QEMU + putle16(&q, smp_cpus + 17); /* entry count */ +#else putle16(&q, smp_cpus + 18); /* entry count */ +#endif putle32(&q, 0xfee00000); /* local APIC addr */ putle16(&q, 0); /* ext table length */ putb(&q, 0); /* ext table checksum */ @@ -1168,6 +1172,12 @@ static void mptable_init(void) /* irqs */ for(i = 0; i < 16; i++) { +#ifdef BX_QEMU + /* One entry per ioapic interrupt destination. Destination 2 is covered + by irq0->inti2 override (i == 0). Source IRQ 2 is unused */ + if (i == 2) + continue; +#endif putb(&q, 3); /* entry type = I/O interrupt */ putb(&q, 0); /* interrupt type = vectored interrupt */ putb(&q, 0); /* flags: po=0, el=0 */ @@ -1175,7 +1185,11 @@ static void mptable_init(void) putb(&q, 0); /* source bus ID = ISA */ putb(&q, i); /* source bus IRQ */ putb(&q, ioapic_id); /* dest I/O APIC ID */ +#ifdef BX_QEMU + putb(&q, i == 0 ? 2 : i); /* dest I/O APIC interrupt in */ +#else putb(&q, i); /* dest I/O APIC interrupt in */ +#endif } /* patch length */ len = q - mp_config_table; --------------010106050504070900090806--