hw/sparc/leon3: Remove duplicate code
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 30 Jan 2024 10:12:16 +0000 (11:12 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 15 Feb 2024 15:58:46 +0000 (16:58 +0100)
Since commit b04d989054 ("SPARC: Emulation of Leon3") the
main_cpu_reset() handler sets both pc/npc when the CPU is
reset, after the machine is realized. It is pointless to
set it in leon3_generic_hw_init().

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Clément Chigot <chigot@adacore.com>
Message-Id: <20240130113102.6732-3-philmd@linaro.org>

hw/sparc/leon3.c

index 2dfb742566c400f4a2097b9b36e3ac417db4e9f2..1ae9a375833a1517ae3694907337500179f69149 100644 (file)
@@ -343,8 +343,6 @@ static void leon3_generic_hw_init(MachineState *machine)
 
             bootloader_entry = memory_region_get_ram_ptr(prom);
             write_bootloader(env, bootloader_entry, entry);
-            env->pc = LEON3_PROM_OFFSET;
-            env->npc = LEON3_PROM_OFFSET + 4;
             reset_info->entry = LEON3_PROM_OFFSET;
         }
     }