target/ppc: allow ppc_cpu_do_system_reset to take an alternate vector
Provide for an alternate delivery location, -1 defaults to the architected address. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Message-Id: <20200316142613.121089-7-npiggin@gmail.com> Reviewed-by: Greg Kurz <groug@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
89ba45652b
commit
9aa2528070
|
@ -3385,7 +3385,7 @@ static void spapr_machine_finalizefn(Object *obj)
|
||||||
void spapr_do_system_reset_on_cpu(CPUState *cs, run_on_cpu_data arg)
|
void spapr_do_system_reset_on_cpu(CPUState *cs, run_on_cpu_data arg)
|
||||||
{
|
{
|
||||||
cpu_synchronize_state(cs);
|
cpu_synchronize_state(cs);
|
||||||
ppc_cpu_do_system_reset(cs);
|
ppc_cpu_do_system_reset(cs, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void spapr_nmi(NMIState *n, int cpu_index, Error **errp)
|
static void spapr_nmi(NMIState *n, int cpu_index, Error **errp)
|
||||||
|
|
|
@ -1220,7 +1220,7 @@ int ppc64_cpu_write_elf64_note(WriteCoreDumpFunction f, CPUState *cs,
|
||||||
int ppc32_cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cs,
|
int ppc32_cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cs,
|
||||||
int cpuid, void *opaque);
|
int cpuid, void *opaque);
|
||||||
#ifndef CONFIG_USER_ONLY
|
#ifndef CONFIG_USER_ONLY
|
||||||
void ppc_cpu_do_system_reset(CPUState *cs);
|
void ppc_cpu_do_system_reset(CPUState *cs, target_ulong vector);
|
||||||
void ppc_cpu_do_fwnmi_machine_check(CPUState *cs, target_ulong vector);
|
void ppc_cpu_do_fwnmi_machine_check(CPUState *cs, target_ulong vector);
|
||||||
extern const VMStateDescription vmstate_ppc_cpu;
|
extern const VMStateDescription vmstate_ppc_cpu;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -961,12 +961,15 @@ static void ppc_hw_interrupt(CPUPPCState *env)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ppc_cpu_do_system_reset(CPUState *cs)
|
void ppc_cpu_do_system_reset(CPUState *cs, target_ulong vector)
|
||||||
{
|
{
|
||||||
PowerPCCPU *cpu = POWERPC_CPU(cs);
|
PowerPCCPU *cpu = POWERPC_CPU(cs);
|
||||||
CPUPPCState *env = &cpu->env;
|
CPUPPCState *env = &cpu->env;
|
||||||
|
|
||||||
powerpc_excp(cpu, env->excp_model, POWERPC_EXCP_RESET);
|
powerpc_excp(cpu, env->excp_model, POWERPC_EXCP_RESET);
|
||||||
|
if (vector != -1) {
|
||||||
|
env->nip = vector;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ppc_cpu_do_fwnmi_machine_check(CPUState *cs, target_ulong vector)
|
void ppc_cpu_do_fwnmi_machine_check(CPUState *cs, target_ulong vector)
|
||||||
|
|
Loading…
Reference in a new issue