aboutsummaryrefslogtreecommitdiff
path: root/target-sparc
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-29 19:49:15 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-29 19:49:15 +0000
commit32af58f95f7b4e855f0369b25b46cbbbae69ae6c (patch)
tree670e4ea519d7a3ad7f8b0bf836e688d9058a8141 /target-sparc
parentc73c3aa081cae0e565b8669ad7fba192749f8397 (diff)
Fix CPU type zapped by system_reset
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2743 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc')
-rw-r--r--target-sparc/translate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target-sparc/translate.c b/target-sparc/translate.c
index 0812e95a37..645b414228 100644
--- a/target-sparc/translate.c
+++ b/target-sparc/translate.c
@@ -3301,7 +3301,6 @@ extern int ram_size;
void cpu_reset(CPUSPARCState *env)
{
- memset(env, 0, sizeof(*env));
tlb_flush(env, 1);
env->cwp = 0;
env->wim = 1;
@@ -3313,14 +3312,15 @@ void cpu_reset(CPUSPARCState *env)
env->cansave = NWINDOWS - 1;
#endif
#else
+ env->psret = 0;
env->psrs = 1;
env->psrps = 1;
- env->gregs[1] = ram_size;
#ifdef TARGET_SPARC64
env->pstate = PS_PRIV;
env->pc = 0x1fff0000000ULL;
#else
env->pc = 0xffd00000;
+ env->mmuregs[0] &= ~(MMU_E | MMU_NF);
#endif
env->npc = env->pc + 4;
#endif