Skip to content

Commit bf6279b

Browse files
charlie-rivospalmer-dabbelt
authored andcommitted
dt-bindings: cpus: add a thead vlen register length property
Add a property analogous to the vlenb CSR so that software can detect the vector length of each CPU prior to it being brought online. Currently software has to assume that the vector length read from the boot CPU applies to all possible CPUs. On T-Head CPUs implementing pre-ratification vector, reading the th.vlenb CSR may produce an illegal instruction trap, so this property is required on such systems. Signed-off-by: Charlie Jenkins <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Tested-by: Yangyu Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent e576b7c commit bf6279b

File tree

1 file changed

+19
-0
lines changed
  • Documentation/devicetree/bindings/riscv

1 file changed

+19
-0
lines changed

Documentation/devicetree/bindings/riscv/cpus.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ description: |
2626
allOf:
2727
- $ref: /schemas/cpu.yaml#
2828
- $ref: extensions.yaml
29+
- if:
30+
not:
31+
properties:
32+
compatible:
33+
contains:
34+
enum:
35+
- thead,c906
36+
- thead,c910
37+
- thead,c920
38+
then:
39+
properties:
40+
thead,vlenb: false
2941

3042
properties:
3143
compatible:
@@ -95,6 +107,13 @@ properties:
95107
description:
96108
The blocksize in bytes for the Zicboz cache operations.
97109

110+
thead,vlenb:
111+
$ref: /schemas/types.yaml#/definitions/uint32
112+
description:
113+
VLEN/8, the vector register length in bytes. This property is required on
114+
thead systems where the vector register length is not identical on all harts, or
115+
the vlenb CSR is not available.
116+
98117
# RISC-V has multiple properties for cache op block sizes as the sizes
99118
# differ between individual CBO extensions
100119
cache-op-block-size: false

0 commit comments

Comments
 (0)