From: Bin Meng Date: Fri, 1 May 2020 12:26:49 +0000 (+0800) Subject: hw/riscv: spike: Change the default bios to use generic platform image X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=fad144392af50c0174becde83771fd2ff289bd1f;p=qemu.git 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 Reviewed-by: Anup Patel Reviewed-by: Alistair Francis Message-Id: <1596439832-29238-6-git-send-email-bmeng.cn@gmail.com> Signed-off-by: Alistair Francis --- 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 Binary files /dev/null and b/pc-bios/opensbi-riscv32-generic-fw_dynamic.elf 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 Binary files /dev/null and b/pc-bios/opensbi-riscv64-generic-fw_dynamic.elf differ