]> Git Repo - qemu.git/commitdiff
hw/arm/raspi: Load the firmware on the first core
authorPhilippe Mathieu-Daudé <[email protected]>
Thu, 24 Sep 2020 11:18:02 +0000 (13:18 +0200)
committerPeter Maydell <[email protected]>
Thu, 1 Oct 2020 14:31:01 +0000 (15:31 +0100)
The 'first_cpu' is more a QEMU accelerator-related concept
than a variable the machine requires to use.
Since the machine is aware of its CPUs, directly use the
first one to load the firmware.

Reviewed-by: Luc Michel <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20200924111808[email protected]
Signed-off-by: Peter Maydell <[email protected]>
hw/arm/raspi.c

index 46d9ed7f054449ab87321f830538b031f90736a4..8716a80a75e7055afc2a562dc300980c5e47eef7 100644 (file)
@@ -205,6 +205,7 @@ static void reset_secondary(ARMCPU *cpu, const struct arm_boot_info *info)
 
 static void setup_boot(MachineState *machine, int version, size_t ram_size)
 {
+    RaspiMachineState *s = RASPI_MACHINE(machine);
     static struct arm_boot_info binfo;
     int r;
 
@@ -253,7 +254,7 @@ static void setup_boot(MachineState *machine, int version, size_t ram_size)
         binfo.firmware_loaded = true;
     }
 
-    arm_load_kernel(ARM_CPU(first_cpu), machine, &binfo);
+    arm_load_kernel(&s->soc.cpu[0].core, machine, &binfo);
 }
 
 static void raspi_machine_init(MachineState *machine)
This page took 0.026543 seconds and 4 git commands to generate.