[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 2/8] hw/arm/raspi: Load the firmware on the first core
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 2/8] hw/arm/raspi: Load the firmware on the first core |
Date: |
Mon, 21 Sep 2020 09:56:22 +0200 |
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.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/arm/raspi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
index 46d9ed7f054..8716a80a75e 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)
--
2.26.2
- [PATCH v3 0/8] hw/arm/raspi: QOM housekeeping to be able to add more machines, Philippe Mathieu-Daudé, 2020/09/21
- [PATCH v3 1/8] hw/arm/raspi: Display the board revision in the machine description, Philippe Mathieu-Daudé, 2020/09/21
- [PATCH v3 4/8] hw/arm/raspi: Avoid using TypeInfo::class_data pointer, Philippe Mathieu-Daudé, 2020/09/21
- [PATCH v3 2/8] hw/arm/raspi: Load the firmware on the first core,
Philippe Mathieu-Daudé <=
- [PATCH v3 5/8] hw/arm/raspi: Use more specific machine names, Philippe Mathieu-Daudé, 2020/09/21
- [PATCH v3 3/8] hw/arm/raspi: Move arm_boot_info structure to RaspiMachineState, Philippe Mathieu-Daudé, 2020/09/21
- [PATCH v3 7/8] hw/arm/raspi: Use RaspiProcessorId to set the firmware load address, Philippe Mathieu-Daudé, 2020/09/21
- [PATCH v3 8/8] hw/arm/raspi: Remove use of the 'version' value in the board code, Philippe Mathieu-Daudé, 2020/09/21
- [PATCH v3 6/8] hw/arm/raspi: Introduce RaspiProcessorId enum, Philippe Mathieu-Daudé, 2020/09/21