Skip to content

Add RISC-V Worlds ISA support to OpenSBI

Yu-Chien Peter Lin opensbi 6 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest9 patches 0 repliesNew
  2. v59 patches 16 repliesSuperseded
  3. v49 patches 5 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v39 patches20 repliesSuperseded
v29 patches26 repliesSuperseded
v1 RFC12 patches24 repliesSuperseded

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9lib: sbi_hart: add RISC-V Worlds ISA extensionsinclude/sbi/riscv_encoding.h include/sbi/sbi_hart.h lib/sbi/sbi_hart.c+27 -00 replies
2/9lib: utils: fdt_helper: parse RISC-V Worlds per-hart WID propertiesinclude/sbi/sbi_hart.h lib/utils/fdt/fdt_helper.c+67 -70 replies
3/9lib: fdt_domain: parse domain WID propertiesinclude/sbi/sbi_domain.h lib/sbi/sbi_domain.c lib/utils/fdt/fdt_domain.c+110 -00 replies
4/9lib: sbi_hart: lock mwid CSR for RoT immutabilitylib/sbi/sbi_hart.c+27 -00 replies
5/9lib: sbi_domain_context: propagate error from sbi_hart_protection_reconfigurelib/sbi/sbi_domain_context.c+4 -10 replies
6/9lib: sbi_hart_worlds: Implement WID hart protection backendinclude/sbi/sbi_hart_worlds.h lib/sbi/objects.mk lib/sbi/sbi_hart.c +1 more+204 -00 replies
7/9include: sbi_types: add PRIx64 format macroinclude/sbi/sbi_types.h+2 -00 replies
8/9lib: sbi: display World ID configuration at bootlib/sbi/sbi_domain.c lib/sbi/sbi_init.c+31 -00 replies
9/9docs: document WID DT propertiesdocs/domain_support.md+38 -00 replies

Reviews trailers per patch

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

PatchAnup PatelPawandeep Oza
1/9R-b R-b
2/9R-b R-b
3/9R-b R-b
4/9R-b
5/9R-b R-b
6/9R-b R-b
7/9R-b R-b
8/9R-b R-b
9/9R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/9] Add RISC-V Worlds ISA support to OpenSBI

This patch series adds support for the RISC-V Worlds ISA extensions in OpenSBI, introducing a WID-based hart protection backend to enforce hardware isolation boundaries across domains.

Trust Model and Boot-time Roles
-------------------------------

The implementation adheres to the two-phase M-mode trust model:

- RoT M-mode phase: An earlier boot stage (e.g., ROM or SPL) may program mwid and mlwidlist, locking mwid prior to handing off execution to OpenSBI.

- Regular M-mode phase (OpenSBI): OpenSBI treats the non-ISA platform constraints (pmwid, pmwidlist, pmlwidlist) and CSR states (mwid, mlwidlist) as immutable input policies from the hardware/RoT. It locks mwid if still unlocked, preventing subsequent M-mode software from altering its own WID, and programs per-domain mlwid and mwiddeleg based on device tree configuration.

Device Tree Bindings
--------------------

Per-hart properties defined in Linux kernel DT bindings v3 [1]:
- riscv,pmwid: M-mode World ID
- riscv,pmwidlist: M-mode permitted WID bitmap
- riscv,pmlwidlist: S-mode permitted WID bitmap

Per-domain properties (see docs/domain_support.md):
- wid: World ID assigned to this domain for S-mode
- widdeleg: WID delegation bitmap for this domain

[1] https://lore.kernel.org/all/[email protected]/

Base commit: 61f1973bd50338b36c52dc34006f76d464ca4f34

Yu-Chien Peter Lin (9):
lib: sbi_hart: add RISC-V Worlds ISA extensions
lib: utils: fdt_helper: parse RISC-V Worlds per-hart WID properties
lib: fdt_domain: parse domain WID properties
lib: sbi_hart: lock mwid CSR for RoT immutability
lib: sbi_domain_context: propagate error from
sbi_hart_protection_reconfigure
lib: sbi_hart_worlds: Implement WID hart protection backend
include: sbi_types: add PRIx64 format macro
lib: sbi: display World ID configuration at boot
docs: document WID DT properties

 docs/domain_support.md        |  38 ++++++++
 include/sbi/riscv_encoding.h  |  12 +++
 include/sbi/sbi_domain.h      |   6 ++
 include/sbi/sbi_hart.h        |  15 +++
 include/sbi/sbi_hart_worlds.h |  24 +++++
 include/sbi/sbi_types.h       |   2 +
 lib/sbi/objects.mk            |   1 +
 lib/sbi/sbi_domain.c          |  20 ++++
 lib/sbi/sbi_domain_context.c  |   5 +-
 lib/sbi/sbi_hart.c            |  37 ++++++++
 lib/sbi/sbi_hart_worlds.c     | 174 ++++++++++++++++++++++++++++++++++
 lib/sbi/sbi_init.c            |  13 +++
 lib/utils/fdt/fdt_domain.c    | 102 ++++++++++++++++++++
 lib/utils/fdt/fdt_helper.c    |  69 ++++++++++++--
 14 files changed, 510 insertions(+), 8 deletions(-)
 create mode 100644 include/sbi/sbi_hart_worlds.h
 create mode 100644 lib/sbi/sbi_hart_worlds.c
Signature · 7 lines
2.43.7


-- 
opensbi mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/opensbi