From 41a4a86354b7c187670c83683679b0035ba07281 Mon Sep 17 00:00:00 2001 Message-Id: <41a4a86354b7c187670c83683679b0035ba07281.1353591647.git.minovotn@redhat.com> In-Reply-To: <1dc297bcb7aa8724f5115f44e391085ce543d79a.1353591647.git.minovotn@redhat.com> References: <1dc297bcb7aa8724f5115f44e391085ce543d79a.1353591647.git.minovotn@redhat.com> From: Gerd Hoffmann Date: Mon, 19 Nov 2012 11:04:32 +0100 Subject: [PATCH 3/3] vga: fix bochs alignment issue RH-Author: Gerd Hoffmann Message-id: <1353323072-13235-1-git-send-email-kraxel@redhat.com> Patchwork-id: 44278 O-Subject: [RHEL-6.4 qemu-kvm PATCH] vga: fix bochs alignment issue Bugzilla: 877933 RH-Acked-by: Hans de Goede RH-Acked-by: Laszlo Ersek RH-Acked-by: Paolo Bonzini 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. Signed-off-by: Gerd Hoffmann (cherry picked from commit df9ffb726ff13f850b8829be1bc85ed621b903ac) bugzilla: 877933 Conflicts: docs/specs/standard-vga.txt hw/vga.c --- hw/vga.c | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-) Signed-off-by: Michal Novotny --- hw/vga.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/hw/vga.c b/hw/vga.c index db40065..2407c28 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -2343,19 +2343,16 @@ void vga_init(VGACommonState *s) s->bank_offset = 0; #ifdef CONFIG_BOCHS_VBE -#if defined (TARGET_I386) register_ioport_read(0x1ce, 1, 2, vbe_ioport_read_index, s); - register_ioport_read(0x1cf, 1, 2, vbe_ioport_read_data, s); - register_ioport_write(0x1ce, 1, 2, vbe_ioport_write_index, s); + +#if defined (TARGET_I386) + register_ioport_read(0x1cf, 1, 2, vbe_ioport_read_data, s); register_ioport_write(0x1cf, 1, 2, vbe_ioport_write_data, s); -#else - register_ioport_read(0x1ce, 1, 2, vbe_ioport_read_index, s); - register_ioport_read(0x1d0, 1, 2, vbe_ioport_read_data, s); +#endif - register_ioport_write(0x1ce, 1, 2, vbe_ioport_write_index, s); + register_ioport_read(0x1d0, 1, 2, vbe_ioport_read_data, s); register_ioport_write(0x1d0, 1, 2, vbe_ioport_write_data, s); -#endif #endif /* CONFIG_BOCHS_VBE */ vga_io_memory = cpu_register_io_memory(vga_mem_read, vga_mem_write, s); -- 1.7.11.7