Skip to content

riscv: OpenSBI boot test and cleanups

Daniel Henrique Barboza qemu-devel qemu-riscv 5 versions – Applied

Status from this message: Applied to riscv-to-apply.next

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest11 patches 21 repliesApplied
  2. v411 patches 8 repliesSuperseded
  3. v310 patches 7 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v210 patches4 repliesSuperseded
v115 patches40 repliesSuperseded

Changes in v5 from the cover letter

- patch 9:
- added a 'load_init' flag in riscv_load_kernel() to control whether the function should execute riscv_load_initrd() or not
v4 link: https://lists.gnu.org/archive/html/qemu-devel/2022-12/msg04652.html

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/11tests/avocado: add RISC-V OpenSBI boot testtests/avocado/riscv_opensbi.py+65 -01 reply
2/11hw/riscv/spike: use 'fdt' from MachineStatehw/riscv/spike.c include/hw/riscv/spike.h+5 -90 replies
3/11hw/riscv/sifive_u: use 'fdt' from MachineStatehw/riscv/sifive_u.c include/hw/riscv/sifive_u.h+6 -120 replies
4/11hw/riscv/boot.c: exit early if filename is NULL in load functionshw/riscv/boot.c+6 -02 replies
5/11hw/riscv/spike.c: load initrd right after riscv_load_kernel()hw/riscv/spike.c+15 -160 replies
6/11hw/riscv: write initrd 'chosen' FDT inside riscv_load_initrd()hw/riscv/boot.c hw/riscv/microchip_pfsoc.c hw/riscv/sifive_u.c +3 more+22 -401 reply
7/11hw/riscv: write bootargs 'chosen' FDT after riscv_load_kernel()hw/riscv/sifive_u.c hw/riscv/spike.c hw/riscv/virt.c+15 -161 reply
8/11hw/riscv/boot.c: use MachineState in riscv_load_initrd()hw/riscv/boot.c hw/riscv/microchip_pfsoc.c hw/riscv/sifive_u.c +3 more+9 -121 reply
9/11hw/riscv/boot.c: use MachineState in riscv_load_kernel()hw/riscv/boot.c hw/riscv/microchip_pfsoc.c hw/riscv/opentitan.c +5 more+9 -141 reply
10/11hw/riscv/boot.c: consolidate all kernel init in riscv_load_kernel()hw/riscv/boot.c hw/riscv/microchip_pfsoc.c hw/riscv/opentitan.c +5 more+30 -4512 replies
11/11hw/riscv/boot.c: make riscv_load_initrd() statichw/riscv/boot.c include/hw/riscv/boot.h+40 -411 reply

Reviews trailers per patch

All 11 patches have a Reviewed-by or Acked-by.

PatchBin MengPhilippe Mathieu-DaudéAlistair Francis
1/11R-b T-b R-b A-b
2/11R-b R-b R-b
3/11R-b R-b R-b
4/11R-b R-b R-b
5/11R-b R-b R-b
6/11R-b R-b R-b
7/11R-b R-b R-b
8/11R-b R-b R-b
9/11R-b R-b R-b
10/11R-b R-b
11/11R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [PATCH v5 00/11] riscv: OpenSBI boot test and cleanups

Hi,

This new version is still rebased on top of [1]:

"[PATCH v2 00/12] hw/riscv: Improve Spike HTIF emulation fidelity"

from Bin Meng.

The change from v4 is on patch 9 where we added an extra flag in riscv_load_kernel() to allow for boards that don't load initrd (e.g. opentitan and sifive_e) to opt out from loading it altogether.

* Patch without reviews: 9

Changes from v4:
- patch 9:
- added a 'load_init' flag in riscv_load_kernel() to control whether the function should execute riscv_load_initrd() or not
v4 link: https://lists.gnu.org/archive/html/qemu-devel/2022-12/msg04652.html

Changes from v3:
- patch 1:
- fixed more instances of 'opensbi' and 'Opensbi' to 'OpenSBI'
- changed tests order
- patch 4 (new):
- added a g_assert(filename) guard in riscv_load_initrd() and riscv_load_kernel()
v3 link: https://mail.gnu.org/archive/html/qemu-devel/2022-12/msg04491.html

Changes from v2:
- patch 1:
- reduced code repetition with a boot_opensbi() helper
- renamed 'opensbi' to 'OpenSBI' in the file header
- patch 9:
- renamed riscv_load_kernel() to riscv_load_kernel_and_initrd()
v2 link: https://mail.gnu.org/archive/html/qemu-devel/2022-12/msg04466.html

Changes from v1:
- patches were rebased with [1]
- patches 13-15: removed
* will be re-sent in a follow-up series
- patches 4-5: removed since they're picked by Bin in [1]
- patch 1:
- added a 'skip' riscv32 spike test
v1 link: https://mail.gnu.org/archive/html/qemu-devel/2022-12/msg03860.html

Based-on: <[email protected]>

Cc Alistair Francis <[email protected]>
Cc Bin Meng <[email protected]>

[1] https://patchwork.ozlabs.org/project/qemu-devel/list/?series=334352

Daniel Henrique Barboza (11):
tests/avocado: add RISC-V OpenSBI boot test hw/riscv/spike: use 'fdt' from MachineState hw/riscv/sifive_u: use 'fdt' from MachineState hw/riscv/boot.c: exit early if filename is NULL in load functions hw/riscv/spike.c: load initrd right after riscv_load_kernel() hw/riscv: write initrd 'chosen' FDT inside riscv_load_initrd() hw/riscv: write bootargs 'chosen' FDT after riscv_load_kernel() hw/riscv/boot.c: use MachineState in riscv_load_initrd() hw/riscv/boot.c: use MachineState in riscv_load_kernel() hw/riscv/boot.c: consolidate all kernel init in riscv_load_kernel() hw/riscv/boot.c: make riscv_load_initrd() static

 hw/riscv/boot.c                | 91 +++++++++++++++++++++++-----------
 hw/riscv/microchip_pfsoc.c     | 20 +-------
 hw/riscv/opentitan.c           |  3 +-
 hw/riscv/sifive_e.c            |  4 +-
 hw/riscv/sifive_u.c            | 32 +++---------
 hw/riscv/spike.c               | 37 ++++----------
 hw/riscv/virt.c                | 21 +-------
 include/hw/riscv/boot.h        |  5 +-
 include/hw/riscv/sifive_u.h    |  3 --
 include/hw/riscv/spike.h       |  2 -
 tests/avocado/riscv_opensbi.py | 65 ++++++++++++++++++++++++
 11 files changed, 150 insertions(+), 133 deletions(-)
 create mode 100644 tests/avocado/riscv_opensbi.py
Signature · 1 line
2.39.0