From 2507c12ab026b2286b0a47035c629f3d568c96f4 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Wed, 8 Dec 2010 12:05:37 +0100 Subject: 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 Signed-off-by: Blue Swirl --- hw/mpcore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hw/mpcore.c') diff --git a/hw/mpcore.c b/hw/mpcore.c index b4db1914b7..fc0521549a 100644 --- a/hw/mpcore.c +++ b/hw/mpcore.c @@ -276,7 +276,8 @@ static int mpcore_priv_init(SysBusDevice *dev) gic_init(&s->gic, s->num_cpu); s->iomemtype = cpu_register_io_memory(mpcore_priv_readfn, - mpcore_priv_writefn, s); + mpcore_priv_writefn, s, + DEVICE_NATIVE_ENDIAN); sysbus_init_mmio_cb(dev, 0x2000, mpcore_priv_map); for (i = 0; i < s->num_cpu * 2; i++) { mpcore_timer_init(s, &s->timer[i], i); -- cgit v1.2.3