From: Beth Kon <eak@us.ibm.com>
To: qemu-devel@nongnu.org
Cc: bochs-developers@lists.sourceforge.net
Subject: Re: [Qemu-devel] [PATCH] Fix timer interrupt routing for non-ACPI guest
Date: Mon, 13 Apr 2009 12:21:50 -0400 [thread overview]
Message-ID: <49E3669E.6020404@us.ibm.com> (raw)
In-Reply-To: <1239419318.20633.10.camel@localhost.localdomain>
Ed Swierk wrote:
> 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 <eswierk@aristanetworks.com>
>
> ---
> 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 */
> }
>
>
>
>
This was an oversight on my part when I submitted the HPET patches for
qemu. I properly modified the ACPI configuration, but missed the
non-ACPI case.
This patch is not quite correct and I will submit the necessary patch
shortly.
A bit of the history...
This issue surfaced when I implemented the HPET and discovered that
Win2k8 would only work if the HPET interrupt was routed to IOAPIC inti2.
This is a common configuration (overriding irq0->inti2). The HPET spec
states that "Timer 0 will be routed to IRQ0 in the Non-APIC or IRQ2 in
the I/O APIC", and Windows appears to expect it regardless of how
overrides are reported by the BIOS. So the decision was made to always
have the override.
prev parent reply other threads:[~2009-04-13 16:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-11 3:08 [Qemu-devel] [PATCH] Fix timer interrupt routing for non-ACPI guest Ed Swierk
2009-04-12 13:51 ` [Qemu-devel] " Sebastian Herbszt
2009-04-12 21:46 ` Ed Swierk
2009-04-13 15:49 ` Sebastian Herbszt
2009-04-13 16:21 ` Beth Kon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49E3669E.6020404@us.ibm.com \
--to=eak@us.ibm.com \
--cc=bochs-developers@lists.sourceforge.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.