[RFC PATCH 12/12] docs: add RISC-V Worlds next-wid/next-widlist DT properties
Yu-Chien Peter Lin <[email protected]> Fri, 26 Jun 2026 18:14:33 +0800
| Newsgroups | org.infradead.lists.opensbi |
|---|---|
| Message-ID | <[email protected]> |
Add device tree bindings for RISC-V Worlds support in OpenSBI domains. These properties enable per-domain world isolation. Per-domain properties: * next-wid - Sets mlwid CSR (requires Smlwid extension) * next-widlist - Sets mwiddeleg CSR (requires Smwiddeleg extension) ROOT domain properties (in /chosen/opensbi-config): * root-domain-next-wid - mlwid for ROOT domain * root-domain-next-widlist - mwiddeleg for ROOT domain Signed-off-by: Yu-Chien Peter Lin <[email protected]> --- docs/domain_support.md | 13 +++++++++++++ docs/opensbi_config.md | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/docs/domain_support.md b/docs/domain_support.md index e267a9f7..164d87e6 100644 --- a/docs/domain_support.md +++ b/docs/domain_support.md @@ -91,6 +91,8 @@ following manner: is the next arg1 for the ROOT domain * **next_mode** - Next booting stage mode in coldboot HART scratch space is the next mode for the ROOT domain +* **next_wid** - Next booting stage World ID +* **next_widlist** - Next booting stage World ID delegation bitmask * **system_reset_allowed** - The ROOT domain is allowed to reset the system * **system_suspend_allowed** - The ROOT domain is allowed to suspend the system @@ -200,6 +202,17 @@ The DT properties of a domain instance DT node are as follows: is used as default value. If this DT property is not available and coldboot HART is assigned to the domain instance then **next booting stage mode of coldboot HART** is used as default value. +* **next-wid** (Optional) - The 32 bit World ID for lower-privilege modes + (S/U-mode) for the domain instance. If present, OpenSBI writes this value + to **mlwid** on context switch into this domain (requires Smlwid extension). + If absent, OpenSBI uses the platform M-mode WID from the **riscv,pmwid** DT + property as fallback, in which case the value must be identical across all + HARTs assigned to the domain. In either case, the value written to **mlwid** + must be permitted by **pmlwidlist** on every HART assigned to the domain. +* **next-widlist** (Optional) - The 64 bit World ID delegation bitmask for + the domain instance. If present, OpenSBI writes this value to **mwiddeleg** + on context switch into this domain (requires Smwiddeleg extension). If absent, + clears **mwiddeleg** to disable S-mode WID delegation. * **system-reset-allowed** (Optional) - A boolean flag representing whether the domain instance is allowed to do system reset. * **system-suspend-allowed** (Optional) - A boolean flag representing diff --git a/docs/opensbi_config.md b/docs/opensbi_config.md index 104d82c9..b7210dfc 100644 --- a/docs/opensbi_config.md +++ b/docs/opensbi_config.md @@ -29,6 +29,19 @@ The DT properties of a domain configuration DT node are as follows: * **system-suspend-test** (Optional) - When present, enable a system suspend test implementation which simply waits five seconds and issues a WFI. +* **root-domain-next-wid** (Optional) - The 32 bit World ID for lower-privilege + modes (S/U-mode) for the ROOT domain. If present, OpenSBI writes this value + to **mlwid** when entering the ROOT domain (requires Smlwid extension). If not + set, OpenSBI uses the platform M-mode WID from the **riscv,pmwid** DT property + as fallback, in which case the value must be identical across all HARTs assigned + to the ROOT domain. In either case, the value written to **mlwid** must be + permitted by **pmlwidlist** on every HART assigned to the ROOT domain. + +* **root-domain-next-widlist** (Optional) - The 64 bit World ID delegation bitmask + for the ROOT domain. If present, OpenSBI writes this value to **mwiddeleg** when + entering the ROOT domain (requires Smwiddeleg extension). If not set, clears + **mwiddeleg** to disable S-mode WID delegation. + The OpenSBI Configuration Node will be deleted at the end of cold boot (replace the node (subtree) with nop tags). -- 2.43.7 -- opensbi mailing list [email protected] http://lists.infradead.org/mailman/listinfo/opensbi