[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 7/8] hw/arm/raspi: Use RaspiProcessorId to set the firmware lo
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v4 7/8] hw/arm/raspi: Use RaspiProcessorId to set the firmware load address |
Date: |
Thu, 24 Sep 2020 13:18:07 +0200 |
The firmware load address depends on the SoC ("processor id") used,
not on the version of the board.
Suggested-by: Luc Michel <luc.michel@greensocs.com>
Reviewed-by: Luc Michel <luc.michel@greensocs.com>
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 0d8e5a34c78..ae98a2fbfca 100644
--- a/hw/arm/raspi.c
+++ b/hw/arm/raspi.c
@@ -238,7 +238,8 @@ static void setup_boot(MachineState *machine, int version,
size_t ram_size)
* the normal Linux boot process
*/
if (machine->firmware) {
- hwaddr firmware_addr = version == 3 ? FIRMWARE_ADDR_3 :
FIRMWARE_ADDR_2;
+ hwaddr firmware_addr = processor_id <= PROCESSOR_ID_BCM2836
+ ? FIRMWARE_ADDR_2 : FIRMWARE_ADDR_3;
/* load the firmware image (typically kernel.img) */
r = load_image_targphys(machine->firmware, firmware_addr,
ram_size - firmware_addr);
--
2.26.2
- [PATCH v4 0/8] hw/arm/raspi: QOM housekeeping to be able to add more machines, Philippe Mathieu-Daudé, 2020/09/24
- [PATCH v4 1/8] hw/arm/raspi: Display the board revision in the machine description, Philippe Mathieu-Daudé, 2020/09/24
- [PATCH v4 2/8] hw/arm/raspi: Load the firmware on the first core, Philippe Mathieu-Daudé, 2020/09/24
- [PATCH v4 3/8] hw/arm/raspi: Move arm_boot_info structure to RaspiMachineState, Philippe Mathieu-Daudé, 2020/09/24
- [PATCH v4 4/8] hw/arm/raspi: Avoid using TypeInfo::class_data pointer, Philippe Mathieu-Daudé, 2020/09/24
- [PATCH v4 5/8] hw/arm/raspi: Use more specific machine names, Philippe Mathieu-Daudé, 2020/09/24
- [PATCH v4 6/8] hw/arm/raspi: Introduce RaspiProcessorId enum, Philippe Mathieu-Daudé, 2020/09/24
- [PATCH v4 7/8] hw/arm/raspi: Use RaspiProcessorId to set the firmware load address,
Philippe Mathieu-Daudé <=
- [PATCH v4 8/8] hw/arm/raspi: Remove use of the 'version' value in the board code, Philippe Mathieu-Daudé, 2020/09/24