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>
This commit is contained in:
parent
397b457d86
commit
38f92da6e7
|
@ -196,9 +196,10 @@ static void mmubooke_create_initial_mapping(CPUPPCState *env,
|
||||||
|
|
||||||
static void mpc8544ds_cpu_reset_sec(void *opaque)
|
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
|
/* Secondary CPU starts in halted state for now. Needs to change when
|
||||||
implementing non-kernel boot. */
|
implementing non-kernel boot. */
|
||||||
|
@ -208,10 +209,11 @@ static void mpc8544ds_cpu_reset_sec(void *opaque)
|
||||||
|
|
||||||
static void mpc8544ds_cpu_reset(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;
|
struct boot_info *bi = env->load_info;
|
||||||
|
|
||||||
cpu_state_reset(env);
|
cpu_reset(CPU(cpu));
|
||||||
|
|
||||||
/* Set initial guest state. */
|
/* Set initial guest state. */
|
||||||
env->halted = 0;
|
env->halted = 0;
|
||||||
|
@ -281,11 +283,11 @@ static void mpc8544ds_init(ram_addr_t ram_size,
|
||||||
/* Primary CPU */
|
/* Primary CPU */
|
||||||
struct boot_info *boot_info;
|
struct boot_info *boot_info;
|
||||||
boot_info = g_malloc0(sizeof(struct 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;
|
env->load_info = boot_info;
|
||||||
} else {
|
} else {
|
||||||
/* Secondary CPUs */
|
/* Secondary CPUs */
|
||||||
qemu_register_reset(mpc8544ds_cpu_reset_sec, env);
|
qemu_register_reset(mpc8544ds_cpu_reset_sec, cpu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue