Commit 6ef905f69cbeb03e8fe204d8aaa354d77f13a7d7

Authored by blueswir1
1 parent 7f84a729

Fix wrong number of clean/saveable windows, match Linux startup register values


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3050 c046a42c-6fe2-441c-8c8c-71466251a162
target-sparc/cpu.h
... ... @@ -89,6 +89,7 @@
89 89 #if defined(TARGET_SPARC64)
90 90 #define PS_IG (1<<11)
91 91 #define PS_MG (1<<10)
  92 +#define PS_RMO (1<<7)
92 93 #define PS_RED (1<<5)
93 94 #define PS_PEF (1<<4)
94 95 #define PS_AM (1<<3)
... ...
target-sparc/translate.c
... ... @@ -3315,8 +3315,10 @@ void cpu_reset(CPUSPARCState *env)
3315 3315 #if defined(CONFIG_USER_ONLY)
3316 3316 env->user_mode_only = 1;
3317 3317 #ifdef TARGET_SPARC64
3318   - env->cleanwin = NWINDOWS - 1;
3319   - env->cansave = NWINDOWS - 1;
  3318 + env->cleanwin = NWINDOWS - 2;
  3319 + env->cansave = NWINDOWS - 2;
  3320 + env->pstate = PS_RMO | PS_PEF | PS_IE;
  3321 + env->asi = 0x82; // Primary no-fault
3320 3322 #endif
3321 3323 #else
3322 3324 env->psret = 0;
... ...