[PATCH v4 10/21] dt-bindings: riscv: add Counter delegation ISA extensions description

From: Atish Patra
Date: Thu Feb 06 2025 - 02:28:59 EST


Add description for the Smcdeleg/Ssccfg extension.

Signed-off-by: Atish Patra <atishp@xxxxxxxxxxxx>
---
.../devicetree/bindings/riscv/extensions.yaml | 45 ++++++++++++++++++++++
1 file changed, 45 insertions(+)

diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml b/Documentation/devicetree/bindings/riscv/extensions.yaml
index be9ebe927a64..b20dc75457d2 100644
--- a/Documentation/devicetree/bindings/riscv/extensions.yaml
+++ b/Documentation/devicetree/bindings/riscv/extensions.yaml
@@ -128,6 +128,13 @@ properties:
changes to interrupts as frozen at commit ccbddab ("Merge pull
request #42 from riscv/jhauser-2023-RC4") of riscv-aia.

+ - const: smcdeleg
+ description: |
+ The standard Smcdeleg supervisor-level extension for the machine mode
+ to delegate the hpmcounters to supvervisor mode so that they are
+ directlyi accessible in the supervisor mode as ratified in the
+ 20240213 version of the privileged ISA specification.
+
- const: smcsrind
description: |
The standard Smcsrind supervisor-level extension extends the
@@ -175,6 +182,14 @@ properties:
behavioural changes to interrupts as frozen at commit ccbddab
("Merge pull request #42 from riscv/jhauser-2023-RC4") of riscv-aia.

+ - const: ssccfg
+ description: |
+ The standard Ssccfg supervisor-level extension for configuring
+ the delegated hpmcounters to be accessible directly in supervisor
+ mode as ratified in the 20240213 version of the privileged ISA
+ specification. This extension depends on Sscsrind, Smcdeleg, Zihpm,
+ Zicntr extensions.
+
- const: sscofpmf
description: |
The standard Sscofpmf supervisor-level extension for count overflow
@@ -685,6 +700,36 @@ properties:
then:
contains:
const: zca
+ # Smcdeleg depends on Sscsrind, Zihpm, Zicntr
+ - If:
+ contains:
+ const: smcdeleg
+ then:
+ allOf:
+ - contains:
+ const: sscsrind
+ - contains:
+ const: zihpm
+ - contains:
+ const: zicntr
+ # Ssccfg depends on Smcdeleg, Sscsrind, Zihpm, Zicntr, Sscofpmf, Smcntrpmf
+ - If:
+ contains:
+ const: ssccfg
+ then:
+ allOf:
+ - contains:
+ const: smcdeleg
+ - contains:
+ const: sscsrind
+ - contains:
+ const: sscofpmf
+ - contains:
+ const: smcntrpmf
+ - contains:
+ const: zihpm
+ - contains:
+ const: zicntr

allOf:
# Zcf extension does not exist on rv64

--
2.43.0