summaryrefslogtreecommitdiffstats
path: root/hw/vga-isa-mm.c
diff options
context:
space:
mode:
authorAlexander Graf2010-12-08 12:05:37 +0100
committerBlue Swirl2010-12-11 16:24:25 +0100
commit2507c12ab026b2286b0a47035c629f3d568c96f4 (patch)
tree949765d6112d70536a3806eb822798a0e04577da /hw/vga-isa-mm.c
parentexec: introduce endianness swapped mmio (diff)
downloadqemu-2507c12ab026b2286b0a47035c629f3d568c96f4.tar.gz
qemu-2507c12ab026b2286b0a47035c629f3d568c96f4.tar.xz
qemu-2507c12ab026b2286b0a47035c629f3d568c96f4.zip
Add endianness as io mem parameter
As stated before, devices can be little, big or native endian. The target endianness is not of their concern, so we need to push things down a level. This patch adds a parameter to cpu_register_io_memory that allows a device to choose its endianness. For now, all devices simply choose native endian, because that's the same behavior as before. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/vga-isa-mm.c')
-rw-r--r--hw/vga-isa-mm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/vga-isa-mm.c b/hw/vga-isa-mm.c
index 680b557a0b..4954bb18be 100644
--- a/hw/vga-isa-mm.c
+++ b/hw/vga-isa-mm.c
@@ -97,8 +97,10 @@ static void vga_mm_init(ISAVGAMMState *s, target_phys_addr_t vram_base,
int s_ioport_ctrl, vga_io_memory;
s->it_shift = it_shift;
- s_ioport_ctrl = cpu_register_io_memory(vga_mm_read_ctrl, vga_mm_write_ctrl, s);
- vga_io_memory = cpu_register_io_memory(vga_mem_read, vga_mem_write, s);
+ s_ioport_ctrl = cpu_register_io_memory(vga_mm_read_ctrl, vga_mm_write_ctrl, s,
+ DEVICE_NATIVE_ENDIAN);
+ vga_io_memory = cpu_register_io_memory(vga_mem_read, vga_mem_write, s,
+ DEVICE_NATIVE_ENDIAN);
vmstate_register(NULL, 0, &vmstate_vga_common, s);