qemu-patch-raspberry4/hw/i386
Peter Crosthwaite 7ef295ea5b loader: Add data swap option to load-elf
Some CPUs are of an opposite data-endianness to other components in the
system. Sometimes elfs have the data sections layed out with this CPU
data-endianness accounting for when loaded via the CPU, so byte swaps
(relative to other system components) will occur.

The leading example, is ARM's BE32 mode, which is is basically LE with
address manipulation on half-word and byte accesses to access the
hw/byte reversed address. This means that word data is invariant
across LE and BE32. This also means that instructions are still LE.
The expectation is that the elf will be loaded via the CPU in this
endianness scheme, which means the data in the elf is reversed at
compile time.

As QEMU loads via the system memory directly, rather than the CPU, we
need a mechanism to reverse elf data endianness to implement this
possibility.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-03-04 11:30:21 +00:00
..
kvm x86: Clean up includes 2016-01-29 15:07:22 +00:00
xen xen: drop support for Xen 4.1 and older. 2016-02-10 12:01:16 +00:00
acpi-build.c bios-linker-loader: document+validate input 2016-02-23 12:55:16 +02:00
acpi-build.h pc: Remove compat fields from PcGuestInfo 2016-02-06 20:44:09 +02:00
intel_iommu.c intel_iommu: large page support 2016-02-06 20:44:10 +02:00
intel_iommu_internal.h intel_iommu: large page support 2016-02-06 20:44:10 +02:00
kvmvapic.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
Makefile.objs pc: acpi: remove unused ASL templates and related blobs/utils 2016-01-09 23:20:19 +02:00
multiboot.c loader: Add data swap option to load-elf 2016-03-04 11:30:21 +00:00
multiboot.h refer to FWCfgState explicitly 2013-06-02 18:14:02 +03:00
pc.c qom: Swap 'name' next to visitor in ObjectPropertyAccessor 2016-02-08 17:29:56 +01:00
pc_piix.c pc: Remove PcGuestInfo.isapc_ram_fw field 2016-02-06 20:44:09 +02:00
pc_q35.c q35: No need to check gigabyte_align 2016-02-25 13:14:19 +02:00
pc_sysfw.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
pci-assign-load-rom.c x86: Clean up includes 2016-01-29 15:07:22 +00:00