aboutsummaryrefslogtreecommitdiff
path: root/hw/vga-pci.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2012-11-17 16:38:05 +0000
committerBlue Swirl <blauwirbel@gmail.com>2012-11-17 16:38:05 +0000
commitab4dd33dc3127a3830591b597a1f42be3686e1fd (patch)
treedf00e3eb08af8c6da6745acf62d085e2cda5f028 /hw/vga-pci.c
parent83eeb39669a19716a44bcad5a34158543b3779b8 (diff)
parentc96c53b5f10c4b34e9fe1dcb1a5aadf204c16279 (diff)
Merge branch 'vga.1' of git://git.kraxel.org/qemu
* 'vga.1' of git://git.kraxel.org/qemu: vga: fix mmio vga register mapping vga: fix bochs alignment issue
Diffstat (limited to 'hw/vga-pci.c')
-rw-r--r--hw/vga-pci.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/vga-pci.c b/hw/vga-pci.c
index ec29cac7f4..947e35c76f 100644
--- a/hw/vga-pci.c
+++ b/hw/vga-pci.c
@@ -84,9 +84,10 @@ static void pci_vga_ioport_write(void *ptr, hwaddr addr,
uint64_t val, unsigned size)
{
PCIVGAState *d = ptr;
+
switch (size) {
case 1:
- vga_ioport_write(&d->vga, addr, val);
+ vga_ioport_write(&d->vga, addr + 0x3c0, val);
break;
case 2:
/*
@@ -94,8 +95,8 @@ static void pci_vga_ioport_write(void *ptr, hwaddr addr,
* indexed registers with a single word write because the
* index byte is updated first.
*/
- vga_ioport_write(&d->vga, addr, val & 0xff);
- vga_ioport_write(&d->vga, addr+1, (val >> 8) & 0xff);
+ vga_ioport_write(&d->vga, addr + 0x3c0, val & 0xff);
+ vga_ioport_write(&d->vga, addr + 0x3c1, (val >> 8) & 0xff);
break;
}
}