diff options
| author | Michael Weiser <michael.weiser@gmx.de> | 2018-01-11 13:25:31 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2018-01-11 13:25:31 +0000 |
| commit | dfdcf34031db02eb8d81dd3b1c3415ec900c40bb (patch) | |
| tree | 11a7d7aecbc2f14addb5124d1ea03e93d3129ce2 /linux-user/main.c | |
| parent | 612061b277915fadd80631eb7a6926f48a110c44 (diff) | |
| download | focaccia-qemu-dfdcf34031db02eb8d81dd3b1c3415ec900c40bb.tar.gz focaccia-qemu-dfdcf34031db02eb8d81dd3b1c3415ec900c40bb.zip | |
linux-user: Add support for big-endian aarch64
Enable big-endian mode for data accesses on aarch64 for big-endian linux user mode. Activate it for all exception levels as documented by ARM: Set the SCTLR EE bit for ELs 1 through 3. Additionally set bit E0E in EL1 to enable it in EL0 as well. Signed-off-by: Michael Weiser <michael.weiser@gmx.de> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20171220212308.12614-2-michael.weiser@gmx.de Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'linux-user/main.c')
| -rw-r--r-- | linux-user/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index 99a551b04f..450eb3ce65 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -4629,6 +4629,12 @@ int main(int argc, char **argv, char **envp) } env->pc = regs->pc; env->xregs[31] = regs->sp; +#ifdef TARGET_WORDS_BIGENDIAN + env->cp15.sctlr_el[1] |= SCTLR_E0E; + for (i = 1; i < 4; ++i) { + env->cp15.sctlr_el[i] |= SCTLR_EE; + } +#endif } #elif defined(TARGET_ARM) { |