Fix CPU type zapped by system_reset
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2743 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
c73c3aa081
commit
32af58f95f
@ -3301,7 +3301,6 @@ extern int ram_size;
|
|||||||
|
|
||||||
void cpu_reset(CPUSPARCState *env)
|
void cpu_reset(CPUSPARCState *env)
|
||||||
{
|
{
|
||||||
memset(env, 0, sizeof(*env));
|
|
||||||
tlb_flush(env, 1);
|
tlb_flush(env, 1);
|
||||||
env->cwp = 0;
|
env->cwp = 0;
|
||||||
env->wim = 1;
|
env->wim = 1;
|
||||||
@ -3313,14 +3312,15 @@ void cpu_reset(CPUSPARCState *env)
|
|||||||
env->cansave = NWINDOWS - 1;
|
env->cansave = NWINDOWS - 1;
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
|
env->psret = 0;
|
||||||
env->psrs = 1;
|
env->psrs = 1;
|
||||||
env->psrps = 1;
|
env->psrps = 1;
|
||||||
env->gregs[1] = ram_size;
|
|
||||||
#ifdef TARGET_SPARC64
|
#ifdef TARGET_SPARC64
|
||||||
env->pstate = PS_PRIV;
|
env->pstate = PS_PRIV;
|
||||||
env->pc = 0x1fff0000000ULL;
|
env->pc = 0x1fff0000000ULL;
|
||||||
#else
|
#else
|
||||||
env->pc = 0xffd00000;
|
env->pc = 0xffd00000;
|
||||||
|
env->mmuregs[0] &= ~(MMU_E | MMU_NF);
|
||||||
#endif
|
#endif
|
||||||
env->npc = env->pc + 4;
|
env->npc = env->pc + 4;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user