diff mbox series

[4/5] riscv/spike: Change the default bios to use generic platform image

Message ID 1588348254-7241-5-git-send-email-bmeng.cn@gmail.com
State New
Headers show
Series riscv: Switch to use generic platform of opensbi bios images | expand

Commit Message

Bin Meng May 1, 2020, 3:50 p.m. UTC
From: Bin Meng <bin.meng@windriver.com>

To keep sync with other RISC-V machines, change the default bios
to use generic platform image.

While we are here, add some comments to mention that keeping ELF
files here was intentional.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
---

 hw/riscv/spike.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Comments

Anup Patel May 3, 2020, 4:41 a.m. UTC | #1
On Fri, May 1, 2020 at 9:25 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> From: Bin Meng <bin.meng@windriver.com>
>
> To keep sync with other RISC-V machines, change the default bios
> to use generic platform image.
>
> While we are here, add some comments to mention that keeping ELF
> files here was intentional.
>
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
> ---
>
>  hw/riscv/spike.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c
> index d0c4843..6f26fcf 100644
> --- a/hw/riscv/spike.c
> +++ b/hw/riscv/spike.c
> @@ -45,10 +45,15 @@
>
>  #include <libfdt.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_jump.elf"
>  #else
> -# define BIOS_FILENAME "opensbi-riscv64-spike-fw_jump.elf"
> +# define BIOS_FILENAME "opensbi-riscv64-generic-fw_jump.elf"
>  #endif
>
>  static const struct MemmapEntry {
> --
> 2.7.4
>
>

Looks good to me.

Reviewed-by: Anup Patel <anup@brainfault.org>

Regards,
Anup
Alistair Francis May 4, 2020, 3:54 p.m. UTC | #2
On Fri, May 1, 2020 at 8:51 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> From: Bin Meng <bin.meng@windriver.com>
>
> To keep sync with other RISC-V machines, change the default bios
> to use generic platform image.
>
> While we are here, add some comments to mention that keeping ELF
> files here was intentional.
>
> Signed-off-by: Bin Meng <bin.meng@windriver.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>
>  hw/riscv/spike.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c
> index d0c4843..6f26fcf 100644
> --- a/hw/riscv/spike.c
> +++ b/hw/riscv/spike.c
> @@ -45,10 +45,15 @@
>
>  #include <libfdt.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_jump.elf"
>  #else
> -# define BIOS_FILENAME "opensbi-riscv64-spike-fw_jump.elf"
> +# define BIOS_FILENAME "opensbi-riscv64-generic-fw_jump.elf"
>  #endif
>
>  static const struct MemmapEntry {
> --
> 2.7.4
>
>
diff mbox series

Patch

diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c
index d0c4843..6f26fcf 100644
--- a/hw/riscv/spike.c
+++ b/hw/riscv/spike.c
@@ -45,10 +45,15 @@ 
 
 #include <libfdt.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_jump.elf"
 #else
-# define BIOS_FILENAME "opensbi-riscv64-spike-fw_jump.elf"
+# define BIOS_FILENAME "opensbi-riscv64-generic-fw_jump.elf"
 #endif
 
 static const struct MemmapEntry {