Skip to contentSkip to conversation

riscv: Switch to use generic platform of opensbi bios images

PATCH Superseded Bin Meng 4 participants 17 messages Jun 22, 2020 – Jun 25, 2020

Subsystems (3)

v2 of 6 Superseded Latest is v6 →

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

v2 cover riscv: Switch to use generic platform of opensbi bios images

From: Bin Meng <[email protected]>

The RISC-V generic platform is a flattened device tree (FDT) based platform where all platform specific functionality is provided based on FDT passed by previous booting stage. The support was added in the upstream OpenSBI v0.8 release recently.

This series updates QEMU to switch to use generic platform of opensbi bios images.

The patch emails do not contain binary bits, please grab all updates at https://github.com/lbmeng/qemu.git bios branch.

Changes in v2:
- new patch: configure: Create symbolic links for pc-bios/*.elf files
- Upgrade OpenSBI to v0.8 release
- Copy the ELF images too in the make rules
- Include ELF images in the artifacts
- new patch: Makefile: Ship the generic platform bios images for RISC-V

Bin Meng (7):
configure: Create symbolic links for pc-bios/*.elf files roms/opensbi: Upgrade from v0.7 to v0.8
roms/Makefile: Build the generic platform for RISC-V OpenSBI firmware hw/riscv: Use pre-built bios image of generic platform for virt &
sifive_u
hw/riscv: spike: Change the default bios to use generic platform image gitlab-ci/opensbi: Update GitLab CI to build generic platform
Makefile: Ship the generic platform bios images for RISC-V

 .gitlab-ci.d/opensbi.yml                     |  28 +++++++++--------------
 Makefile                                     |   4 ++--
 configure                                    |   1 +
 hw/riscv/sifive_u.c                          |   4 ++--
 hw/riscv/spike.c                             |   9 ++++++--
 hw/riscv/virt.c                              |   4 ++--
 pc-bios/opensbi-riscv32-generic-fw_jump.bin  | Bin 0 -> 58048 bytes
 pc-bios/opensbi-riscv32-generic-fw_jump.elf  | Bin 0 -> 554156 bytes
 pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin | Bin 49520 -> 0 bytes
 pc-bios/opensbi-riscv32-virt-fw_jump.bin     | Bin 49504 -> 0 bytes
 pc-bios/opensbi-riscv64-generic-fw_jump.bin  | Bin 0 -> 70792 bytes
 pc-bios/opensbi-riscv64-generic-fw_jump.elf  | Bin 0 -> 619960 bytes
 pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin | Bin 57936 -> 0 bytes
 pc-bios/opensbi-riscv64-virt-fw_jump.bin     | Bin 57920 -> 0 bytes
 roms/Makefile                                |  32 +++++++++------------------
 roms/opensbi                                 |   2 +-
 16 files changed, 35 insertions(+), 49 deletions(-)
 create mode 100644 pc-bios/opensbi-riscv32-generic-fw_jump.bin
 create mode 100644 pc-bios/opensbi-riscv32-generic-fw_jump.elf
 delete mode 100644 pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin
 delete mode 100644 pc-bios/opensbi-riscv32-virt-fw_jump.bin
 create mode 100644 pc-bios/opensbi-riscv64-generic-fw_jump.bin
 create mode 100644 pc-bios/opensbi-riscv64-generic-fw_jump.elf
 delete mode 100644 pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin
 delete mode 100644 pc-bios/opensbi-riscv64-virt-fw_jump.bin
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH v2 1/7 configure: Create symbolic links for pc-bios/*.elf files

From: Bin Meng <[email protected]>

Now we need to ship the OpenSBI fw_jump.elf image for the RISC-V Spike machine, it requires us to create symbolic links for pc-bios/*.elf files.

---

Changes in v2:
- new patch: configure: Create symbolic links for pc-bios/*.elf files

 configure | 1 +
 1 file changed, 1 insertion(+)
configure +1 -0
index ba88fd1..4a1514a 100755
@@ -8399,6 +8399,7 @@ LINKS="$LINKS tests/qemu-iotests/check"
 LINKS="$LINKS python"
 for bios_file in \
     $source_path/pc-bios/*.bin \
+    $source_path/pc-bios/*.elf \
     $source_path/pc-bios/*.lid \
     $source_path/pc-bios/*.rom \
     $source_path/pc-bios/*.dtb \
Signature · 1 line
2.7.4
Reviewed-by on v2 1/7
#2 lore raw

Re: [PATCH v2 1/7] configure: Create symbolic links for pc-bios/*.elf files

Quoted 8 lines · Bin Meng

From: Bin Meng <[email protected]>

Now we need to ship the OpenSBI fw_jump.elf image for the RISC-V Spike machine, it requires us to create symbolic links for pc-bios/*.elf files.

Alistair

Quoted 25 lines

---

Changes in v2:
- new patch: configure: Create symbolic links for pc-bios/*.elf files

 configure | 1 +
 1 file changed, 1 insertion(+)
configure +1 -1
index ba88fd1..4a1514a 100755
@@ -8399,6 +8399,7 @@ LINKS="$LINKS tests/qemu-iotests/check"
 LINKS="$LINKS python"
 for bios_file in \
     $source_path/pc-bios/*.bin \
+    $source_path/pc-bios/*.elf \
     $source_path/pc-bios/*.lid \
     $source_path/pc-bios/*.rom \
     $source_path/pc-bios/*.dtb \
--

2.7.4

#3 lore raw

Re: [PATCH v2 1/7] configure: Create symbolic links for pc-bios/*.elf files

In reply to Bin Meng
Quoted 4 lines · Bin Meng

From: Bin Meng <[email protected]>

Now we need to ship the OpenSBI fw_jump.elf image for the RISC-V Spike machine,

Oh, does that mean we can now use the tests Chih-Min Chao sent almost 1 year ago? See:
https://www.mail-archive.com/[email protected]/msg631078.html

Quoted 26 lines

it requires us to create symbolic
links for pc-bios/*.elf files.

---

Changes in v2:
- new patch: configure: Create symbolic links for pc-bios/*.elf files

 configure | 1 +
 1 file changed, 1 insertion(+)
configure +1 -0
index ba88fd1..4a1514a 100755
@@ -8399,6 +8399,7 @@ LINKS="$LINKS tests/qemu-iotests/check"
 LINKS="$LINKS python"
 for bios_file in \
     $source_path/pc-bios/*.bin \
+    $source_path/pc-bios/*.elf \
     $source_path/pc-bios/*.lid \
     $source_path/pc-bios/*.rom \
     $source_path/pc-bios/*.dtb \
author
#4 lore raw

PATCH v2 2/7 roms/opensbi: Upgrade from v0.7 to v0.8

In reply to Bin Meng

From: Bin Meng <[email protected]>

Upgrade OpenSBI from v0.7 to v0.8.

The v0.8 release includes the following commits:

1bb00ab lib: No need to provide default PMP region using platform callbacks a9eac67 include: sbi_platform: Combine reboot and shutdown into one callback 6585fab lib: utils: Add SiFive test device
4781545 platform: Add Nuclei UX600 platform
3a326af scripts: adapt binary archive script for Nuclei UX600 5bdf022 firmware: fw_base: Remove CSR_MTVEC update check
e6c1345 lib: utils/serial: Skip baudrate config if input frequency is zero 01a8c8e lib: utils: Improve fdt_parse_uart8250() API
0a0093b lib: utils: Add fdt_parse_uart8250_node() function
243b0d0 lib: utils: Remove redundant clint_ipi_sync() declaration e3ad7c1 lib: utils: Rename fdt_parse_clint() to fdt_parse_compat_addr() a39cd6f lib: utils: Add FDT match table based node lookup
dd33b9e lib: utils: Make fdt_get_node_addr_size() public function 66185b3 lib: utils: Add fdt_parse_sifive_uart_node() function 19e966b lib: utils: Add fdt_parse_hart_id() function
44dd7be lib: utils: Add fdt_parse_max_hart_id() API
f0eb503 lib: utils: Add fdt_parse_plic_node() function
1ac794c include: Add array_size() macro
8ff2b94 lib: utils: Add simple FDT timer framework
76f0f81 lib: utils: Add simple FDT ipi framework
75322a6 lib: utils: Add simple FDT irqchip framework
76a8940 lib: utils: Add simple FDT serial framework
7cc6fa4 lib: utils: Add simple FDT reset framework
4d06353 firmware: fw_base: Introduce optional fw_platform_init() f1aa9e5 platform: Add generic FDT based platform support
1f21b99 lib: sbi: Print platform hart count at boot time
2ba7087 scripts: Add generic platform to create-binary-archive.sh 4f18c6e platform: generic: Add Sifive FU540 TLB flush range limit override 13717a8 platform: Remove qemu/virt directory
65c06b0 platform: Remove spike directory
d626037 docs: Add missing links in platform.md
7993ca2 include: sbi: Remove redundant page table related defines 5338679 lib: sbi_tlb: Fix remote TLB HFENCE VVMA implementation dc38929 lib: sbi: Improve misa_string() implementation
433bac7 docs: platform/generic: Add details about stdout-path DT property b4efa70 docs: platform/generic: Add details about IPI and timer expectations dfd9dd6 docs: Add platform requirements document
c2286b6 docs: Fix ordering of pages in table of contents
7be75f5 docs: Don't use italic text in page title
63a513e lib: Rename unprivileged trap handler
aef9a60 lib: Add csr detect support
13ca20d lib: Create a separate math helper function file
79d0fad lib: utils: Update reserved memory fdt node even if PMP is not present 6a053f6 lib: Add support for hart specific features
b2df751 platform: Move platform features to hart
4938024 platform: fpga: Remove redundant platform specific features ec0d2a7 lib: timer: Provide a hart based timer feature
1f235ec lib: Add platform features in boot time print
22c4334 lib: Add hart features in boot time print
36833ab lib: Optimize inline assembly for unprivilege access functions 38a4b54 firmware: Correct spelling mistakes
28b4052 lib: sbi: detect features before everything else in sbi_hart_init() 4984183 lib: sbi: Improve get_feature_str() implementation and usage 3aa1036 lib: sbi: Remove extra spaces from boot time prints 3a8fc81 lib: sbi: Print platform HART count just before boot HART id 63b0f5f include: sbi: Use scratch pointer as parmeter in HART feature APIs 2966510 lib: sbi: Few cosmetic improvements to HART feature detection a38bea9 lib: sbi_hart: Detect number of supported PMP regions 89ba634 include: sbi: Add firmware extension constants
73d6ef3 lib: utils: Remove redundant parameters from PLIC init functions 446a9c6 lib: utils: Allow PLIC functions to be used for multiple PLICs 2c685c2 lib: utils: Extend fdt_find_match() Implementation
d30bb68 lib: utils/irqchip: Initialize all matching irqchip DT nodes a9a9751 lib: utils: Allow CLINT functions to be used for multiple CLINTs 569dd64 lib: utils: Add fdt_parse_clint_node() function
6956e83 lib: utils/ipi: Initialize all matching ipi DT nodes a63f05f lib: utils/timer: Initialize all matching timer DT nodes 30b6040 Makefile: Fix builtin DTB compilation for out-of-tree platforms 64f1408 firmware: fw_base: Make builtin DTB available to fw_platform_init() 4ce6b7a firmware: fw_base: Don't OR forced FW_OPTIONS
86ec534 firmware: Allow fw_platform_init() to return updated FDT location c6c65ee Makefile: Preprocess builtin DTS
4e3876d Makefile: Add mechanism for platforms to have multiple builtin DTBs 72019ee platform: kendryte/k210: Use new mechanism of builtin DTB 51f0e4a firmware: Remove FW_PAYLOAD_FDT and related documentation 1b8c012 lib: Add RISC-V hypervisor v0.6.1 support
79bfd67 docs: Use doxygen config to mark the main page
106b888 docs: Remove redundant documentation about combined payload use case 9802906 platform: Add AE350 platform specific SBI handler
32f87e5 platform: Add AE350 cache control SBIs
e2c3f01 lib: Fix __sbi_hfence_gvma_vmid_gpa() and __sbi_hfence_vvma_asid_va() 6966ad0 platform/lib: Allow the OS to map the regions that are protected by PMP 518e85c platform: Update Nuclei ux600 platform support
d5725c2 lib: Don't print delegation CSRs if there is no S-Mode 637b348 lib: Fix the SBI_HART_HAS_MCOUNTEREN feature check
db56ef3 platform: Add support for Shakti C-class SoC from IIT-M 9bd5f8f lib: sbi: Fix 32/64 bits variable compatibility
2314101 lib: Don't return any invalid error from SBI ecall
a98258d include: Bump-up version to 0.8

---

Changes in v2:
- Upgrade OpenSBI to v0.8 release

 roms/opensbi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
roms/opensbi +1 -1
index 9f1b72c..a98258d 160000
@@ -1 +1 @@
-Subproject commit 9f1b72ce66d659e91013b358939e832fb27223f5
+Subproject commit a98258d0b537a295f517bbc8d813007336731fa9
Signature · 1 line
2.7.4
Reviewed-by on v2 2/7
#5 lore raw

Re: [PATCH v2 2/7] roms/opensbi: Upgrade from v0.7 to v0.8

Quoted 97 lines · Bin Meng

From: Bin Meng <[email protected]>

Upgrade OpenSBI from v0.7 to v0.8.

The v0.8 release includes the following commits:

1bb00ab lib: No need to provide default PMP region using platform callbacks a9eac67 include: sbi_platform: Combine reboot and shutdown into one callback 6585fab lib: utils: Add SiFive test device
4781545 platform: Add Nuclei UX600 platform
3a326af scripts: adapt binary archive script for Nuclei UX600 5bdf022 firmware: fw_base: Remove CSR_MTVEC update check
e6c1345 lib: utils/serial: Skip baudrate config if input frequency is zero 01a8c8e lib: utils: Improve fdt_parse_uart8250() API
0a0093b lib: utils: Add fdt_parse_uart8250_node() function
243b0d0 lib: utils: Remove redundant clint_ipi_sync() declaration e3ad7c1 lib: utils: Rename fdt_parse_clint() to fdt_parse_compat_addr() a39cd6f lib: utils: Add FDT match table based node lookup
dd33b9e lib: utils: Make fdt_get_node_addr_size() public function 66185b3 lib: utils: Add fdt_parse_sifive_uart_node() function 19e966b lib: utils: Add fdt_parse_hart_id() function
44dd7be lib: utils: Add fdt_parse_max_hart_id() API
f0eb503 lib: utils: Add fdt_parse_plic_node() function
1ac794c include: Add array_size() macro
8ff2b94 lib: utils: Add simple FDT timer framework
76f0f81 lib: utils: Add simple FDT ipi framework
75322a6 lib: utils: Add simple FDT irqchip framework
76a8940 lib: utils: Add simple FDT serial framework
7cc6fa4 lib: utils: Add simple FDT reset framework
4d06353 firmware: fw_base: Introduce optional fw_platform_init() f1aa9e5 platform: Add generic FDT based platform support
1f21b99 lib: sbi: Print platform hart count at boot time
2ba7087 scripts: Add generic platform to create-binary-archive.sh 4f18c6e platform: generic: Add Sifive FU540 TLB flush range limit override 13717a8 platform: Remove qemu/virt directory
65c06b0 platform: Remove spike directory
d626037 docs: Add missing links in platform.md
7993ca2 include: sbi: Remove redundant page table related defines 5338679 lib: sbi_tlb: Fix remote TLB HFENCE VVMA implementation dc38929 lib: sbi: Improve misa_string() implementation
433bac7 docs: platform/generic: Add details about stdout-path DT property b4efa70 docs: platform/generic: Add details about IPI and timer expectations dfd9dd6 docs: Add platform requirements document
c2286b6 docs: Fix ordering of pages in table of contents
7be75f5 docs: Don't use italic text in page title
63a513e lib: Rename unprivileged trap handler
aef9a60 lib: Add csr detect support
13ca20d lib: Create a separate math helper function file
79d0fad lib: utils: Update reserved memory fdt node even if PMP is not present 6a053f6 lib: Add support for hart specific features
b2df751 platform: Move platform features to hart
4938024 platform: fpga: Remove redundant platform specific features ec0d2a7 lib: timer: Provide a hart based timer feature
1f235ec lib: Add platform features in boot time print
22c4334 lib: Add hart features in boot time print
36833ab lib: Optimize inline assembly for unprivilege access functions 38a4b54 firmware: Correct spelling mistakes
28b4052 lib: sbi: detect features before everything else in sbi_hart_init() 4984183 lib: sbi: Improve get_feature_str() implementation and usage 3aa1036 lib: sbi: Remove extra spaces from boot time prints 3a8fc81 lib: sbi: Print platform HART count just before boot HART id 63b0f5f include: sbi: Use scratch pointer as parmeter in HART feature APIs 2966510 lib: sbi: Few cosmetic improvements to HART feature detection a38bea9 lib: sbi_hart: Detect number of supported PMP regions 89ba634 include: sbi: Add firmware extension constants
73d6ef3 lib: utils: Remove redundant parameters from PLIC init functions 446a9c6 lib: utils: Allow PLIC functions to be used for multiple PLICs 2c685c2 lib: utils: Extend fdt_find_match() Implementation
d30bb68 lib: utils/irqchip: Initialize all matching irqchip DT nodes a9a9751 lib: utils: Allow CLINT functions to be used for multiple CLINTs 569dd64 lib: utils: Add fdt_parse_clint_node() function
6956e83 lib: utils/ipi: Initialize all matching ipi DT nodes a63f05f lib: utils/timer: Initialize all matching timer DT nodes 30b6040 Makefile: Fix builtin DTB compilation for out-of-tree platforms 64f1408 firmware: fw_base: Make builtin DTB available to fw_platform_init() 4ce6b7a firmware: fw_base: Don't OR forced FW_OPTIONS
86ec534 firmware: Allow fw_platform_init() to return updated FDT location c6c65ee Makefile: Preprocess builtin DTS
4e3876d Makefile: Add mechanism for platforms to have multiple builtin DTBs 72019ee platform: kendryte/k210: Use new mechanism of builtin DTB 51f0e4a firmware: Remove FW_PAYLOAD_FDT and related documentation 1b8c012 lib: Add RISC-V hypervisor v0.6.1 support
79bfd67 docs: Use doxygen config to mark the main page
106b888 docs: Remove redundant documentation about combined payload use case 9802906 platform: Add AE350 platform specific SBI handler
32f87e5 platform: Add AE350 cache control SBIs
e2c3f01 lib: Fix __sbi_hfence_gvma_vmid_gpa() and __sbi_hfence_vvma_asid_va() 6966ad0 platform/lib: Allow the OS to map the regions that are protected by PMP 518e85c platform: Update Nuclei ux600 platform support
d5725c2 lib: Don't print delegation CSRs if there is no S-Mode 637b348 lib: Fix the SBI_HART_HAS_MCOUNTEREN feature check
db56ef3 platform: Add support for Shakti C-class SoC from IIT-M 9bd5f8f lib: sbi: Fix 32/64 bits variable compatibility
2314101 lib: Don't return any invalid error from SBI ecall
a98258d include: Bump-up version to 0.8

Quoted 2 lines

Alistair

Quoted 20 lines

---

Changes in v2:
- Upgrade OpenSBI to v0.8 release

 roms/opensbi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
roms/opensbi +1 -2
index 9f1b72c..a98258d 160000
@@ -1 +1 @@
-Subproject commit 9f1b72ce66d659e91013b358939e832fb27223f5
+Subproject commit a98258d0b537a295f517bbc8d813007336731fa9
--

2.7.4

author
#6 lore raw

PATCH v2 3/7 roms/Makefile: Build the generic platform for RISC-V OpenSBI firmware

In reply to Bin Meng

From: Bin Meng <[email protected]>

The RISC-V generic platform is a flattened device tree (FDT) based platform where all platform specific functionality is provided based on FDT passed by previous booting stage. The support was added in the upstream OpenSBI v0.8 release recently.

Update our Makefile to build the generic platform instead of building virt and sifive_u separately for RISC-V OpenSBI firmware.

---

Changes in v2:
- Copy the ELF images too in the make rules

 roms/Makefile | 32 ++++++++++----------------------
 1 file changed, 10 insertions(+), 22 deletions(-)
roms/Makefile +10 -22
index f9acf39..211a269 100644
@@ -64,10 +64,8 @@ default help:
 	@echo "  u-boot.e500        -- update u-boot.e500"
 	@echo "  u-boot.sam460      -- update u-boot.sam460"
 	@echo "  efi                -- update UEFI (edk2) platform firmware"
-	@echo "  opensbi32-virt     -- update OpenSBI for 32-bit virt machine"
-	@echo "  opensbi64-virt     -- update OpenSBI for 64-bit virt machine"
-	@echo "  opensbi32-sifive_u -- update OpenSBI for 32-bit sifive_u machine"
-	@echo "  opensbi64-sifive_u -- update OpenSBI for 64-bit sifive_u machine"
+	@echo "  opensbi32-generic  -- update OpenSBI for 32-bit generic machine"
+	@echo "  opensbi64-generic  -- update OpenSBI for 64-bit generic machine"
 	@echo "  bios-microvm       -- update bios-microvm.bin (qboot)"
 	@echo "  clean              -- delete the files generated by the previous" \
 	                              "build targets"
@@ -170,29 +168,19 @@ skiboot:
 efi: edk2-basetools
 	$(MAKE) -f Makefile.edk2
 
-opensbi32-virt:
+opensbi32-generic:
 	$(MAKE) -C opensbi \
 		CROSS_COMPILE=$(riscv32_cross_prefix) \
-		PLATFORM="qemu/virt"
-	cp opensbi/build/platform/qemu/virt/firmware/fw_jump.bin ../pc-bios/opensbi-riscv32-virt-fw_jump.bin
+		PLATFORM="generic"
+	cp opensbi/build/platform/generic/firmware/fw_jump.bin ../pc-bios/opensbi-riscv32-generic-fw_jump.bin
+	cp opensbi/build/platform/generic/firmware/fw_jump.elf ../pc-bios/opensbi-riscv32-generic-fw_jump.elf
 
-opensbi64-virt:
+opensbi64-generic:
 	$(MAKE) -C opensbi \
 		CROSS_COMPILE=$(riscv64_cross_prefix) \
-		PLATFORM="qemu/virt"
-	cp opensbi/build/platform/qemu/virt/firmware/fw_jump.bin ../pc-bios/opensbi-riscv64-virt-fw_jump.bin
-
-opensbi32-sifive_u:
-	$(MAKE) -C opensbi \
-		CROSS_COMPILE=$(riscv32_cross_prefix) \
-		PLATFORM="sifive/fu540"
-	cp opensbi/build/platform/sifive/fu540/firmware/fw_jump.bin ../pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin
-
-opensbi64-sifive_u:
-	$(MAKE) -C opensbi \
-		CROSS_COMPILE=$(riscv64_cross_prefix) \
-		PLATFORM="sifive/fu540"
-	cp opensbi/build/platform/sifive/fu540/firmware/fw_jump.bin ../pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin
+		PLATFORM="generic"
+	cp opensbi/build/platform/generic/firmware/fw_jump.bin ../pc-bios/opensbi-riscv64-generic-fw_jump.bin
+	cp opensbi/build/platform/generic/firmware/fw_jump.elf ../pc-bios/opensbi-riscv64-generic-fw_jump.elf
 
 bios-microvm:
 	$(MAKE) -C qboot
Signature · 1 line
2.7.4
author
#7 lore raw

PATCH v2 4/7 hw/riscv: Use pre-built bios image of generic platform for virt & sifive_u

In reply to Bin Meng

From: Bin Meng <[email protected]>

Update virt and sifive_u machines to use the opensbi bios image built for the generic FDT platform.

Remove the out-of-date no longer used bios images.

---

(no changes since v1)

 hw/riscv/sifive_u.c                          |   4 ++--
 hw/riscv/virt.c                              |   4 ++--
 pc-bios/opensbi-riscv32-generic-fw_jump.bin  | Bin 0 -> 58048 bytes
 pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin | Bin 49520 -> 0 bytes
 pc-bios/opensbi-riscv32-virt-fw_jump.bin     | Bin 49504 -> 0 bytes
 pc-bios/opensbi-riscv64-generic-fw_jump.bin  | Bin 0 -> 70792 bytes
 pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin | Bin 57936 -> 0 bytes
 pc-bios/opensbi-riscv64-virt-fw_jump.bin     | Bin 57920 -> 0 bytes
 8 files changed, 4 insertions(+), 4 deletions(-)
 create mode 100644 pc-bios/opensbi-riscv32-generic-fw_jump.bin
 delete mode 100644 pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin
 delete mode 100644 pc-bios/opensbi-riscv32-virt-fw_jump.bin
 create mode 100644 pc-bios/opensbi-riscv64-generic-fw_jump.bin
 delete mode 100644 pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin
 delete mode 100644 pc-bios/opensbi-riscv64-virt-fw_jump.bin
hw/riscv/sifive_u.c +2 -2
index ea197ab..2edd81a 100644
@@ -58,9 +58,9 @@
 #include <libfdt.h>
 
 #if defined(TARGET_RISCV32)
-# define BIOS_FILENAME "opensbi-riscv32-sifive_u-fw_jump.bin"
+# define BIOS_FILENAME "opensbi-riscv32-generic-fw_jump.bin"
 #else
-# define BIOS_FILENAME "opensbi-riscv64-sifive_u-fw_jump.bin"
+# define BIOS_FILENAME "opensbi-riscv64-generic-fw_jump.bin"
 #endif
 
 static const struct MemmapEntry {
hw/riscv/virt.c +2 -2
index 616db6f..b7f8598 100644
@@ -46,9 +46,9 @@
 #include <libfdt.h>
 
 #if defined(TARGET_RISCV32)
-# define BIOS_FILENAME "opensbi-riscv32-virt-fw_jump.bin"
+# define BIOS_FILENAME "opensbi-riscv32-generic-fw_jump.bin"
 #else
-# define BIOS_FILENAME "opensbi-riscv64-virt-fw_jump.bin"
+# define BIOS_FILENAME "opensbi-riscv64-generic-fw_jump.bin"
 #endif
 
 static const struct MemmapEntry {
pc-bios/opensbi-riscv32-generic-fw_jump.bin new file binary +0 -0
new file mode 100644
index 0000000..ec40860
Binary files /dev/null and b/pc-bios/opensbi-riscv32-generic-fw_jump.bin differ
pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin deleted binary +0 -0
deleted file mode 100644
index 3e0da54..0000000
Binary files a/pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin and /dev/null differ
pc-bios/opensbi-riscv32-virt-fw_jump.bin deleted binary +0 -0
deleted file mode 100644
index bc56ed6..0000000
Binary files a/pc-bios/opensbi-riscv32-virt-fw_jump.bin and /dev/null differ
pc-bios/opensbi-riscv64-generic-fw_jump.bin new file binary +0 -0
new file mode 100644
index 0000000..7b08352
Binary files /dev/null and b/pc-bios/opensbi-riscv64-generic-fw_jump.bin differ
pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin deleted binary +0 -0
deleted file mode 100644
index 1acee86..0000000
Binary files a/pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin and /dev/null differ
pc-bios/opensbi-riscv64-virt-fw_jump.bin deleted binary +0 -0
deleted file mode 100644
index c62f2b4..0000000
Binary files a/pc-bios/opensbi-riscv64-virt-fw_jump.bin and /dev/null differ
Signature · 1 line
2.7.4
author
#8 lore raw

PATCH v2 5/7 hw/riscv: spike: Change the default bios to use generic platform image

In reply to Bin Meng

From: Bin Meng <[email protected]>

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 using ELF files for the Spike machine was intentional.

---

(no changes since v1)

 hw/riscv/spike.c                            |   9 +++++++--
 pc-bios/opensbi-riscv32-generic-fw_jump.elf | Bin 0 -> 554156 bytes
 pc-bios/opensbi-riscv64-generic-fw_jump.elf | Bin 0 -> 619960 bytes
 3 files changed, 7 insertions(+), 2 deletions(-)
 create mode 100644 pc-bios/opensbi-riscv32-generic-fw_jump.elf
 create mode 100644 pc-bios/opensbi-riscv64-generic-fw_jump.elf
hw/riscv/spike.c +7 -2
index 3c87e04..2fb7f98 100644
@@ -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 {
pc-bios/opensbi-riscv32-generic-fw_jump.elf new file binary +0 -0
new file mode 100644
index 0000000..5fd3fb7
Binary files /dev/null and b/pc-bios/opensbi-riscv32-generic-fw_jump.elf differ
pc-bios/opensbi-riscv64-generic-fw_jump.elf new file binary +0 -0
new file mode 100644
index 0000000..d29e4f8
Binary files /dev/null and b/pc-bios/opensbi-riscv64-generic-fw_jump.elf differ
Signature · 1 line
2.7.4
author
#9 lore raw

PATCH v2 6/7 gitlab-ci/opensbi: Update GitLab CI to build generic platform

In reply to Bin Meng

From: Bin Meng <[email protected]>

This updates the GitLab CI opensbi job to build opensbi bios images for the generic platform.

---

Changes in v2:
- Include ELF images in the artifacts

 .gitlab-ci.d/opensbi.yml | 28 ++++++++++------------------
 1 file changed, 10 insertions(+), 18 deletions(-)
.gitlab-ci.d/opensbi.yml +10 -18
index dd051c0..23e2fe4 100644
@@ -34,18 +34,14 @@ build-opensbi:
    when: always
  artifacts:
    paths: # 'artifacts.zip' will contains the following files:
-   - pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin
-   - pc-bios/opensbi-riscv32-virt-fw_jump.bin
-   - pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin
-   - pc-bios/opensbi-riscv64-virt-fw_jump.bin
-   - opensbi32-virt-stdout.log
-   - opensbi32-virt-stderr.log
-   - opensbi64-virt-stdout.log
-   - opensbi64-virt-stderr.log
-   - opensbi32-sifive_u-stdout.log
-   - opensbi32-sifive_u-stderr.log
-   - opensbi64-sifive_u-stdout.log
-   - opensbi64-sifive_u-stderr.log
+   - pc-bios/opensbi-riscv32-generic-fw_jump.bin
+   - pc-bios/opensbi-riscv32-generic-fw_jump.elf
+   - pc-bios/opensbi-riscv64-generic-fw_jump.bin
+   - pc-bios/opensbi-riscv64-generic-fw_jump.elf
+   - opensbi32-generic-stdout.log
+   - opensbi32-generic-stderr.log
+   - opensbi64-generic-stdout.log
+   - opensbi64-generic-stderr.log
  image: $CI_REGISTRY_IMAGE:opensbi-cross-build
  variables:
    GIT_DEPTH: 3
@@ -54,10 +50,6 @@ build-opensbi:
  - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1))
  - echo "=== Using ${JOBS} simultaneous jobs ==="
  - make -j${JOBS} -C roms/opensbi clean
- - make -j${JOBS} -C roms opensbi32-virt 2>&1 1>opensbi32-virt-stdout.log | tee -a opensbi32-virt-stderr.log >&2
+ - make -j${JOBS} -C roms opensbi32-generic 2>&1 1>opensbi32-generic-stdout.log | tee -a opensbi32-generic-stderr.log >&2
  - make -j${JOBS} -C roms/opensbi clean
- - make -j${JOBS} -C roms opensbi64-virt 2>&1 1>opensbi64-virt-stdout.log | tee -a opensbi64-virt-stderr.log >&2
- - make -j${JOBS} -C roms/opensbi clean
- - make -j${JOBS} -C roms opensbi32-sifive_u 2>&1 1>opensbi32-sifive_u-stdout.log | tee -a opensbi32-sifive_u-stderr.log >&2
- - make -j${JOBS} -C roms/opensbi clean
- - make -j${JOBS} -C roms opensbi64-sifive_u 2>&1 1>opensbi64-sifive_u-stdout.log | tee -a opensbi64-sifive_u-stderr.log >&2
+ - make -j${JOBS} -C roms opensbi64-generic 2>&1 1>opensbi64-generic-stdout.log | tee -a opensbi64-generic-stderr.log >&2
Signature · 1 line
2.7.4
author
#10 lore raw

PATCH v2 7/7 Makefile: Ship the generic platform bios images for RISC-V

In reply to Bin Meng

From: Bin Meng <[email protected]>

---

Changes in v2:
- new patch: Makefile: Ship the generic platform bios images for RISC-V

 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -2
index 48f23aa..ddd7c43 100644
@@ -841,8 +841,8 @@ u-boot.e500 u-boot-sam460-20100605.bin \
 qemu_vga.ndrv \
 edk2-licenses.txt \
 hppa-firmware.img \
-opensbi-riscv32-sifive_u-fw_jump.bin opensbi-riscv32-virt-fw_jump.bin \
-opensbi-riscv64-sifive_u-fw_jump.bin opensbi-riscv64-virt-fw_jump.bin
+opensbi-riscv32-generic-fw_jump.bin opensbi-riscv32-generic-fw_jump.elf \
+opensbi-riscv64-generic-fw_jump.bin opensbi-riscv64-generic-fw_jump.elf
 
 
 DESCS=50-edk2-i386-secure.json 50-edk2-x86_64-secure.json \
Signature · 1 line
2.7.4
#11 lore raw
In reply to Bin Meng
Quoted 23 lines

-----Original Message-----
From: Qemu-riscv <qemu-riscv- [email protected]> On Behalf Of Bin Meng
Sent: 22 June 2020 12:03
To: Alistair Francis <[email protected]>; Bastian Koppelmann <[email protected]>; Palmer Dabbelt <[email protected]>; Sagar Karandikar <[email protected]>; [email protected]; qemu- [email protected]
Cc: Anup Patel <[email protected]>; Bin Meng <[email protected]>
Subject: [PATCH v2 0/7] riscv: Switch to use generic platform of opensbi bios images

From: Bin Meng <[email protected]>

The RISC-V generic platform is a flattened device tree (FDT) based platform where all platform specific functionality is provided based on FDT passed by previous booting stage. The support was added in the upstream OpenSBI v0.8 release recently.

Quoted 5 lines

This series updates QEMU to switch to use generic platform of opensbi bios images.

The patch emails do not contain binary bits, please grab all updates at
https://github.com/lbmeng/qemu.git bios branch.

It will be nice to have this series updated to for fw_dynamic.bin .

Maybe you can rebase your series on top of Atish's patches ??

Regards,
Anup

Quoted 47 lines

Changes in v2:
- new patch: configure: Create symbolic links for pc-bios/*.elf files
- Upgrade OpenSBI to v0.8 release
- Copy the ELF images too in the make rules
- Include ELF images in the artifacts
- new patch: Makefile: Ship the generic platform bios images for RISC-V

Bin Meng (7):
configure: Create symbolic links for pc-bios/*.elf files roms/opensbi: Upgrade from v0.7 to v0.8
roms/Makefile: Build the generic platform for RISC-V OpenSBI firmware hw/riscv: Use pre-built bios image of generic platform for virt &
sifive_u
hw/riscv: spike: Change the default bios to use generic platform image gitlab-ci/opensbi: Update GitLab CI to build generic platform
Makefile: Ship the generic platform bios images for RISC-V

 .gitlab-ci.d/opensbi.yml                     |  28 +++++++++--------------
 Makefile                                     |   4 ++--
 configure                                    |   1 +
 hw/riscv/sifive_u.c                          |   4 ++--
 hw/riscv/spike.c                             |   9 ++++++--
 hw/riscv/virt.c                              |   4 ++--
 pc-bios/opensbi-riscv32-generic-fw_jump.bin  | Bin 0 -> 58048 bytes  pc-
bios/opensbi-riscv32-generic-fw_jump.elf  | Bin 0 -> 554156 bytes  pc-
bios/opensbi-riscv32-sifive_u-fw_jump.bin | Bin 49520 -> 0 bytes
 pc-bios/opensbi-riscv32-virt-fw_jump.bin     | Bin 49504 -> 0 bytes
 pc-bios/opensbi-riscv64-generic-fw_jump.bin  | Bin 0 -> 70792 bytes  pc-
bios/opensbi-riscv64-generic-fw_jump.elf  | Bin 0 -> 619960 bytes  pc-
bios/opensbi-riscv64-sifive_u-fw_jump.bin | Bin 57936 -> 0 bytes
 pc-bios/opensbi-riscv64-virt-fw_jump.bin     | Bin 57920 -> 0 bytes
 roms/Makefile                                |  32 +++++++++------------------
 roms/opensbi                                 |   2 +-
 16 files changed, 35 insertions(+), 49 deletions(-)  create mode 100644 pc-
bios/opensbi-riscv32-generic-fw_jump.bin
 create mode 100644 pc-bios/opensbi-riscv32-generic-fw_jump.elf
 delete mode 100644 pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin
 delete mode 100644 pc-bios/opensbi-riscv32-virt-fw_jump.bin
 create mode 100644 pc-bios/opensbi-riscv64-generic-fw_jump.bin
 create mode 100644 pc-bios/opensbi-riscv64-generic-fw_jump.elf
 delete mode 100644 pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin
 delete mode 100644 pc-bios/opensbi-riscv64-virt-fw_jump.bin

--
2.7.4

author
#12 lore raw

Hi Anup,

Quoted 24 lines · Anup Patel
Quoted 24 lines

-----Original Message-----
From: Qemu-riscv <qemu-riscv- [email protected]> On Behalf Of Bin Meng
Sent: 22 June 2020 12:03
To: Alistair Francis <[email protected]>; Bastian Koppelmann <[email protected]>; Palmer Dabbelt <[email protected]>; Sagar Karandikar <[email protected]>; [email protected]; qemu- [email protected]
Cc: Anup Patel <[email protected]>; Bin Meng <[email protected]>
Subject: [PATCH v2 0/7] riscv: Switch to use generic platform of opensbi bios images

From: Bin Meng <[email protected]>

The RISC-V generic platform is a flattened device tree (FDT) based platform where all platform specific functionality is provided based on FDT passed by previous booting stage. The support was added in the upstream OpenSBI v0.8 release recently.

Quoted 7 lines
Quoted 5 lines

This series updates QEMU to switch to use generic platform of opensbi bios images.

The patch emails do not contain binary bits, please grab all updates at
https://github.com/lbmeng/qemu.git bios branch.

It will be nice to have this series updated to for fw_dynamic.bin .

Do you mean we include fw_dynamic.bin for virt & sifive_u, and fw_dynamic.elf for spike?

But previously we agreed to include only generic platform BIN and ELF files. See https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg00664.html

Quoted 2 lines

Maybe you can rebase your series on top of Atish's patches ??

Regards,
Bin

#13 lore raw
Quoted 49 lines

-----Original Message-----
From: Bin Meng <[email protected]>
Sent: 22 June 2020 17:43
To: Anup Patel <[email protected]>
Cc: Alistair Francis <[email protected]>; Bastian Koppelmann <[email protected]>; Palmer Dabbelt <[email protected]>; Sagar Karandikar <[email protected]>; [email protected]; qemu- [email protected]; Anup Patel <[email protected]>; Bin Meng <[email protected]>
Subject: Re: [PATCH v2 0/7] riscv: Switch to use generic platform of opensbi bios images

Hi Anup,

Quoted 31 lines · Anup Patel
Quoted 30 lines

-----Original Message-----
From: Qemu-riscv <qemu-riscv- [email protected]> On Behalf Of Bin Meng
Sent: 22 June 2020 12:03
To: Alistair Francis <[email protected]>; Bastian Koppelmann <[email protected]>; Palmer Dabbelt <[email protected]>; Sagar Karandikar <[email protected]>; [email protected]; qemu- [email protected]
Cc: Anup Patel <[email protected]>; Bin Meng <[email protected]>
Subject: [PATCH v2 0/7] riscv: Switch to use generic platform of opensbi bios images

From: Bin Meng <[email protected]>

The RISC-V generic platform is a flattened device tree (FDT) based platform where all platform specific functionality is provided based on FDT passed by previous booting stage. The support was added in the upstream OpenSBI
v0.8 release recently.

This series updates QEMU to switch to use generic platform of opensbi bios images.

The patch emails do not contain binary bits, please grab all updates at https://github.com/lbmeng/qemu.git bios branch.

Quoted 7 lines
Quoted 1 line

It will be nice to have this series updated to for fw_dynamic.bin .

Do you mean we include fw_dynamic.bin for virt & sifive_u, and fw_dynamic.elf for spike?

But previously we agreed to include only generic platform BIN and ELF files. See https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg00664.html

I am suggesting to use Generic platform fw_dynamic.bin and fw_dynamic.elf for QEMU virt, QEMU spike, and QEMU sifive_u machines.

Regards,
Anup

author
#14 lore raw

Hi Anup,

Quoted 52 lines · Anup Patel
Quoted 52 lines

-----Original Message-----
From: Bin Meng <[email protected]>
Sent: 22 June 2020 17:43
To: Anup Patel <[email protected]>
Cc: Alistair Francis <[email protected]>; Bastian Koppelmann <[email protected]>; Palmer Dabbelt <[email protected]>; Sagar Karandikar <[email protected]>; [email protected]; qemu- [email protected]; Anup Patel <[email protected]>; Bin Meng <[email protected]>
Subject: Re: [PATCH v2 0/7] riscv: Switch to use generic platform of opensbi bios images

Hi Anup,

Quoted 32 lines · Anup Patel
Quoted 25 lines

-----Original Message-----
From: Qemu-riscv <qemu-riscv- [email protected]> On Behalf Of Bin Meng
Sent: 22 June 2020 12:03
To: Alistair Francis <[email protected]>; Bastian Koppelmann <[email protected]>; Palmer Dabbelt <[email protected]>; Sagar Karandikar <[email protected]>; [email protected]; qemu- [email protected]
Cc: Anup Patel <[email protected]>; Bin Meng <[email protected]>
Subject: [PATCH v2 0/7] riscv: Switch to use generic platform of opensbi bios images

From: Bin Meng <[email protected]>

The RISC-V generic platform is a flattened device tree (FDT) based platform where all platform specific functionality is provided based on FDT passed by previous booting stage. The support was added in the upstream OpenSBI
v0.8 release recently.

Quoted 5 lines

This series updates QEMU to switch to use generic platform of opensbi bios images.

The patch emails do not contain binary bits, please grab all updates at https://github.com/lbmeng/qemu.git bios branch.

It will be nice to have this series updated to for fw_dynamic.bin .

Quoted 8 lines
Quoted 5 lines

Do you mean we include fw_dynamic.bin for virt & sifive_u, and fw_dynamic.elf for spike?

But previously we agreed to include only generic platform BIN and ELF files. See https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg00664.html

I am suggesting to use Generic platform fw_dynamic.bin and fw_dynamic.elf for QEMU virt, QEMU spike, and QEMU sifive_u machines.

Do you mean we replace fw_jump.bin with fw_dynamic.bin in QEMU? If everyone agrees this is the way to go, I can rebase this series on top of Atish's fw_dynamic.bin support series.

Regards,
Bin

#15 lore raw
Quoted 79 lines

-----Original Message-----
From: Bin Meng <[email protected]>
Sent: 22 June 2020 17:57
To: Anup Patel <[email protected]>
Cc: Alistair Francis <[email protected]>; Bastian Koppelmann <[email protected]>; Palmer Dabbelt <[email protected]>; Sagar Karandikar <[email protected]>; [email protected]; qemu- [email protected]; Anup Patel <[email protected]>; Bin Meng <[email protected]>
Subject: Re: [PATCH v2 0/7] riscv: Switch to use generic platform of opensbi bios images

Hi Anup,

Quoted 19 lines · Anup Patel
Quoted 19 lines

-----Original Message-----
From: Bin Meng <[email protected]>
Sent: 22 June 2020 17:43
To: Anup Patel <[email protected]>
Cc: Alistair Francis <[email protected]>; Bastian Koppelmann <[email protected]>; Palmer Dabbelt <[email protected]>; Sagar Karandikar <[email protected]>; [email protected]; qemu- [email protected]; Anup Patel <[email protected]>; Bin Meng <[email protected]>
Subject: Re: [PATCH v2 0/7] riscv: Switch to use generic platform of opensbi bios images

Hi Anup,

On Mon, Jun 22, 2020 at 6:09 PM Anup Patel <[email protected]>

Quoted 31 lines · wrote:
Quoted 31 lines
Quoted 31 lines
Quoted 30 lines

-----Original Message-----
From: Qemu-riscv <qemu-riscv- [email protected]> On Behalf Of Bin Meng
Sent: 22 June 2020 12:03
To: Alistair Francis <[email protected]>; Bastian Koppelmann <[email protected]>; Palmer Dabbelt <[email protected]>; Sagar Karandikar <[email protected]>; [email protected]; qemu- [email protected]
Cc: Anup Patel <[email protected]>; Bin Meng <[email protected]>
Subject: [PATCH v2 0/7] riscv: Switch to use generic platform of opensbi bios images

From: Bin Meng <[email protected]>

The RISC-V generic platform is a flattened device tree (FDT) based platform where all platform specific functionality is provided based on FDT passed by previous booting stage. The support was added in the upstream OpenSBI
v0.8 release recently.

This series updates QEMU to switch to use generic platform of opensbi bios images.

The patch emails do not contain binary bits, please grab all updates at https://github.com/lbmeng/qemu.git bios branch.

Quoted 6 lines
Quoted 6 lines
Quoted 1 line

It will be nice to have this series updated to for fw_dynamic.bin .

Do you mean we include fw_dynamic.bin for virt & sifive_u, and fw_dynamic.elf for spike?

But previously we agreed to include only generic platform BIN and ELF

files.

Quoted 3 lines
Quoted 2 lines

See
https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg00664.html

Quoted 6 lines
Quoted 2 lines

I am suggesting to use Generic platform fw_dynamic.bin and fw_dynamic.elf for QEMU virt, QEMU spike, and QEMU sifive_u machines.

Do you mean we replace fw_jump.bin with fw_dynamic.bin in QEMU? If everyone agrees this is the way to go, I can rebase this series on top of Atish's fw_dynamic.bin support series.

Yes, replace fw_jump.bin with fw_dynamic.bin in QEMU. It will definitely benefit large kernel images (such as FreeBSD kernel) and it allow QEMU to decide the FDT placement in DRAM.

Regards,
Anup

#16 lore raw
In reply to Bin Meng
Quoted 62 lines · Bin Meng

Hi Anup,

Quoted 58 lines · Anup Patel
Quoted 57 lines

-----Original Message-----
From: Bin Meng <[email protected]>
Sent: 22 June 2020 17:43
To: Anup Patel <[email protected]>
Cc: Alistair Francis <[email protected]>; Bastian Koppelmann <[email protected]>; Palmer Dabbelt <[email protected]>; Sagar Karandikar <[email protected]>; [email protected]; qemu- [email protected]; Anup Patel <[email protected]>; Bin Meng <[email protected]>
Subject: Re: [PATCH v2 0/7] riscv: Switch to use generic platform of opensbi bios images

Hi Anup,

Quoted 25 lines · Anup Patel
Quoted 25 lines

-----Original Message-----
From: Qemu-riscv <qemu-riscv- [email protected]> On Behalf Of Bin Meng
Sent: 22 June 2020 12:03
To: Alistair Francis <[email protected]>; Bastian Koppelmann <[email protected]>; Palmer Dabbelt <[email protected]>; Sagar Karandikar <[email protected]>; [email protected]; qemu- [email protected]
Cc: Anup Patel <[email protected]>; Bin Meng <[email protected]>
Subject: [PATCH v2 0/7] riscv: Switch to use generic platform of opensbi bios images

From: Bin Meng <[email protected]>

The RISC-V generic platform is a flattened device tree (FDT) based platform where all platform specific functionality is provided based on FDT passed by previous booting stage. The support was added in the upstream OpenSBI
v0.8 release recently.

Quoted 7 lines
Quoted 5 lines

This series updates QEMU to switch to use generic platform of opensbi bios images.

The patch emails do not contain binary bits, please grab all updates at https://github.com/lbmeng/qemu.git bios branch.

It will be nice to have this series updated to for fw_dynamic.bin .

Do you mean we include fw_dynamic.bin for virt & sifive_u, and fw_dynamic.elf for spike?

But previously we agreed to include only generic platform BIN and ELF files. See https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg00664.html

Quoted 6 lines
Quoted 2 lines

I am suggesting to use Generic platform fw_dynamic.bin and fw_dynamic.elf for QEMU virt, QEMU spike, and QEMU sifive_u machines.

Do you mean we replace fw_jump.bin with fw_dynamic.bin in QEMU? If everyone agrees this is the way to go, I can rebase this series on top of Atish's fw_dynamic.bin support series.

I think fw_dynamic makes the most sense. The order doesn't really matter, but as we are checking in binaries it might be best to avoid too much churn and rebase this on top of Atish's patches.

Alistair

Quoted 4 lines

Regards,
Bin