diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2020-03-17 00:26:11 +1000 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2020-03-17 17:00:22 +1100 |
commit | 9aa25280708a066e4920e8348091318f542fd19d (patch) | |
tree | a42a6f238513ead427f39d202ae7f23be3f11583 /target/ppc/excp_helper.c | |
parent | 89ba45652b0ce41e96ebf7108cfca0906201a967 (diff) | |
download | qemu-9aa25280708a066e4920e8348091318f542fd19d.zip |
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>
Diffstat (limited to 'target/ppc/excp_helper.c')
-rw-r--r-- | target/ppc/excp_helper.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 7f2b5899d3..08bc885ca6 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -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); CPUPPCState *env = &cpu->env; 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) |