summaryrefslogtreecommitdiffstats
path: root/hw/arm
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé2020-09-24 13:18:02 +0200
committerPeter Maydell2020-10-01 16:31:01 +0200
commit02058e4b40f4132be3dcfede3e414562ff358146 (patch)
tree4e94a894c2fe887b1bdb7ab092a87905be201527 /hw/arm
parenthw/arm/raspi: Display the board revision in the machine description (diff)
downloadqemu-02058e4b40f4132be3dcfede3e414562ff358146.tar.gz
qemu-02058e4b40f4132be3dcfede3e414562ff358146.tar.xz
qemu-02058e4b40f4132be3dcfede3e414562ff358146.zip
hw/arm/raspi: Load the firmware on the first core
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 <luc.michel@greensocs.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20200924111808.77168-3-f4bug@amsat.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm')
-rw-r--r--hw/arm/raspi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
index 46d9ed7f05..8716a80a75 100644
--- a/hw/arm/raspi.c
+++ b/hw/arm/raspi.c
@@ -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)