vga bugfixes
Hi,
Two little fixes for the standard vga, sent to
the list for review earlier this week.
please pull,
Gerd
The following changes since commit 6801038bc52d61f81ac8a25fbe392f1bad982887:
target-mips: fix wrong microMIPS opcode encoding (2012-11-15 14:48:16 +0100)
are available in the git repository at:
git://git.kraxel.org/qemu vga.1
Gerd Hoffmann (2):
vga: fix bochs alignment issue
vga: fix mmio vga register mapping
docs/specs/standard-vga.txt | 3 ++- hw/vga-pci.c | 7 ++++--- hw/vga.c | 3 +-- 3 files changed, 7 insertions(+), 6 deletions(-)
PATCH 1/2 vga: fix bochs alignment issue
The bochs dispi interface traditionally uses port 0x1ce as 16bit index register and port 0x1cf as 16bit data register. The later is unaligned, and probably for that reason the the data register was moved to 0x1d0 for non-x86 archs.
This patch makes the data register available at 0x1d0 on x86 too. The old x86 location is kept for compatibility reasons, so both 0x1cf and 0x1d0 can be used as data register on x86.
--- docs/specs/standard-vga.txt | 3 ++- hw/vga.c | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-)
docs/specs/standard-vga.txt +2 -1
@@ -36,7 +36,8 @@ IO ports used 03c0 - 03df : standard vga ports 01ce : bochs vbe interface index port -01cf : bochs vbe interface data port +01cf : bochs vbe interface data port (x86 only) +01d0 : bochs vbe interface data port Memory regions used
hw/vga.c +1 -2
@@ -2321,9 +2321,8 @@ static const MemoryRegionPortio vbe_portio_list[] = { { 0, 1, 2, .read = vbe_ioport_read_index, .write = vbe_ioport_write_index }, # ifdef TARGET_I386 { 1, 1, 2, .read = vbe_ioport_read_data, .write = vbe_ioport_write_data }, -# else - { 2, 1, 2, .read = vbe_ioport_read_data, .write = vbe_ioport_write_data }, # endif + { 2, 1, 2, .read = vbe_ioport_read_data, .write = vbe_ioport_write_data }, PORTIO_END_OF_LIST(), };
Signature · 1 line
1.7.1
PATCH 2/2 vga: fix mmio vga register mapping
In reply to Gerd Hoffmann--- hw/vga-pci.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
hw/vga-pci.c +4 -3
@@ -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 ; } }
Signature · 1 line
1.7.1
Quoted 6 lines · Gerd Hoffmann
Hi,
Two little fixes for the standard vga, sent to
the list for review earlier this week.please pull,
Thanks, pulled.
Quoted 18 lines
Gerd
The following changes since commit
6801038bc52d61f81ac8a25fbe392f1bad982887:target-mips: fix wrong microMIPS opcode encoding (2012-11-15 14:48:16 +0100)
are available in the git repository at:
git://git.kraxel.org/qemuvga.1Gerd Hoffmann (2):
vga: fix bochs alignment issue
vga: fix mmio vga register mappingdocs/specs/standard-vga.txt | 3 ++- hw/vga-pci.c | 7 ++++--- hw/vga.c | 3 +-- 3 files changed, 7 insertions(+), 6 deletions(-)