]> Git Repo - qemu.git/commitdiff
target/ppc: allow ppc_cpu_do_system_reset to take an alternate vector
authorNicholas Piggin <[email protected]>
Mon, 16 Mar 2020 14:26:11 +0000 (00:26 +1000)
committerDavid Gibson <[email protected]>
Tue, 17 Mar 2020 06:00:22 +0000 (17:00 +1100)
Provide for an alternate delivery location, -1 defaults to the
architected address.

Signed-off-by: Nicholas Piggin <[email protected]>
Message-Id: <20200316142613[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
Signed-off-by: David Gibson <[email protected]>
hw/ppc/spapr.c
target/ppc/cpu.h
target/ppc/excp_helper.c

index d22bf54bafe08b37a3ee1e798a2280c38411ce76..6d65c0797b7667a6e2b15296c7ec827bbe32cef0 100644 (file)
@@ -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)
 {
     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)
index 395368053472c4c885cbe0c64d7b328c28eff64a..f8c7d6f19cc6397cb0ccbaa90adb67b2379e74ac 100644 (file)
@@ -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 cpuid, void *opaque);
 #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);
 extern const VMStateDescription vmstate_ppc_cpu;
 #endif
index 7f2b5899d36dbe6439841ebfabef8cd49721fcbc..08bc885ca6025fbc543a0c1df94e997712d21dfb 100644 (file)
@@ -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)
This page took 0.040244 seconds and 4 git commands to generate.