提交 dfdcf340 编写于 作者: M Michael Weiser 提交者: Peter Maydell

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: NMichael Weiser <michael.weiser@gmx.de>
Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
Message-id: 20171220212308.12614-2-michael.weiser@gmx.de
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
上级 612061b2
......@@ -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)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册