From: "Hervé Poussineau" <hpoussin@reactos.org>
To: qemu-devel@nongnu.org
Cc: "Hervé Poussineau" <hpoussin@reactos.org>,
"Anthony Liguori" <aliguori@amazon.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: [Qemu-devel] [PATCH 1/2] pam: partly fix write-only mode
Date: Tue, 11 Feb 2014 23:46:02 +0100 [thread overview]
Message-ID: <1392158763-6552-2-git-send-email-hpoussin@reactos.org> (raw)
In-Reply-To: <1392158763-6552-1-git-send-email-hpoussin@reactos.org>
In write-only mode, writes are forwarded to RAM, while reads should not be
handled (ie should return 0xff).
Assume that in this mode, no read access is ever done, as they shouldn't
give any sensible result.
So, in write-only mode, alias PAM region to RAM, instead of PCI memory
(which can even be mapped to some device!)
This fixes Award BIOS, which use this mode to shadow system BIOS and video BIOS.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
---
hw/pci-host/pam.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/pci-host/pam.c b/hw/pci-host/pam.c
index ec6be46..e1e95aa 100644
--- a/hw/pci-host/pam.c
+++ b/hw/pci-host/pam.c
@@ -68,7 +68,7 @@ void init_pam(DeviceState *dev, MemoryRegion *ram_memory,
/* XXX: should distinguish read/write cases */
memory_region_init_alias(&mem->alias[0], OBJECT(dev), "pam-pci", pci_address_space,
start, size);
- memory_region_init_alias(&mem->alias[2], OBJECT(dev), "pam-pci", pci_address_space,
+ memory_region_init_alias(&mem->alias[2], OBJECT(dev), "pam-pci", ram_memory,
start, size);
for (i = 0; i < 4; ++i) {
--
1.7.10.4
next prev parent reply other threads:[~2014-02-11 22:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-11 22:46 [Qemu-devel] [PATCH 0/2] PC: improve emulation correctness Hervé Poussineau
2014-02-11 22:46 ` Hervé Poussineau [this message]
2014-02-11 22:46 ` [Qemu-devel] [PATCH 2/2] pckbd: return 'keyboard enabled' on read input port command Hervé Poussineau
2014-03-03 22:05 ` [Qemu-devel] [PATCH 0/2] PC: improve emulation correctness Hervé Poussineau
2014-03-04 23:49 ` Michael S. Tsirkin
2014-03-05 8:15 ` Paolo Bonzini
2014-03-05 21:48 ` Hervé Poussineau
2014-03-05 18:50 ` Andreas Färber
2014-03-05 21:47 ` Hervé Poussineau
2014-03-05 18:46 ` Michael S. Tsirkin
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=1392158763-6552-2-git-send-email-hpoussin@reactos.org \
--to=hpoussin@reactos.org \
--cc=aliguori@amazon.com \
--cc=mst@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).