aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-04 01:54:44 +0000
committerj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-04 01:54:44 +0000
commit1cc8e6f067f9048556af1d1863271db55b15efc1 (patch)
treec6b37c4c32d09ac2b4c4ec59ce74ef6d3901937b /hw
parente57448f11cb29c9b36acd117349070fe290465fa (diff)
We must reset the PowerPC CPU _after_ registering it, as hardware reset
effect is implementation dependant. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3323 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r--hw/ppc405_uc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/ppc405_uc.c b/hw/ppc405_uc.c
index b6fc491ae0..8a31475ed1 100644
--- a/hw/ppc405_uc.c
+++ b/hw/ppc405_uc.c
@@ -51,20 +51,22 @@ CPUState *ppc405_init (const unsigned char *cpu_model,
/* init CPUs */
env = cpu_init();
- qemu_register_reset(&cpu_ppc_reset, env);
- register_savevm("cpu", 0, 3, cpu_save, cpu_load, env);
ppc_find_by_name(cpu_model, &def);
if (def == NULL) {
cpu_abort(env, "Unable to find PowerPC %s CPU definition\n",
cpu_model);
}
cpu_ppc_register(env, def);
+ cpu_ppc_reset(env);
cpu_clk->cb = NULL; /* We don't care about CPU clock frequency changes */
cpu_clk->opaque = env;
/* Set time-base frequency to sysclk */
tb_clk->cb = ppc_emb_timers_init(env, sysclk);
tb_clk->opaque = env;
ppc_dcr_init(env, NULL, NULL);
+ /* Register Qemu callbacks */
+ qemu_register_reset(&cpu_ppc_reset, env);
+ register_savevm("cpu", 0, 3, cpu_save, cpu_load, env);
return env;
}