diff options
author | Helge Deller <deller@gmx.de> | 2024-12-30 10:53:25 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-01-13 17:16:04 +0100 |
commit | 20f7b890173be6cd38dabad8122b8b2fe51d0255 (patch) | |
tree | d0820331f8d3d45043b6078311089a350332b139 | |
parent | f4f4173188249d33a3ec4a0c910c168c9181ac9d (diff) | |
download | qemu-20f7b890173be6cd38dabad8122b8b2fe51d0255.zip qemu-20f7b890173be6cd38dabad8122b8b2fe51d0255.tar.gz qemu-20f7b890173be6cd38dabad8122b8b2fe51d0255.tar.bz2 |
hw/hppa: Reset vCPUs calling resettable_reset()
Rather than manually (and incompletely) resetting vCPUs,
call resettable_reset() which will fully reset the vCPUs.
Remove redundant assignations.
Signed-off-by: Helge Deller <deller@gmx.de>
Co-developed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20241231190620.24442-4-philmd@linaro.org>
-rw-r--r-- | hw/hppa/machine.c | 6 | ||||
-rw-r--r-- | target/hppa/cpu.c | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index 6525930..8230f43 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -655,12 +655,12 @@ static void hppa_machine_reset(MachineState *ms, ResetType type) for (i = 0; i < smp_cpus; i++) { CPUState *cs = CPU(cpu[i]); + /* reset CPU */ + resettable_reset(OBJECT(cs), RESET_TYPE_COLD); + cpu_set_pc(cs, firmware_entry); cpu[i]->env.psw = PSW_Q; cpu[i]->env.gr[5] = CPU_HPA + i * 0x1000; - - cs->exception_index = -1; - cs->halted = 0; } /* already initialized by machine_hppa_init()? */ diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index d784bcd..41538d3 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -204,6 +204,7 @@ static void hppa_cpu_reset_hold(Object *obj, ResetType type) scc->parent_phases.hold(obj, type); } cs->exception_index = -1; + cs->halted = 0; memset(env, 0, offsetof(CPUHPPAState, end_reset_fields)); |