aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBin Meng <bin.meng@windriver.com>2020-05-01 20:26:49 +0800
committerAlistair Francis <alistair.francis@wdc.com>2020-08-21 22:37:55 -0700
commitfad144392af50c0174becde83771fd2ff289bd1f (patch)
treeb0e34c7dcf25742b9fae0bb3e971a837eb20cb36
parent2cacd8414daf6a0643926392f05fd397ed1e9b66 (diff)
downloadqemu-arm-fad144392af50c0174becde83771fd2ff289bd1f.tar.gz
hw/riscv: spike: Change the default bios to use generic platform image
To keep sync with other RISC-V machines, change the default bios to use generic platform fw_dynamic.elf image. While we are here, add some comments to mention that using ELF files for the Spike machine was intentional. Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Anup Patel <anup@brainfault.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <1596439832-29238-6-git-send-email-bmeng.cn@gmail.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
-rw-r--r--Makefile3
-rw-r--r--hw/riscv/spike.c9
-rw-r--r--pc-bios/opensbi-riscv32-generic-fw_dynamic.elfbin0 -> 558668 bytes
-rw-r--r--pc-bios/opensbi-riscv64-generic-fw_dynamic.elfbin0 -> 620424 bytes
4 files changed, 9 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 318a9b6300..ebdd97cb1e 100644
--- a/Makefile
+++ b/Makefile
@@ -254,7 +254,8 @@ u-boot.e500 u-boot-sam460-20100605.bin \
qemu_vga.ndrv \
edk2-licenses.txt \
hppa-firmware.img \
-opensbi-riscv32-generic-fw_dynamic.bin opensbi-riscv64-generic-fw_dynamic.bin
+opensbi-riscv32-generic-fw_dynamic.bin opensbi-riscv64-generic-fw_dynamic.bin \
+opensbi-riscv32-generic-fw_dynamic.elf opensbi-riscv64-generic-fw_dynamic.elf
else
BLOBS=
endif
diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c
index 7b23a297fc..13958bdbeb 100644
--- a/hw/riscv/spike.c
+++ b/hw/riscv/spike.c
@@ -42,10 +42,15 @@
#include "sysemu/qtest.h"
#include "sysemu/sysemu.h"
+/*
+ * Not like other RISC-V machines that use plain binary bios images,
+ * keeping ELF files here was intentional because BIN files don't work
+ * for the Spike machine as HTIF emulation depends on ELF parsing.
+ */
#if defined(TARGET_RISCV32)
-# define BIOS_FILENAME "opensbi-riscv32-spike-fw_jump.elf"
+# define BIOS_FILENAME "opensbi-riscv32-generic-fw_dynamic.elf"
#else
-# define BIOS_FILENAME "opensbi-riscv64-spike-fw_jump.elf"
+# define BIOS_FILENAME "opensbi-riscv64-generic-fw_dynamic.elf"
#endif
static const struct MemmapEntry {
diff --git a/pc-bios/opensbi-riscv32-generic-fw_dynamic.elf b/pc-bios/opensbi-riscv32-generic-fw_dynamic.elf
new file mode 100644
index 0000000000..eb9ebf5674
--- /dev/null
+++ b/pc-bios/opensbi-riscv32-generic-fw_dynamic.elf
Binary files differ
diff --git a/pc-bios/opensbi-riscv64-generic-fw_dynamic.elf b/pc-bios/opensbi-riscv64-generic-fw_dynamic.elf
new file mode 100644
index 0000000000..642a64e240
--- /dev/null
+++ b/pc-bios/opensbi-riscv64-generic-fw_dynamic.elf
Binary files differ