macio: Fix timer endianness
authorAlexander Graf <agraf@suse.de>
Mon, 26 May 2014 23:59:06 +0000 (01:59 +0200)
committerAlexander Graf <agraf@suse.de>
Mon, 16 Jun 2014 11:24:38 +0000 (13:24 +0200)
The timer registers on our KeyLargo macio emulation are read as byte reversed
from the big endian guest, so we better expose them endian reversed as well.

This fixes initial hickups of booting Mac OS X with -M mac99 for me.

Signed-off-by: Alexander Graf <agraf@suse.de>
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
hw/misc/macio/macio.c

index 7f99aa0d5c4213efa2972e6bfe63d88b6679c238..47f45f5d2c0287d485cbd917e5aa0fc84b82c96f 100644 (file)
@@ -259,7 +259,7 @@ static uint64_t timer_read(void *opaque, hwaddr addr, unsigned size)
 static const MemoryRegionOps timer_ops = {
     .read = timer_read,
     .write = timer_write,
-    .endianness = DEVICE_NATIVE_ENDIAN,
+    .endianness = DEVICE_LITTLE_ENDIAN,
 };
 
 static int macio_newworld_initfn(PCIDevice *d)