riscv: sifive_u: Update BIOS_FILENAME for 32-bit
authorBin Meng <bmeng.cn@gmail.com>
Mon, 24 Feb 2020 13:39:43 +0000 (05:39 -0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Tue, 17 Mar 2020 00:03:49 +0000 (17:03 -0700)
Update BIOS_FILENAME to consider 32-bit bios image file name.

Tested booting Linux v5.5 32-bit image (built from rv32_defconfig
plus CONFIG_SOC_SIFIVE) with the default 32-bit bios image.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
hw/riscv/sifive_u.c

index 156a00364296d1c98c37e16827ff77ff5079d0e0..4409ea1cccb6602f6c8d402d0b41f7f0309582a7 100644 (file)
 
 #include <libfdt.h>
 
-#define BIOS_FILENAME "opensbi-riscv64-sifive_u-fw_jump.bin"
+#if defined(TARGET_RISCV32)
+# define BIOS_FILENAME "opensbi-riscv32-sifive_u-fw_jump.bin"
+#else
+# define BIOS_FILENAME "opensbi-riscv64-sifive_u-fw_jump.bin"
+#endif
 
 static const struct MemmapEntry {
     hwaddr base;