diff options
author | Andreas Färber <afaerber@suse.de> | 2012-04-11 18:24:49 +0200 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2012-04-14 03:48:08 +0400 |
commit | 5087a72cb3e94f48c1d447babd67e33bfd9dda12 (patch) | |
tree | 268052b43daca566670134666d90f08db4adee04 /target-xtensa/helper.c | |
parent | a4633e16d77bd1cf0c25e500d15943499b94f2f9 (diff) |
target-xtensa: QOM'ify CPU reset
Move code from cpu_state_reset() into QOM xtensa_cpu_reset().
To avoid moving reset_mmu() and dependencies, make it non-static.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'target-xtensa/helper.c')
-rw-r--r-- | target-xtensa/helper.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/target-xtensa/helper.c b/target-xtensa/helper.c index 20338e61c6..000f965d7b 100644 --- a/target-xtensa/helper.c +++ b/target-xtensa/helper.c @@ -33,20 +33,9 @@ #include "hw/loader.h" #endif -static void reset_mmu(CPUXtensaState *env); - void cpu_state_reset(CPUXtensaState *env) { - env->exception_taken = 0; - env->pc = env->config->exception_vector[EXC_RESET]; - env->sregs[LITBASE] &= ~1; - env->sregs[PS] = xtensa_option_enabled(env->config, - XTENSA_OPTION_INTERRUPT) ? 0x1f : 0x10; - env->sregs[VECBASE] = env->config->vecbase; - env->sregs[IBREAKENABLE] = 0; - - env->pending_irq_level = 0; - reset_mmu(env); + cpu_reset(ENV_GET_CPU(env)); } static struct XtensaConfigList *xtensa_cores; @@ -336,7 +325,7 @@ static void reset_tlb_region_way0(CPUXtensaState *env, } } -static void reset_mmu(CPUXtensaState *env) +void reset_mmu(CPUXtensaState *env) { if (xtensa_option_enabled(env->config, XTENSA_OPTION_MMU)) { env->sregs[RASID] = 0x04030201; |