diff options
author | Andreas Färber <afaerber@suse.de> | 2012-05-04 02:09:06 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-06-04 23:00:43 +0200 |
commit | 38f92da6e7b07e8ffa0681b60ad314c568f9fd21 (patch) | |
tree | 40f7fc19163d25bdb0534c7fba1d0b66f28c93fe /hw/ppce500_mpc8544ds.c | |
parent | 397b457d869fbd5bbe2793c3066bb6bc92845932 (diff) |
ppce500_mpc8544ds: Pass PowerPCCPU to mpc8544ds_cpu_reset[_sec]
Allows us to use cpu_reset() in place of cpu_state_reset().
Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/ppce500_mpc8544ds.c')
-rw-r--r-- | hw/ppce500_mpc8544ds.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index 88a2767bca..3eb8a23779 100644 --- a/hw/ppce500_mpc8544ds.c +++ b/hw/ppce500_mpc8544ds.c @@ -196,9 +196,10 @@ static void mmubooke_create_initial_mapping(CPUPPCState *env, static void mpc8544ds_cpu_reset_sec(void *opaque) { - CPUPPCState *env = opaque; + PowerPCCPU *cpu = opaque; + CPUPPCState *env = &cpu->env; - cpu_state_reset(env); + cpu_reset(CPU(cpu)); /* Secondary CPU starts in halted state for now. Needs to change when implementing non-kernel boot. */ @@ -208,10 +209,11 @@ static void mpc8544ds_cpu_reset_sec(void *opaque) static void mpc8544ds_cpu_reset(void *opaque) { - CPUPPCState *env = opaque; + PowerPCCPU *cpu = opaque; + CPUPPCState *env = &cpu->env; struct boot_info *bi = env->load_info; - cpu_state_reset(env); + cpu_reset(CPU(cpu)); /* Set initial guest state. */ env->halted = 0; @@ -281,11 +283,11 @@ static void mpc8544ds_init(ram_addr_t ram_size, /* Primary CPU */ struct boot_info *boot_info; boot_info = g_malloc0(sizeof(struct boot_info)); - qemu_register_reset(mpc8544ds_cpu_reset, env); + qemu_register_reset(mpc8544ds_cpu_reset, cpu); env->load_info = boot_info; } else { /* Secondary CPUs */ - qemu_register_reset(mpc8544ds_cpu_reset_sec, env); + qemu_register_reset(mpc8544ds_cpu_reset_sec, cpu); } } |