diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2020-09-24 13:18:07 +0200 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-10-01 15:31:01 +0100 |
commit | 1af702690e07f50d154e40a353f1e43ab2fbcaf1 (patch) | |
tree | 22e08b6ecfbc09b935f979b93445b2ada6701273 | |
parent | 696788d6a94e9da6acdcf48e5fd5ec190f1f748a (diff) | |
download | qemu-1af702690e07f50d154e40a353f1e43ab2fbcaf1.zip qemu-1af702690e07f50d154e40a353f1e43ab2fbcaf1.tar.gz qemu-1af702690e07f50d154e40a353f1e43ab2fbcaf1.tar.bz2 |
hw/arm/raspi: Use RaspiProcessorId to set the firmware load address
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>
Message-id: 20200924111808.77168-8-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | hw/arm/raspi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c index 0d8e5a3..ae98a2f 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); |