qemu-e2k/hw
Peter Maydell 7dc176bce4 hw/pci-host/prep: Don't reverse IO accesses on bigendian hosts
The raven_io_read() and raven_io_write() functions pass and
return values in little-endian format (since the IO op struct
is marked DEVICE_LITTLE_ENDIAN); however they were storing the
values in the buffer to pass to address_space_read/write()
in host-endian order, which meant that on big-endian hosts
the values were inadvertently reversed. Use the *_le_p()
accessors instead so that we are consistent regardless of
host endianness.

Strictly speaking the byte order of the buffer for
address_space_rw() is target byte order (which for PPC
will be BE) but it doesn't actually matter as long as we
are consistent about the marking on the IO op struct and
which stl_*_p().

This bug was probably introduced due to confusion caused by
the two different versions of ldl_p() and friends:
 bswap.h defines versions meaning "host endianness access"
 cpu-all.h defines versions meaning "target endianness access"
As a target-independent source file prep.c gets the bswap.h
versions; the very similar looking code in ioport.c is
compiled per-target and gets the cpu-all.h versions.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1396972271-22660-1-git-send-email-peter.maydell@linaro.org
Reviewed-by: Richard Henderson <rth@twiddle.net>
2014-04-08 18:37:45 +01:00
..
9pfs hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation 2014-03-04 00:57:57 +05:30
acpi acpi: Assert sts array limit on AcpiCpuHotplug_add() 2014-03-18 16:08:43 +02:00
alpha exec: Make stq_*_phys input an AddressSpace 2014-02-11 22:57:12 +10:00
arm hw/arm/vexpress, hw/arm/highbank: Don't insist that CPU has reset-cbar property 2014-04-04 18:01:09 +01:00
audio audio: Add 'static' attributes to several variables 2014-03-15 13:54:18 +04:00
block dataplane: replace iothread object_add() with embedded instance 2014-04-04 20:48:13 +02:00
bt
char char/serial: Fix emptyness handling 2014-04-07 14:51:32 +01:00
core fw-path-provider: Change GPL version to 2+ 2014-04-07 15:36:07 +02:00
cpu icc_bus: QOM'ify ICC 2013-12-24 18:02:18 +01:00
cris cris: Remove the CRIS PIC glue 2014-02-03 14:04:00 +00:00
display ui/vnc: fix vmware VGA incompatiblities 2014-03-18 08:21:24 +01:00
dma qom: Add check() argument to object_property_add_link() 2014-03-19 22:23:13 +01:00
gpio max7310: QOM'ify 2014-02-14 16:22:32 +01:00
i2c i2c: Rename i2c_bus to I2CBus 2014-02-14 16:22:31 +01:00
i386 dsdt: tweak ACPI ID for hotplug resource device 2014-04-08 15:22:59 +03:00
ide hw/ide: Add missing 'static' attributes 2014-03-27 19:22:48 +04:00
input pckbd: return 'keyboard enabled' on read input port command 2014-03-09 21:09:38 +02:00
intc PPC: openpic_kvm: Filter memory events properly 2014-04-03 12:43:17 +01:00
ipack ipack: Move IndustryPack out of hw/char/ 2014-02-14 21:11:53 +01:00
isa QOM infrastructure fixes and device conversions 2014-02-20 13:05:48 +00:00
lm32 hw/lm32: print error if cpu model is not found 2014-02-04 19:47:39 +01:00
m68k
microblaze xilinx: Delete hw/include/xilinx.h 2014-02-26 14:54:45 +10:00
mips i2c: Rename i2c_bus to I2CBus 2014-02-14 16:22:31 +01:00
misc tmp105: Read temperature in milli-celsius 2014-03-31 22:49:40 +02:00
moxie moxie: fix load_elf() usage 2014-03-05 03:06:46 +01:00
net virtio-net: add vlan receive state to RxFilterInfo 2014-03-26 12:49:10 +02:00
nvram vl.c: Extend get_boot_devices_list() to ignore suffixes 2014-03-20 02:40:07 +01:00
openrisc
pci pci: Fix clearing IRQs on reset 2014-03-31 19:53:34 +01:00
pci-bridge pci/shpc: convert SHPC hotplug to use hotplug-handler API 2014-02-10 10:27:00 +02:00
pci-host hw/pci-host/prep: Don't reverse IO accesses on bigendian hosts 2014-04-08 18:37:45 +01:00
pcmcia qom: Add check() argument to object_property_add_link() 2014-03-19 22:23:13 +01:00
ppc ppce500_spin: Initialize struct properly 2014-04-08 11:20:05 +02:00
s390x qom: Add check() argument to object_property_add_link() 2014-03-19 22:23:13 +01:00
scsi scsi-bus: remove bogus assertion 2014-04-02 13:24:23 +02:00
sd ssi: Convert legacy SSI_SLAVE -> DEVICE casts 2014-03-12 20:13:02 +01:00
sh4 cputlb: Change tlb_flush() argument to CPUState 2014-03-13 19:52:47 +01:00
sparc sun4m: Add Sun CG3 framebuffer initialisation function 2014-02-27 10:01:41 +00:00
sparc64
ssi ssi: Convert legacy SSI_BUS -> BUS casts 2014-03-12 20:13:02 +01:00
timer acpi,pc,build bug fixes 2014-03-28 13:46:29 +00:00
tpm
unicore32 console: add head to index to qemu consoles. 2014-03-05 09:52:04 +01:00
usb hw/usb/hcd-ohci.c: Avoid shifting left into sign bit 2014-03-27 19:22:49 +04:00
virtio virtio-rng: Avoid default_backend refcount leak 2014-03-19 22:23:47 +01:00
watchdog qemu-option: Remove qemu_opts_create_nofail 2014-01-06 15:02:30 -05:00
xen Call pci_piix3_xen_ide_unplug from unplug_disks 2014-02-20 17:28:08 +00:00
xtensa hw/xtensa: add support for ML605 and KC705 FPGA board 2014-02-24 04:47:01 +04:00
Makefile.objs hw/9pfs: Include virtio-9p-device.o in build 2014-03-04 09:20:49 +05:30