diff options
author | Alexander Graf | 2010-12-08 12:05:37 +0100 |
---|---|---|
committer | Blue Swirl | 2010-12-11 16:24:25 +0100 |
commit | 2507c12ab026b2286b0a47035c629f3d568c96f4 (patch) | |
tree | 949765d6112d70536a3806eb822798a0e04577da /hw/apb_pci.c | |
parent | exec: introduce endianness swapped mmio (diff) | |
download | qemu-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/apb_pci.c')
-rw-r--r-- | hw/apb_pci.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/apb_pci.c b/hw/apb_pci.c index c619112b12..bf00c71d63 100644 --- a/hw/apb_pci.c +++ b/hw/apb_pci.c @@ -410,7 +410,8 @@ static int pci_pbm_init_device(SysBusDevice *dev) /* apb_config */ apb_config = cpu_register_io_memory(apb_config_read, - apb_config_write, s); + apb_config_write, s, + DEVICE_NATIVE_ENDIAN); /* at region 0 */ sysbus_init_mmio(dev, 0x10000ULL, apb_config); @@ -424,7 +425,8 @@ static int pci_pbm_init_device(SysBusDevice *dev) /* pci_ioport */ pci_ioport = cpu_register_io_memory(pci_apb_ioread, - pci_apb_iowrite, s); + pci_apb_iowrite, s, + DEVICE_NATIVE_ENDIAN); /* at region 2 */ sysbus_init_mmio(dev, 0x10000ULL, pci_ioport); |