From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LsTaN-0007jC-Ov for qemu-devel@nongnu.org; Fri, 10 Apr 2009 23:08:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LsTaJ-0007eH-8v for qemu-devel@nongnu.org; Fri, 10 Apr 2009 23:08:51 -0400 Received: from [199.232.76.173] (port=35997 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LsTaJ-0007e2-0x for qemu-devel@nongnu.org; Fri, 10 Apr 2009 23:08:47 -0400 Received: from wf-out-1314.google.com ([209.85.200.173]:59293) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LsTaI-0005Ci-Kj for qemu-devel@nongnu.org; Fri, 10 Apr 2009 23:08:46 -0400 Received: by wf-out-1314.google.com with SMTP id 29so1316259wff.4 for ; Fri, 10 Apr 2009 20:08:44 -0700 (PDT) From: Ed Swierk Content-Type: text/plain Date: Fri, 10 Apr 2009 20:08:38 -0700 Message-Id: <1239419318.20633.10.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] Fix timer interrupt routing for non-ACPI guest Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: bochs-developers@lists.sourceforge.net, qemu-devel@nongnu.org Qemu 0.10.2 is unable to boot a non-ACPI kernel due to a BIOS bug: ENABLING IO-APIC IRQs ..TIMER: vector=0x31 apic1=0 pin1=0 apic2=-1 pin2=-1 ..MP-BIOS bug: 8254 timer not connected to IO-APIC ...trying to set up timer (IRQ0) through the 8259A ... ..... (found apic 0 pin 0) ... ....... failed. ...trying to set up timer as Virtual Wire IRQ... The interrupt routing table in the MPTABLE needs to route the timer interrupt (IRQ 0) to IOAPIC pin 2. A similar bug was recently fixed in the ACPI table code. This patch fixes the problem for non-ACPI guests. Signed-off-by: Ed Swierk --- diff --git a/bios/rombios32.c b/bios/rombios32.c index 7be4216..13d5435 100644 --- a/bios/rombios32.c +++ b/bios/rombios32.c @@ -1173,7 +1173,7 @@ static void mptable_init(void) putb(&q, 0); /* flags: po=0, el=0 */ putb(&q, 0); putb(&q, 0); /* source bus ID = ISA */ - putb(&q, i); /* source bus IRQ */ + putb(&q, i == 2 ? 0 : i); /* source bus IRQ */ putb(&q, ioapic_id); /* dest I/O APIC ID */ putb(&q, i); /* dest I/O APIC interrupt in */ }