summary refs log tree commit diff stats
path: root/hw/arm/orangepi.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-10-25 08:59:09 +0200
committerPeter Maydell <peter.maydell@linaro.org>2023-10-27 12:50:12 +0100
commitf0109f721e8994deabd35b69d96d6d0bdfec0425 (patch)
tree3991e16428a074770a08caae9879fa1448c17d0b /hw/arm/orangepi.c
parentbf348bf9ab5459004927873c37e79f2040887d22 (diff)
downloadfocaccia-qemu-f0109f721e8994deabd35b69d96d6d0bdfec0425.tar.gz
focaccia-qemu-f0109f721e8994deabd35b69d96d6d0bdfec0425.zip
hw/arm: Avoid using 'first_cpu' when first ARM CPU is reachable
Prefer using a well known local first CPU rather than a global one.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20231025065909.57344-1-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/orangepi.c')
-rw-r--r--hw/arm/orangepi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/arm/orangepi.c b/hw/arm/orangepi.c
index d0eca54cd9..f3784d45ca 100644
--- a/hw/arm/orangepi.c
+++ b/hw/arm/orangepi.c
@@ -106,7 +106,7 @@ static void orangepi_init(MachineState *machine)
     orangepi_binfo.loader_start = h3->memmap[AW_H3_DEV_SDRAM];
     orangepi_binfo.ram_size = machine->ram_size;
     orangepi_binfo.psci_conduit = QEMU_PSCI_CONDUIT_SMC;
-    arm_load_kernel(ARM_CPU(first_cpu), machine, &orangepi_binfo);
+    arm_load_kernel(&h3->cpus[0], machine, &orangepi_binfo);
 }
 
 static void orangepi_machine_init(MachineClass *mc)