Commit 32af58f95f7b4e855f0369b25b46cbbbae69ae6c
1 parent
c73c3aa0
Fix CPU type zapped by system_reset
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2743 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
2 additions
and
2 deletions
target-sparc/translate.c
... | ... | @@ -3301,7 +3301,6 @@ extern int ram_size; |
3301 | 3301 | |
3302 | 3302 | void cpu_reset(CPUSPARCState *env) |
3303 | 3303 | { |
3304 | - memset(env, 0, sizeof(*env)); | |
3305 | 3304 | tlb_flush(env, 1); |
3306 | 3305 | env->cwp = 0; |
3307 | 3306 | env->wim = 1; |
... | ... | @@ -3313,14 +3312,15 @@ void cpu_reset(CPUSPARCState *env) |
3313 | 3312 | env->cansave = NWINDOWS - 1; |
3314 | 3313 | #endif |
3315 | 3314 | #else |
3315 | + env->psret = 0; | |
3316 | 3316 | env->psrs = 1; |
3317 | 3317 | env->psrps = 1; |
3318 | - env->gregs[1] = ram_size; | |
3319 | 3318 | #ifdef TARGET_SPARC64 |
3320 | 3319 | env->pstate = PS_PRIV; |
3321 | 3320 | env->pc = 0x1fff0000000ULL; |
3322 | 3321 | #else |
3323 | 3322 | env->pc = 0xffd00000; |
3323 | + env->mmuregs[0] &= ~(MMU_E | MMU_NF); | |
3324 | 3324 | #endif |
3325 | 3325 | env->npc = env->pc + 4; |
3326 | 3326 | #endif | ... | ... |