Revision 1cc8e6f0
b/hw/ppc405_uc.c | ||
---|---|---|
51 | 51 |
|
52 | 52 |
/* init CPUs */ |
53 | 53 |
env = cpu_init(); |
54 |
qemu_register_reset(&cpu_ppc_reset, env); |
|
55 |
register_savevm("cpu", 0, 3, cpu_save, cpu_load, env); |
|
56 | 54 |
ppc_find_by_name(cpu_model, &def); |
57 | 55 |
if (def == NULL) { |
58 | 56 |
cpu_abort(env, "Unable to find PowerPC %s CPU definition\n", |
59 | 57 |
cpu_model); |
60 | 58 |
} |
61 | 59 |
cpu_ppc_register(env, def); |
60 |
cpu_ppc_reset(env); |
|
62 | 61 |
cpu_clk->cb = NULL; /* We don't care about CPU clock frequency changes */ |
63 | 62 |
cpu_clk->opaque = env; |
64 | 63 |
/* Set time-base frequency to sysclk */ |
65 | 64 |
tb_clk->cb = ppc_emb_timers_init(env, sysclk); |
66 | 65 |
tb_clk->opaque = env; |
67 | 66 |
ppc_dcr_init(env, NULL, NULL); |
67 |
/* Register Qemu callbacks */ |
|
68 |
qemu_register_reset(&cpu_ppc_reset, env); |
|
69 |
register_savevm("cpu", 0, 3, cpu_save, cpu_load, env); |
|
68 | 70 |
|
69 | 71 |
return env; |
70 | 72 |
} |
b/linux-user/main.c | ||
---|---|---|
2100 | 2100 |
"Unable to find PowerPC CPU definition\n"); |
2101 | 2101 |
} |
2102 | 2102 |
cpu_ppc_register(env, def); |
2103 |
|
|
2103 |
cpu_ppc_reset(env); |
|
2104 | 2104 |
for (i = 0; i < 32; i++) { |
2105 | 2105 |
if (i != 12 && i != 6 && i != 13) |
2106 | 2106 |
env->msr[i] = (regs->msr >> i) & 1; |
Also available in: Unified diff