riscv/spike: Change the default bios to use plain binary image
PATCH 1/1 riscv/spike: Change the default bios to use plain binary image
From: Bin Meng <[email protected]>
To keep sync with other RISC-V machines, change the default bios to use .bin instead of the .elf images.
---
hw/riscv/spike.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/riscv/spike.c +2 -2
@@ -46,9 +46,9 @@#include <libfdt.h> #if defined(TARGET_RISCV32 ) -# define BIOS_FILENAME "opensbi-riscv32-spike-fw_jump.elf" +# define BIOS_FILENAME "opensbi-riscv32-spike-fw_jump.bin"#else -# define BIOS_FILENAME "opensbi-riscv64-spike-fw_jump.elf" +# define BIOS_FILENAME "opensbi-riscv64-spike-fw_jump.bin"#endif static const struct MemmapEntry {
Signature · 1 line
2.7.4
Quoted 17 lines · Bin Meng
From: Bin Meng <[email protected]>
To keep sync with other RISC-V machines, change the default bios to use .bin instead of the .elf images.
Signed-off-by Bin Meng <[email protected]>---
hw/riscv/spike.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/riscv/spike.c +0
-0
hw/riscv/spike.c line 52
Quoted 9 lines
hw/riscv/spike.c +2
-2@@ -46,9 +46,9 @@#include <libfdt.h> #if defined(TARGET_RISCV32 ) -# define BIOS_FILENAME "opensbi-riscv32-spike-fw_jump.elf" +# define BIOS_FILENAME "opensbi-riscv32-spike-fw_jump.bin"#else -# define BIOS_FILENAME "opensbi-riscv64-spike-fw_jump.elf" +# define BIOS_FILENAME "opensbi-riscv64-spike-fw_jump.bin"#endif
This change breaks the console on the spike machine because HTIF emulation depends on ELF parsing.
Keeping here ELF files was intentional because BIN files dont work for Spike the machine.
Also, now that OpenSBI generic platform is available. We can use same OpenSBI firmware binaries/elfs on virt, sifive_u, and spike machines of QEMU. I think:
1. The QEMU build/makefile scripts for OpenSBI should be updated to only build OpenSBI generic platform firmwares
2. The default BIOS_FILENAME in for virt, sifive_u, and spike machines should be changed to use OpenSBI generic platform firmwares.
It would be great if you can drop this patch and instead do above two changes. Agree ??
Regards,
Anup
Quoted 21 lines · Anup Patel
Quoted 19 lines · Bin Meng
From: Bin Meng <[email protected]>
To keep sync with other RISC-V machines, change the default bios to use .bin instead of the .elf images.
Signed-off-by Bin Meng <[email protected]>---
hw/riscv/spike.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/riscv/spike.c +0
-0@@ -46,9 +46,9 @@#include <libfdt.h>
Quoted 10 lines
hw/riscv/spike.c line 52
Quoted 7 lines
hw/riscv/spike.c +2
-2#if defined(TARGET_RISCV32 ) -# define BIOS_FILENAME "opensbi-riscv32-spike-fw_jump.elf" +# define BIOS_FILENAME "opensbi-riscv32-spike-fw_jump.bin"#else -# define BIOS_FILENAME "opensbi-riscv64-spike-fw_jump.elf" +# define BIOS_FILENAME "opensbi-riscv64-spike-fw_jump.bin"#endif This change breaks the console on the spike machine because HTIF emulation depends on ELF parsing.
I think we should add some comments here.
Quoted 13 lines
Keeping here ELF files was intentional because BIN files dont work for Spike the machine.
Also, now that OpenSBI generic platform is available. We can use same OpenSBI firmware binaries/elfs on virt,
sifive_u, and spike machines of QEMU. I think:
1. The QEMU build/makefile scripts for OpenSBI should be updated to only build OpenSBI generic platform firmwares
2. The defaultBIOS_FILENAMEin for virt,sifive_u, and spike machines should be changed to use OpenSBI generic platform firmwares.
Quoted 2 lines
It would be great if you can drop this patch and instead do above two changes. Agree ??
Agree.
Regards,
Bin
Quoted 48 lines
-----Original Message-----
From: Qemu-riscv <qemu-riscv- [email protected]> On Behalf Of Bin Meng
Sent: 01 May 2020 18:15
To: Anup Patel <[email protected]>
Cc: Bin Meng <[email protected]>; open list:RISC-V <qemu- [email protected]>; Sagar Karandikar <[email protected]>; Bastian Koppelmann <[email protected]>; Palmer Dabbelt <[email protected]>; QEMU Developers <qemu- [email protected]>; Alistair Francis <[email protected]>
Subject: Re: [PATCH] riscv/spike: Change the default bios to use plain binary imageQuoted 21 lines · Anup Patel
Quoted 19 lines · Bin Meng
From: Bin Meng <[email protected]>
To keep sync with other RISC-V machines, change the default bios to use .bin instead of the .elf images.
Signed-off-by Bin Meng <[email protected]>---
hw/riscv/spike.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/riscv/spike.c index renamed from hw/riscv/spike.c +0
-0d0c4843..611a741 100644
hw/riscv/spike.c +0
-0@@ -46,9 +46,9 @@#include <libfdt.h> Quoted 10 lines
hw/riscv/spike.c line 52
Quoted 7 lines
hw/riscv/spike.c +2
-2#if defined(TARGET_RISCV32 ) -# define BIOS_FILENAME "opensbi-riscv32-spike-fw_jump.elf" +# define BIOS_FILENAME "opensbi-riscv32-spike-fw_jump.bin"#else -# define BIOS_FILENAME "opensbi-riscv64-spike-fw_jump.elf" +# define BIOS_FILENAME "opensbi-riscv64-spike-fw_jump.bin"#endif This change breaks the console on the spike machine because HTIF emulation depends on ELF parsing.
Quoted 1 line
I think we should add some comments here.
Sure, adding comments here about ELF requirement is certainly helpful.
Quoted 13 lines
Quoted 13 lines
Keeping here ELF files was intentional because BIN files dont work for Spike the machine.
Also, now that OpenSBI generic platform is available. We can use same OpenSBI firmware binaries/elfs on virt,
sifive_u, and spike machines of QEMU. I think:
1. The QEMU build/makefile scripts for OpenSBI should be updated to only build OpenSBI generic platform firmwares 2. The defaultBIOS_FILENAMEin for virt,sifive_u, and spike machines should be changed to use OpenSBI generic platform firmwares.
Quoted 4 lines
Quoted 2 lines
It would be great if you can drop this patch and instead do above two changes. Agree ??
Agree.
Coo, thanks.
Regards,
Anup