mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-29 13:23:54 -06:00
linux-user: ppc64: set MSR_CM bit for BookE 2.06 MMU
64 bit user mode doesn't work for the e5500 core because the MSR_CM bit is not set which enables the 64 bit mode for this MMU model. Memory addresses are truncated to 32 bit, which results in "Invalid data memory access" error messages. Fix it by setting the MSR_CM bit for this MMU model. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
This commit is contained in:
parent
ee8e76141b
commit
c836112997
1 changed files with 3 additions and 2 deletions
|
@ -4615,10 +4615,11 @@ int main(int argc, char **argv, char **envp)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
#if defined(TARGET_PPC64)
|
#if defined(TARGET_PPC64)
|
||||||
|
int flag = (env->insns_flags2 & PPC2_BOOKE206) ? MSR_CM : MSR_SF;
|
||||||
#if defined(TARGET_ABI32)
|
#if defined(TARGET_ABI32)
|
||||||
env->msr &= ~((target_ulong)1 << MSR_SF);
|
env->msr &= ~((target_ulong)1 << flag);
|
||||||
#else
|
#else
|
||||||
env->msr |= (target_ulong)1 << MSR_SF;
|
env->msr |= (target_ulong)1 << flag;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
env->nip = regs->nip;
|
env->nip = regs->nip;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue