summaryrefslogtreecommitdiffstats
path: root/hw/arm/armv7m.c
diff options
context:
space:
mode:
authorPeter Maydell2022-08-23 18:04:16 +0200
committerRichard Henderson2022-09-14 12:19:40 +0200
commitf92bd43480bf2da36354e148d139ef2aac12d3f2 (patch)
tree98f9651ab9ac3d25ba1e98ea4d42e0f404052f42 /hw/arm/armv7m.c
parenttarget/arm: Report FEAT_PMUv3p5 for TCG '-cpu max' (diff)
downloadqemu-f92bd43480bf2da36354e148d139ef2aac12d3f2.tar.gz
qemu-f92bd43480bf2da36354e148d139ef2aac12d3f2.tar.xz
qemu-f92bd43480bf2da36354e148d139ef2aac12d3f2.zip
target/arm: Remove useless TARGET_BIG_ENDIAN check in armv7m_load_kernel()
Arm system emulation targets always have TARGET_BIG_ENDIAN clear, so there is no need to have handling in armv7m_load_kernel() for the case when it is defined. Remove the unnecessary code. Side notes: * our M-profile implementation is always little-endian (that is, it makes the IMPDEF choice that the read-only AIRCR.ENDIANNESS is 0) * if we did want to handle big-endian ELF files here we should do it the way that hw/arm/boot.c:arm_load_elf() does, by looking at the ELF header to see what endianness the file itself is Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220823160417.3858216-2-peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'hw/arm/armv7m.c')
-rw-r--r--hw/arm/armv7m.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
index 990861ee5e..fa4c2c735d 100644
--- a/hw/arm/armv7m.c
+++ b/hw/arm/armv7m.c
@@ -572,17 +572,10 @@ void armv7m_load_kernel(ARMCPU *cpu, const char *kernel_filename, int mem_size)
{
ssize_t image_size;
uint64_t entry;
- int big_endian;
AddressSpace *as;
int asidx;
CPUState *cs = CPU(cpu);
-#if TARGET_BIG_ENDIAN
- big_endian = 1;
-#else
- big_endian = 0;
-#endif
-
if (arm_feature(&cpu->env, ARM_FEATURE_EL3)) {
asidx = ARMASIdx_S;
} else {
@@ -593,7 +586,7 @@ void armv7m_load_kernel(ARMCPU *cpu, const char *kernel_filename, int mem_size)
if (kernel_filename) {
image_size = load_elf_as(kernel_filename, NULL, NULL, NULL,
&entry, NULL, NULL,
- NULL, big_endian, EM_ARM, 1, 0, as);
+ NULL, 0, EM_ARM, 1, 0, as);
if (image_size < 0) {
image_size = load_image_targphys_as(kernel_filename, 0,
mem_size, as);