From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lvxk8-0007nZ-MM for qemu-devel@nongnu.org; Mon, 20 Apr 2009 13:57:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lvxk2-0007lx-TA for qemu-devel@nongnu.org; Mon, 20 Apr 2009 13:57:19 -0400 Received: from [199.232.76.173] (port=35004 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lvxk2-0007ls-Ku for qemu-devel@nongnu.org; Mon, 20 Apr 2009 13:57:14 -0400 Received: from e37.co.us.ibm.com ([32.97.110.158]:55278) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lvxk2-0005p9-6o for qemu-devel@nongnu.org; Mon, 20 Apr 2009 13:57:14 -0400 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e37.co.us.ibm.com (8.13.1/8.13.1) with ESMTP id n3KHuYNM001766 for ; Mon, 20 Apr 2009 11:56:34 -0600 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n3KHv5qY095016 for ; Mon, 20 Apr 2009 11:57:05 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n3KHv4is007706 for ; Mon, 20 Apr 2009 11:57:05 -0600 Message-ID: <49ECB779.4090902@us.ibm.com> Date: Mon, 20 Apr 2009 13:57:13 -0400 From: Beth Kon MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH] Fix non-ACPI Timer Interrupt Routing - v2 References: <49E49ABE.8050802@us.ibm.com> <8A3986ABEBAA4AD7B47A72F93C05F9AC@FSCPC> In-Reply-To: <8A3986ABEBAA4AD7B47A72F93C05F9AC@FSCPC> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: bochs-developers@lists.sourceforge.net Sebastian Herbszt wrote: > Beth Kon wrote: >> Replicate ACPI irq0->inti2 override in mp table for non-acpi case. >> >> v1 -> v2 adds comment suggested by Ryan. >> >> Signed-off-by: Beth Kon >> >> diff --git a/bios/BIOS-bochs-latest b/bios/BIOS-bochs-latest >> index ebec71b..82d7792 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..dc7b5f3 100644 >> --- a/bios/rombios32.c >> +++ b/bios/rombios32.c >> @@ -1168,6 +1168,12 @@ static void mptable_init(void) >> >> /* irqs */ >> for(i = 0; i < 16; i++) { >> +#ifdef BX_QEMU >> + /* One entry per ioapic input. Input 2 is covered by >> + irq0->inti2 override (i == 0). irq 2 is unused */ > > Isn't the input 0 or destination 2 covered by the override? > We connect irq0 (input) to intin2 (destination). In the comment I was using the terminology in the MP Specification, section 4.3.4. "Destination" 2 is the input to IOAPIC pin 2. If you find it very confusing I can clarify. > >> + if (i == 2) >> + continue; > > This changes the entry count. Currently it's > > putle16(&q, smp_cpus + 18); /* entry count */ > > which is smp_cpus processor entries + (bus entry + i/o apic entry + 16 > irq entries). > This changes the number of irq entries to 15. Yes, this was an oversight. Thanks! >> +#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 +1181,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; > > - Sebastian > > >