aboutsummaryrefslogtreecommitdiff
path: root/hw/display
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2015-04-08 09:03:54 +0200
committerGerd Hoffmann <kraxel@redhat.com>2015-06-10 11:01:59 +0200
commit24cdff7c8278849747035f9554f8c538beabf949 (patch)
tree0a80d7c3af2fc58f6d4925dc7fb5d9cea63d6b41 /hw/display
parentb0411142f482df92717f8b4a3b746081a62b724f (diff)
downloadqemu-24cdff7c8278849747035f9554f8c538beabf949.zip
qemu-24cdff7c8278849747035f9554f8c538beabf949.tar.gz
qemu-24cdff7c8278849747035f9554f8c538beabf949.tar.bz2
stdvga: fix offset in pci_vga_ioport_read
Simliar to pci_vga_ioport_write. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/display')
-rw-r--r--hw/display/vga-pci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c
index ff5dfb2..93c8b5d 100644
--- a/hw/display/vga-pci.c
+++ b/hw/display/vga-pci.c
@@ -81,11 +81,11 @@ static uint64_t pci_vga_ioport_read(void *ptr, hwaddr addr,
switch (size) {
case 1:
- ret = vga_ioport_read(&d->vga, addr);
+ ret = vga_ioport_read(&d->vga, addr + 0x3c0);
break;
case 2:
- ret = vga_ioport_read(&d->vga, addr);
- ret |= vga_ioport_read(&d->vga, addr+1) << 8;
+ ret = vga_ioport_read(&d->vga, addr + 0x3c0);
+ ret |= vga_ioport_read(&d->vga, addr + 0x3c1) << 8;
break;
}
return ret;