@@ -49,19 +49,30 @@ static bool alpha_cpu_has_work(CPUState *cs)
/* CPUClass::reset() */
static void alpha_cpu_reset(CPUState *s)
{
+#ifdef CONFIG_SOFTMMU
AlphaCPU *cpu = ALPHA_CPU(s);
AlphaCPUClass *acc = ALPHA_CPU_GET_CLASS(cpu);
CPUAlphaState *env = &cpu->env;
+ uint64_t palbr;
if (qemu_loglevel_mask(CPU_LOG_RESET)) {
qemu_log("CPU Reset (CPU %d)\n", s->cpu_index);
- log_cpu_state(env, 0);
+ log_cpu_state(s, 0);
}
acc->parent_reset(s);
- memset(env, 0, offsetof(CPUAlphaState, breakpoints));
- tlb_flush(env, 1);
+ palbr = env->palbr;
+
+ memset(env, 0, offsetof(CPUAlphaState, error_code));
+ tlb_flush(s, 1);
+
+ /* Reset vector goes to palbr + 0. */
+ env->palbr = palbr;
+ env->pc = palbr;
+#else
+ abort();
+#endif
}
static void alpha_cpu_realizefn(DeviceState *dev, Error **errp)