qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: dwmw2@infradead.org, aliguori@us.ibm.com, lersek@redhat.com,
	afaerber@suse.de
Subject: [Qemu-devel] [PATCH v2 2/3] pc: port 92 reset requires a low->high transition
Date: Tue,  5 Mar 2013 20:00:55 +0100	[thread overview]
Message-ID: <1362510056-3316-3-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1362510056-3316-1-git-send-email-pbonzini@redhat.com>

The PIIX datasheet says that "before another INIT pulse can be
generated via [port 92h], [bit 0] must be written back to a
zero.

This bug is masked right now because a full reset will clear the
value of port 92h.  But once we implement soft reset correctly,
the next attempt to enable the A20 line by setting bit 1 (and
leaving the others untouched) will cause another reset.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/pc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/pc.c b/hw/pc.c
index 37f6b52..3e1cf2e 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -437,11 +437,12 @@ static void port92_write(void *opaque, hwaddr addr, uint64_t val,
                          unsigned size)
 {
     Port92State *s = opaque;
+    int oldval = s->outport;
 
     DPRINTF("port92: write 0x%02x\n", val);
     s->outport = val;
     qemu_set_irq(*s->a20_out, (val >> 1) & 1);
-    if (val & 1) {
+    if ((val & 1) && !(oldval & 1)) {
         qemu_system_reset_request();
     }
 }
-- 
1.8.1.2

  parent reply	other threads:[~2013-03-05 19:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-05 19:00 [Qemu-devel] [PATCH v2 0/3] Implement x86 soft reset Paolo Bonzini
2013-03-05 19:00 ` [Qemu-devel] [PATCH v2 1/3] cpu: make CPU_INTERRUPT_RESET available on all targets Paolo Bonzini
2013-03-05 23:23   ` Peter Maydell
2013-03-06  8:49     ` Paolo Bonzini
2013-03-06  2:02   ` Peter Crosthwaite
2013-03-06  9:13     ` Paolo Bonzini
2013-03-06 11:54       ` Andreas Färber
2013-03-06 12:12       ` Peter Maydell
2013-03-06 12:19         ` Paolo Bonzini
2013-03-05 19:00 ` Paolo Bonzini [this message]
2013-03-05 19:00 ` [Qemu-devel] [PATCH v2 3/3] hw: correctly implement soft reset Paolo Bonzini
2013-03-06  2:02   ` li guang
2013-03-06  8:36     ` Paolo Bonzini
2013-03-06  9:06       ` li guang
2013-03-06  9:23         ` Paolo Bonzini
2013-03-05 19:35 ` [Qemu-devel] [PATCH v2 0/3] Implement x86 " Laszlo Ersek

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=1362510056-3316-3-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=dwmw2@infradead.org \
    --cc=lersek@redhat.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).