Skip to contentSkip to conversation

vga: fix bochs alignment issue

PATCH New Gerd Hoffmann 1 participant 1 message Nov 12, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 hw/vga.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
hw/vga.c +1 -2
index 81aa76b..2b0200a 100644
@@ -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