Commit fe463b7dbc16cc66f3b9a8b7be197fb340378fa3
1 parent
32938e12
target-ppc: initialize MSR appropriately in user-mode
Mask the initial MSR with the mask from the PowerPC CPU definition. Noticed by Nathan Froyd. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5964 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
1 additions
and
1 deletions
target-ppc/helper.c
... | ... | @@ -2904,12 +2904,12 @@ void cpu_ppc_reset (void *opaque) |
2904 | 2904 | #if defined(CONFIG_USER_ONLY) |
2905 | 2905 | msr |= (target_ulong)1 << MSR_FP; /* Allow floating point usage */ |
2906 | 2906 | msr |= (target_ulong)1 << MSR_PR; |
2907 | + env->msr = msr & env->msr_mask; | |
2907 | 2908 | #else |
2908 | 2909 | env->nip = env->hreset_vector | env->excp_prefix; |
2909 | 2910 | if (env->mmu_model != POWERPC_MMU_REAL) |
2910 | 2911 | ppc_tlb_invalidate_all(env); |
2911 | 2912 | #endif |
2912 | - env->msr = msr; | |
2913 | 2913 | hreg_compute_hflags(env); |
2914 | 2914 | env->reserve = (target_ulong)-1ULL; |
2915 | 2915 | /* Be sure no exception or interrupt is pending */ |
... | ... |