aboutsummaryrefslogtreecommitdiff
path: root/hw/pci-host
diff options
context:
space:
mode:
authorHervé Poussineau <hpoussin@reactos.org>2014-02-11 23:46:02 +0100
committerMichael S. Tsirkin <mst@redhat.com>2014-03-09 21:09:38 +0200
commit175f099b30d4736d23384a838b5f324961f67a1e (patch)
tree8196dd8b9ce6d0824fcf2c281d9d7c59a48dfc1f /hw/pci-host
parent15d914b18dd7a9a3bd85291f476613b2f9c2caa6 (diff)
pam: partly fix write-only mode
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> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci-host')
-rw-r--r--hw/pci-host/pam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pci-host/pam.c b/hw/pci-host/pam.c
index ec6be4676c..e1e95aabcd 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) {