SMP support for RISC-V
Get series with b4
b4 am [email protected]Versions newest first
- v3 Latest0 of 11 patches 0 repliesNew
Patches in v3 No applies recorded yet
None of the 11 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [U-Boot] [PATCH v3 00/11] SMP support for RISC-V
Quoted 9 lines · Lukas Auer
This patch series adds SMP support for RISC-V to U-Boot. It allows U-Boot to run on multi-hart systems (hart is the RISC-V terminology for hardware thread). Images passed to bootm will be started on all harts. The bootm command is currently the only one that will boot images on all harts, bootefi is not yet supported.
The patches have been successfully tested on both QEMU (machine and supervisor mode) and the HiFive Unleashed board (supervisor mode), using BBL and OpenSBI.
Can you describe the test configuration and boot flow a little more, or post an SDcard image that boots with the switches as shown in the readme at [1]
I don't see any board-specific memory initialization code anywhere, so I assume you are still using the original SiFive FSBL, and not the u-boot version that includes the memory init code [2]
[1] https://github.com/sifive/freedom-u-sdk
[2] https://github.com/sifive/HiFive_U-Boot
Quoted 67 lines
Mainline QEMU requires two patches [1, 2] to run in this configuration. Patch [1] has been dropped and will be replaced with a U-Boot patch.
[1]: https://patchwork.ozlabs.org/patch/1039493/
[2]: https://patchwork.ozlabs.org/patch/1039082/Changes in v3:
- Print error ifriscv_send_ipi()fails
- Adjust error message for failures ofriscv_clear_ipi()to match error message for failures ofriscv_send_ipi()
- New patch to save the hart ID in register tp instead of s0
- Adjust patch to use the new location of the hart ID (register tp)
- New patch to hang if relocation of secondary harts failsChanges in v2:
- Remove unneeded quotes fromNR_CPUSKconfigentry
- Move memory barrier fromsend_ipi_many()tohandle_ipi()
- Add check insend_ipi_manyso that IPIs are only sent to available harts as indicated by theavailable_hartsmask
- Implement hart lottery to pick main hart to run U-Boot
- RemoveCONFIG_MAIN_HARTas it is not required anymore
- Register available harts in theavailable_hartsmask
- New patch to populate register a0 with the hart ID from the mhartid CSR in machine-mode
- New patch to enable SMP on the SiFive FU540, which was previously sent independentlyLukas Auer (11):
riscv: add infrastructure for calling functions on other harts
riscv: import the supervisor binary interface header file
riscv: implement IPI platform functions using SBI
riscv: delay initialization of caches and debug UART
riscv: save hart ID in register tp instead of s0
riscv: add support for multi-hart systems
riscv: boot images passed to bootm on all harts
riscv: do not rely on hart ID passed by previous boot stage
riscv: hang if relocation of secondary harts fails
riscv: fu540: enable SMP
riscv: qemu: enable SMParch/riscv/Kconfig | 28 +++++ arch/riscv/cpu/cpu.c | 9 +- arch/riscv/cpu/start.S | 167 +++++++++++++++++++++++++-- arch/riscv/include/asm/csr.h | 1 + arch/riscv/include/asm/global_data.h | 6 + arch/riscv/include/asm/sbi.h | 94 +++++++++++++++ arch/riscv/include/asm/smp.h | 53 +++++++++ arch/riscv/lib/Makefile | 2 + arch/riscv/lib/asm-offsets.c | 1 + arch/riscv/lib/bootm.c | 13 ++- arch/riscv/lib/sbi_ipi.c | 25 ++++ arch/riscv/lib/smp.c | 118 +++++++++++++++++++ board/emulation/qemu-riscv/Kconfig | 1 + board/sifive/fu540/Kconfig | 1 + 14 files changed, 507 insertions(+), 12 deletions(-) create mode 100644 arch/riscv/include/asm/sbi.h create mode 100644 arch/riscv/include/asm/smp.h create mode 100644 arch/riscv/lib/sbi_ipi.c create mode 100644 arch/riscv/lib/smp.cSignature · 6 lines
2.20.1 _______________________________________________ U-Boot mailing list U-Boot at lists.denx.de https://lists.denx.de/listinfo/u-boot