diff options
author | Peter Crosthwaite | 2016-03-04 12:30:19 +0100 |
---|---|---|
committer | Peter Maydell | 2016-03-04 12:30:19 +0100 |
commit | 9c5a7460389e92d230362a983b5a4158d6a1cefe (patch) | |
tree | c54c5e42126cbee4d2c6a6aa930a630d6660dee0 | |
parent | arm: cpu: handle BE32 user-mode as BE (diff) | |
download | qemu-9c5a7460389e92d230362a983b5a4158d6a1cefe.tar.gz qemu-9c5a7460389e92d230362a983b5a4158d6a1cefe.tar.xz qemu-9c5a7460389e92d230362a983b5a4158d6a1cefe.zip |
linux-user: arm: set CPSR.E/SCTLR.E0E correctly for BE mode
If doing big-endian linux-user mode, set both the CPSR.E and SCTLR.E0E
bits. This sets big-endian mode for data accesses.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | linux-user/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index fe2a8dd6db..510b3b7740 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -4453,7 +4453,8 @@ int main(int argc, char **argv, char **envp) /* Enable BE8. */ if (EF_ARM_EABI_VERSION(info->elf_flags) >= EF_ARM_EABI_VER4 && (info->elf_flags & EF_ARM_BE8)) { - /* nothing for now, CPSR.E not emulated yet */ + env->uncached_cpsr |= CPSR_E; + env->cp15.sctlr_el[1] |= SCTLR_E0E; } else { env->cp15.sctlr_el[1] |= SCTLR_B; } |