qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Hanselmann <qemu@hansmi.ch>
To: qemu-devel@nongnu.org
Cc: igor.lvovsky@qumranet.com
Subject: Re: [Qemu-devel] [PATCH] Update i440FX/PIIX3 emulation
Date: Wed, 31 Oct 2007 01:25:54 +0100	[thread overview]
Message-ID: <20071031002554.GB20915@hansmi.ch> (raw)
In-Reply-To: <20071024224222.GB9226@hansmi.ch>

On Thu, Oct 25, 2007 at 12:42:22AM +0200, Michael Hanselmann wrote:
> The patch below updates the i440FX/PIIX3 emulation. It does:

I never got any reaction to that patch. Is it still awaiting review?

> This does not yet remove the workaround introduced by Igor Lvovsky's
> patch. However, I'm working on that since it, despite my earlier mail,
> seems to help with my ACPI shutdown problem.

So, I found the bug causing this behaviour. It turned out to be a
wrongly named variable in the ACPI DSDT from Bochs. See the patch for
Bochs below. I already sent it to the bochs-developers list[1].
qemu/pc-bios/bios.bin needs to be rebuilt from Bochs' code,
qemu/pc-bios/bios.diff and my patch.

The second patch below reverts the changes made by Igor Lvovsky. After
applying the patch to the BIOS, ACPI IRQs finally reach the system.

Finding this bug took me about the free time of four weeks. However, I
learned a lot about the internals of a PC. :-)

Thanks,
Michael

[1] http://sourceforge.net/mailarchive/forum.php?thread_name=20071031000835.GA20915%40hansmi.ch&forum_name=bochs-developers

---
Index: bios/acpi-dsdt.dsl
===================================================================
RCS file: /cvsroot/bochs/bochs/bios/acpi-dsdt.dsl,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 acpi-dsdt.dsl
--- bios/acpi-dsdt.dsl	28 Sep 2006 18:56:20 -0000	1.1
+++ bios/acpi-dsdt.dsl	30 Oct 2007 23:52:22 -0000
@@ -369,7 +369,7 @@ DefinitionBlock (
                 Method (_STA, 0, NotSerialized)
                 {
                     Store (0x0B, Local0)
-                    If (And (0x80, PRQ0, Local1))
+                    If (And (0x80, PRQ0, Local0))
                     {
                          Store (0x09, Local0)
                     }
@@ -416,7 +416,7 @@ DefinitionBlock (
                 Method (_STA, 0, NotSerialized)
                 {
                     Store (0x0B, Local0)
-                    If (And (0x80, PRQ1, Local1))
+                    If (And (0x80, PRQ1, Local0))
                     {
                          Store (0x09, Local0)
                     }
@@ -463,7 +463,7 @@ DefinitionBlock (
                 Method (_STA, 0, NotSerialized)
                 {
                     Store (0x0B, Local0)
-                    If (And (0x80, PRQ2, Local1))
+                    If (And (0x80, PRQ2, Local0))
                     {
                          Store (0x09, Local0)
                     }
@@ -510,7 +510,7 @@ DefinitionBlock (
                 Method (_STA, 0, NotSerialized)
                 {
                     Store (0x0B, Local0)
-                    If (And (0x80, PRQ3, Local1))
+                    If (And (0x80, PRQ3, Local0))
                     {
                          Store (0x09, Local0)
                     }

---
diff --git a/hw/piix_pci.c b/hw/piix_pci.c
index 7c7d0f3..eabff8e 100644
--- a/hw/piix_pci.c
+++ b/hw/piix_pci.c
@@ -269,7 +269,6 @@ static void piix3_set_irq(qemu_irq *pic, int irq_num, int level)
 {
     int i, pic_irq, pic_level;
 
-    piix3_dev->config[0x60 + irq_num] &= ~0x80;
     pci_irq_levels[irq_num] = level;
 
     /* now we change the pic irq level according to the piix irq mappings */

  reply	other threads:[~2007-10-31  0:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-24 22:42 [Qemu-devel] [PATCH] Update i440FX/PIIX3 emulation Michael Hanselmann
2007-10-31  0:25 ` Michael Hanselmann [this message]
2007-10-31 13:17   ` Avi Kivity
2007-10-31 18:19     ` Michael Hanselmann

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=20071031002554.GB20915@hansmi.ch \
    --to=qemu@hansmi.ch \
    --cc=igor.lvovsky@qumranet.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).