From 3eab1690851fa68698612d9dd9d5231759f549c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 11 Apr 2012 01:37:45 +0200 Subject: target-lm32: QOM'ify CPU reset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move code from cpu_state_reset() into QOM lm32_cpu_reset(). Signed-off-by: Andreas Färber Acked-by: Michael Walle --- target-lm32/cpu.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'target-lm32/cpu.c') diff --git a/target-lm32/cpu.c b/target-lm32/cpu.c index 70251d0544..48a5fe3f86 100644 --- a/target-lm32/cpu.c +++ b/target-lm32/cpu.c @@ -29,9 +29,17 @@ static void lm32_cpu_reset(CPUState *s) LM32CPUClass *lcc = LM32_CPU_GET_CLASS(cpu); CPULM32State *env = &cpu->env; + if (qemu_loglevel_mask(CPU_LOG_RESET)) { + qemu_log("CPU Reset (CPU %d)\n", env->cpu_index); + log_cpu_state(env, 0); + } + lcc->parent_reset(s); - cpu_state_reset(env); + tlb_flush(env, 1); + + /* reset cpu state */ + memset(env, 0, offsetof(CPULM32State, breakpoints)); } static void lm32_cpu_initfn(Object *obj) -- cgit v1.2.3