]> xenbits.xensource.com Git - qemu-xen-4.4-testing.git/commitdiff
Fix wrong number of clean/saveable windows, match Linux startup register values
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 7 Jul 2007 20:48:42 +0000 (20:48 +0000)
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 7 Jul 2007 20:48:42 +0000 (20:48 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3050 c046a42c-6fe2-441c-8c8c-71466251a162

target-sparc/cpu.h
target-sparc/translate.c

index 7fbc19d14219070a52d0efa3bd437193b748f9a6..a3d762f7f9081ca600453afeac05493856efe547 100644 (file)
@@ -89,6 +89,7 @@
 #if defined(TARGET_SPARC64)
 #define PS_IG    (1<<11)
 #define PS_MG    (1<<10)
+#define PS_RMO   (1<<7)
 #define PS_RED   (1<<5)
 #define PS_PEF   (1<<4)
 #define PS_AM    (1<<3)
index c69ffd9afd86c8aba04ba540a42336cb49219384..a2f3d5bd34d55577693296a862d88f2141fcc6e7 100644 (file)
@@ -3315,8 +3315,10 @@ void cpu_reset(CPUSPARCState *env)
 #if defined(CONFIG_USER_ONLY)
     env->user_mode_only = 1;
 #ifdef TARGET_SPARC64
-    env->cleanwin = NWINDOWS - 1;
-    env->cansave = NWINDOWS - 1;
+    env->cleanwin = NWINDOWS - 2;
+    env->cansave = NWINDOWS - 2;
+    env->pstate = PS_RMO | PS_PEF | PS_IE;
+    env->asi = 0x82; // Primary no-fault
 #endif
 #else
     env->psret = 0;