aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2020-02-24 05:39:43 -0800
committerPalmer Dabbelt <palmerdabbelt@google.com>2020-03-16 17:03:49 -0700
commitb78c3296314b5bbb5f837e9b1dee7b8dde25573b (patch)
treefc3d74481f85cc656624b85e19c62bab74533a13
parenta6fcc80bea1f062ffad330a1dcbc1e3d463a4493 (diff)
downloadqemu-b78c3296314b5bbb5f837e9b1dee7b8dde25573b.zip
qemu-b78c3296314b5bbb5f837e9b1dee7b8dde25573b.tar.gz
qemu-b78c3296314b5bbb5f837e9b1dee7b8dde25573b.tar.bz2
riscv: sifive_u: Update BIOS_FILENAME for 32-bit
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>
-rw-r--r--hw/riscv/sifive_u.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c
index 156a003..4409ea1 100644
--- a/hw/riscv/sifive_u.c
+++ b/hw/riscv/sifive_u.c
@@ -56,7 +56,11 @@
#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;