1
This series aims at improving RISC-V spike machine BIOS support by allowing
1
This series aims at improving RISC-V spike machine BIOS support by allowing
2
use of binary firmware as bios. Further, this also allows us to totally
2
use of binary firmware as bios. Further, this also allows us to totally
3
remove the ELF bios images shipped with QEMU RISC-V.
3
remove the ELF bios images shipped with QEMU RISC-V.
4
4
5
These patches can also be found in riscv_spike_imp_v2 branch at:
5
These patches can also be found in riscv_spike_imp_v3 branch at:
6
https://github.com/avpatel/qemu.git
6
https://github.com/avpatel/qemu.git
7
8
Changes since v2:
9
- Remove ELF file names from .gitlab-ci.d/opensbi.yml in PATCH3
7
10
8
Changes since v1:
11
Changes since v1:
9
- Use htif_uses_elf_symbols() in htif_mm_init() for PATCH1
12
- Use htif_uses_elf_symbols() in htif_mm_init() for PATCH1
10
- Added PATCH2 and PATCH3 to remove ELF bios images
13
- Added PATCH2 and PATCH3 to remove ELF bios images
11
14
12
Anup Patel (3):
15
Anup Patel (3):
13
hw/riscv: spike: Allow using binary firmware as bios
16
hw/riscv: spike: Allow using binary firmware as bios
14
hw/riscv: Remove macros for ELF BIOS image names
17
hw/riscv: Remove macros for ELF BIOS image names
15
roms/opensbi: Remove ELF images
18
roms/opensbi: Remove ELF images
16
19
20
.gitlab-ci.d/opensbi.yml | 2 -
17
hw/char/riscv_htif.c | 33 ++++++++-----
21
hw/char/riscv_htif.c | 33 ++++++++-----
18
hw/riscv/spike.c | 45 +++++++++++-------
22
hw/riscv/spike.c | 45 +++++++++++-------
19
include/hw/char/riscv_htif.h | 5 +-
23
include/hw/char/riscv_htif.h | 5 +-
20
include/hw/riscv/boot.h | 2 -
24
include/hw/riscv/boot.h | 2 -
21
include/hw/riscv/spike.h | 1 +
25
include/hw/riscv/spike.h | 1 +
22
pc-bios/meson.build | 2 -
26
pc-bios/meson.build | 2 -
23
.../opensbi-riscv32-generic-fw_dynamic.elf | Bin 838904 -> 0 bytes
27
.../opensbi-riscv32-generic-fw_dynamic.elf | Bin 838904 -> 0 bytes
24
.../opensbi-riscv64-generic-fw_dynamic.elf | Bin 934696 -> 0 bytes
28
.../opensbi-riscv64-generic-fw_dynamic.elf | Bin 934696 -> 0 bytes
25
roms/Makefile | 2 -
29
roms/Makefile | 2 -
26
9 files changed, 54 insertions(+), 36 deletions(-)
30
10 files changed, 54 insertions(+), 38 deletions(-)
27
delete mode 100644 pc-bios/opensbi-riscv32-generic-fw_dynamic.elf
31
delete mode 100644 pc-bios/opensbi-riscv32-generic-fw_dynamic.elf
28
delete mode 100644 pc-bios/opensbi-riscv64-generic-fw_dynamic.elf
32
delete mode 100644 pc-bios/opensbi-riscv64-generic-fw_dynamic.elf
29
33
30
--
34
--
31
2.25.1
35
2.25.1
32
36
33
37
diff view generated by jsdifflib
...
...
5
The latest OpenSBI can now optionally pick-up HTIF register address
5
The latest OpenSBI can now optionally pick-up HTIF register address
6
from HTIF DT node so using this feature spike machine can now use
6
from HTIF DT node so using this feature spike machine can now use
7
OpenSBI firmware BIN as bios.
7
OpenSBI firmware BIN as bios.
8
8
9
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
9
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
10
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
11
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
10
---
12
---
11
hw/char/riscv_htif.c | 33 +++++++++++++++++++----------
13
hw/char/riscv_htif.c | 33 +++++++++++++++++++----------
12
hw/riscv/spike.c | 41 ++++++++++++++++++++++--------------
14
hw/riscv/spike.c | 41 ++++++++++++++++++++++--------------
13
include/hw/char/riscv_htif.h | 5 ++++-
15
include/hw/char/riscv_htif.h | 5 ++++-
14
include/hw/riscv/spike.h | 1 +
16
include/hw/riscv/spike.h | 1 +
...
...
diff view generated by jsdifflib
1
Now that RISC-V Spike machine can use BIN BIOS images, we remove
1
Now that RISC-V Spike machine can use BIN BIOS images, we remove
2
the macros used for ELF BIOS image names.
2
the macros used for ELF BIOS image names.
3
3
4
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
4
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
5
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
6
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5
---
7
---
6
hw/riscv/spike.c | 4 ++--
8
hw/riscv/spike.c | 4 ++--
7
include/hw/riscv/boot.h | 2 --
9
include/hw/riscv/boot.h | 2 --
8
2 files changed, 2 insertions(+), 4 deletions(-)
10
2 files changed, 2 insertions(+), 4 deletions(-)
9
11
...
...
diff view generated by jsdifflib
1
Now that all RISC-V machines can use OpenSBI BIN images, we remove
1
Now that all RISC-V machines can use OpenSBI BIN images, we remove
2
OpenSBI ELF images and also exclude these images from BIOS build.
2
OpenSBI ELF images and also exclude these images from BIOS build.
3
3
4
Signed-off-by: Anup Patel <anup@brainfault.org>
4
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
5
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
6
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5
---
7
---
8
.gitlab-ci.d/opensbi.yml | 2 --
6
pc-bios/meson.build | 2 --
9
pc-bios/meson.build | 2 --
7
pc-bios/opensbi-riscv32-generic-fw_dynamic.elf | Bin 838904 -> 0 bytes
10
pc-bios/opensbi-riscv32-generic-fw_dynamic.elf | Bin 838904 -> 0 bytes
8
pc-bios/opensbi-riscv64-generic-fw_dynamic.elf | Bin 934696 -> 0 bytes
11
pc-bios/opensbi-riscv64-generic-fw_dynamic.elf | Bin 934696 -> 0 bytes
9
roms/Makefile | 2 --
12
roms/Makefile | 2 --
10
4 files changed, 4 deletions(-)
13
5 files changed, 6 deletions(-)
11
delete mode 100644 pc-bios/opensbi-riscv32-generic-fw_dynamic.elf
14
delete mode 100644 pc-bios/opensbi-riscv32-generic-fw_dynamic.elf
12
delete mode 100644 pc-bios/opensbi-riscv64-generic-fw_dynamic.elf
15
delete mode 100644 pc-bios/opensbi-riscv64-generic-fw_dynamic.elf
13
16
17
diff --git a/.gitlab-ci.d/opensbi.yml b/.gitlab-ci.d/opensbi.yml
18
index XXXXXXX..XXXXXXX 100644
19
--- a/.gitlab-ci.d/opensbi.yml
20
+++ b/.gitlab-ci.d/opensbi.yml
21
@@ -XXX,XX +XXX,XX @@ build-opensbi:
22
artifacts:
23
paths: # 'artifacts.zip' will contains the following files:
24
- pc-bios/opensbi-riscv32-generic-fw_dynamic.bin
25
- - pc-bios/opensbi-riscv32-generic-fw_dynamic.elf
26
- pc-bios/opensbi-riscv64-generic-fw_dynamic.bin
27
- - pc-bios/opensbi-riscv64-generic-fw_dynamic.elf
28
- opensbi32-generic-stdout.log
29
- opensbi32-generic-stderr.log
30
- opensbi64-generic-stdout.log
14
diff --git a/pc-bios/meson.build b/pc-bios/meson.build
31
diff --git a/pc-bios/meson.build b/pc-bios/meson.build
15
index XXXXXXX..XXXXXXX 100644
32
index XXXXXXX..XXXXXXX 100644
16
--- a/pc-bios/meson.build
33
--- a/pc-bios/meson.build
17
+++ b/pc-bios/meson.build
34
+++ b/pc-bios/meson.build
18
@@ -XXX,XX +XXX,XX @@ blobs = files(
35
@@ -XXX,XX +XXX,XX @@ blobs = files(
...
...
diff view generated by jsdifflib