xref: /openbmc/linux/Documentation/devicetree/bindings/riscv/extensions.yaml (revision 2612e3bbc0386368a850140a6c9b990cd496a5ec)
1*aeb71e42SConor Dooley# SPDX-License-Identifier: (GPL-2.0 OR MIT)
2*aeb71e42SConor Dooley%YAML 1.2
3*aeb71e42SConor Dooley---
4*aeb71e42SConor Dooley$id: http://devicetree.org/schemas/riscv/extensions.yaml#
5*aeb71e42SConor Dooley$schema: http://devicetree.org/meta-schemas/core.yaml#
6*aeb71e42SConor Dooley
7*aeb71e42SConor Dooleytitle: RISC-V ISA extensions
8*aeb71e42SConor Dooley
9*aeb71e42SConor Dooleymaintainers:
10*aeb71e42SConor Dooley  - Paul Walmsley <paul.walmsley@sifive.com>
11*aeb71e42SConor Dooley  - Palmer Dabbelt <palmer@sifive.com>
12*aeb71e42SConor Dooley  - Conor Dooley <conor@kernel.org>
13*aeb71e42SConor Dooley
14*aeb71e42SConor Dooleydescription: |
15*aeb71e42SConor Dooley  RISC-V has a large number of extensions, some of which are "standard"
16*aeb71e42SConor Dooley  extensions, meaning they are ratified by RISC-V International, and others
17*aeb71e42SConor Dooley  are "vendor" extensions.
18*aeb71e42SConor Dooley  This document defines properties that indicate whether a hart supports a
19*aeb71e42SConor Dooley  given extension.
20*aeb71e42SConor Dooley
21*aeb71e42SConor Dooley  Once a standard extension has been ratified, no changes in behaviour can be
22*aeb71e42SConor Dooley  made without the creation of a new extension.
23*aeb71e42SConor Dooley  The properties for standard extensions therefore map to their originally
24*aeb71e42SConor Dooley  ratified states, with the exception of the I, Zicntr & Zihpm extensions.
25*aeb71e42SConor Dooley  See the "i" property for more information.
26*aeb71e42SConor Dooley
27*aeb71e42SConor Dooleyselect:
28*aeb71e42SConor Dooley  properties:
29*aeb71e42SConor Dooley    compatible:
30*aeb71e42SConor Dooley      contains:
31*aeb71e42SConor Dooley        const: riscv
32*aeb71e42SConor Dooley
33*aeb71e42SConor Dooleyproperties:
34*aeb71e42SConor Dooley  riscv,isa:
35*aeb71e42SConor Dooley    description:
36*aeb71e42SConor Dooley      Identifies the specific RISC-V instruction set architecture
37*aeb71e42SConor Dooley      supported by the hart.  These are documented in the RISC-V
38*aeb71e42SConor Dooley      User-Level ISA document, available from
39*aeb71e42SConor Dooley      https://riscv.org/specifications/
40*aeb71e42SConor Dooley
41*aeb71e42SConor Dooley      Due to revisions of the ISA specification, some deviations
42*aeb71e42SConor Dooley      have arisen over time.
43*aeb71e42SConor Dooley      Notably, riscv,isa was defined prior to the creation of the
44*aeb71e42SConor Dooley      Zicntr, Zicsr, Zifencei and Zihpm extensions and thus "i"
45*aeb71e42SConor Dooley      implies "zicntr_zicsr_zifencei_zihpm".
46*aeb71e42SConor Dooley
47*aeb71e42SConor Dooley      While the isa strings in ISA specification are case
48*aeb71e42SConor Dooley      insensitive, letters in the riscv,isa string must be all
49*aeb71e42SConor Dooley      lowercase.
50*aeb71e42SConor Dooley    $ref: /schemas/types.yaml#/definitions/string
51*aeb71e42SConor Dooley    pattern: ^rv(?:64|32)imaf?d?q?c?b?k?j?p?v?h?(?:[hsxz](?:[a-z])+)?(?:_[hsxz](?:[a-z])+)*$
52*aeb71e42SConor Dooley    deprecated: true
53*aeb71e42SConor Dooley
54*aeb71e42SConor Dooley  riscv,isa-base:
55*aeb71e42SConor Dooley    description:
56*aeb71e42SConor Dooley      The base ISA implemented by this hart, as described by the 20191213
57*aeb71e42SConor Dooley      version of the unprivileged ISA specification.
58*aeb71e42SConor Dooley    enum:
59*aeb71e42SConor Dooley      - rv32i
60*aeb71e42SConor Dooley      - rv64i
61*aeb71e42SConor Dooley
62*aeb71e42SConor Dooley  riscv,isa-extensions:
63*aeb71e42SConor Dooley    $ref: /schemas/types.yaml#/definitions/string-array
64*aeb71e42SConor Dooley    minItems: 1
65*aeb71e42SConor Dooley    description: Extensions supported by the hart.
66*aeb71e42SConor Dooley    items:
67*aeb71e42SConor Dooley      anyOf:
68*aeb71e42SConor Dooley        # single letter extensions, in canonical order
69*aeb71e42SConor Dooley        - const: i
70*aeb71e42SConor Dooley          description: |
71*aeb71e42SConor Dooley            The base integer instruction set, as ratified in the 20191213
72*aeb71e42SConor Dooley            version of the unprivileged ISA specification.
73*aeb71e42SConor Dooley
74*aeb71e42SConor Dooley            This does not include Chapter 10, "Counters", which was moved into
75*aeb71e42SConor Dooley            the Zicntr and Zihpm extensions after the ratification of the
76*aeb71e42SConor Dooley            20191213 version of the unprivileged specification.
77*aeb71e42SConor Dooley
78*aeb71e42SConor Dooley        - const: m
79*aeb71e42SConor Dooley          description:
80*aeb71e42SConor Dooley            The standard M extension for integer multiplication and division, as
81*aeb71e42SConor Dooley            ratified in the 20191213 version of the unprivileged ISA
82*aeb71e42SConor Dooley            specification.
83*aeb71e42SConor Dooley
84*aeb71e42SConor Dooley        - const: a
85*aeb71e42SConor Dooley          description:
86*aeb71e42SConor Dooley            The standard A extension for atomic instructions, as ratified in the
87*aeb71e42SConor Dooley            20191213 version of the unprivileged ISA specification.
88*aeb71e42SConor Dooley
89*aeb71e42SConor Dooley        - const: f
90*aeb71e42SConor Dooley          description:
91*aeb71e42SConor Dooley            The standard F extension for single-precision floating point, as
92*aeb71e42SConor Dooley            ratified in the 20191213 version of the unprivileged ISA
93*aeb71e42SConor Dooley            specification.
94*aeb71e42SConor Dooley
95*aeb71e42SConor Dooley        - const: d
96*aeb71e42SConor Dooley          description:
97*aeb71e42SConor Dooley            The standard D extension for double-precision floating-point, as
98*aeb71e42SConor Dooley            ratified in the 20191213 version of the unprivileged ISA
99*aeb71e42SConor Dooley            specification.
100*aeb71e42SConor Dooley
101*aeb71e42SConor Dooley        - const: q
102*aeb71e42SConor Dooley          description:
103*aeb71e42SConor Dooley            The standard Q extension for quad-precision floating-point, as
104*aeb71e42SConor Dooley            ratified in the 20191213 version of the unprivileged ISA
105*aeb71e42SConor Dooley            specification.
106*aeb71e42SConor Dooley
107*aeb71e42SConor Dooley        - const: c
108*aeb71e42SConor Dooley          description:
109*aeb71e42SConor Dooley            The standard C extension for compressed instructions, as ratified in
110*aeb71e42SConor Dooley            the 20191213 version of the unprivileged ISA specification.
111*aeb71e42SConor Dooley
112*aeb71e42SConor Dooley        - const: v
113*aeb71e42SConor Dooley          description:
114*aeb71e42SConor Dooley            The standard V extension for vector operations, as ratified
115*aeb71e42SConor Dooley            in-and-around commit 7a6c8ae ("Fix text that describes vfmv.v.f
116*aeb71e42SConor Dooley            encoding") of the riscv-v-spec.
117*aeb71e42SConor Dooley
118*aeb71e42SConor Dooley        - const: h
119*aeb71e42SConor Dooley          description:
120*aeb71e42SConor Dooley            The standard H extension for hypervisors as ratified in the 20191213
121*aeb71e42SConor Dooley            version of the privileged ISA specification.
122*aeb71e42SConor Dooley
123*aeb71e42SConor Dooley        # multi-letter extensions, sorted alphanumerically
124*aeb71e42SConor Dooley        - const: smaia
125*aeb71e42SConor Dooley          description: |
126*aeb71e42SConor Dooley            The standard Smaia supervisor-level extension for the advanced
127*aeb71e42SConor Dooley            interrupt architecture for machine-mode-visible csr and behavioural
128*aeb71e42SConor Dooley            changes to interrupts as frozen at commit ccbddab ("Merge pull
129*aeb71e42SConor Dooley            request #42 from riscv/jhauser-2023-RC4") of riscv-aia.
130*aeb71e42SConor Dooley
131*aeb71e42SConor Dooley        - const: ssaia
132*aeb71e42SConor Dooley          description: |
133*aeb71e42SConor Dooley            The standard Ssaia supervisor-level extension for the advanced
134*aeb71e42SConor Dooley            interrupt architecture for supervisor-mode-visible csr and
135*aeb71e42SConor Dooley            behavioural changes to interrupts as frozen at commit ccbddab
136*aeb71e42SConor Dooley            ("Merge pull request #42 from riscv/jhauser-2023-RC4") of riscv-aia.
137*aeb71e42SConor Dooley
138*aeb71e42SConor Dooley        - const: sscofpmf
139*aeb71e42SConor Dooley          description: |
140*aeb71e42SConor Dooley            The standard Sscofpmf supervisor-level extension for count overflow
141*aeb71e42SConor Dooley            and mode-based filtering as ratified at commit 01d1df0 ("Add ability
142*aeb71e42SConor Dooley            to manually trigger workflow. (#2)") of riscv-count-overflow.
143*aeb71e42SConor Dooley
144*aeb71e42SConor Dooley        - const: sstc
145*aeb71e42SConor Dooley          description: |
146*aeb71e42SConor Dooley            The standard Sstc supervisor-level extension for time compare as
147*aeb71e42SConor Dooley            ratified at commit 3f9ed34 ("Add ability to manually trigger
148*aeb71e42SConor Dooley            workflow. (#2)") of riscv-time-compare.
149*aeb71e42SConor Dooley
150*aeb71e42SConor Dooley        - const: svinval
151*aeb71e42SConor Dooley          description:
152*aeb71e42SConor Dooley            The standard Svinval supervisor-level extension for fine-grained
153*aeb71e42SConor Dooley            address-translation cache invalidation as ratified in the 20191213
154*aeb71e42SConor Dooley            version of the privileged ISA specification.
155*aeb71e42SConor Dooley
156*aeb71e42SConor Dooley        - const: svnapot
157*aeb71e42SConor Dooley          description:
158*aeb71e42SConor Dooley            The standard Svnapot supervisor-level extensions for napot
159*aeb71e42SConor Dooley            translation contiguity as ratified in the 20191213 version of the
160*aeb71e42SConor Dooley            privileged ISA specification.
161*aeb71e42SConor Dooley
162*aeb71e42SConor Dooley        - const: svpbmt
163*aeb71e42SConor Dooley          description:
164*aeb71e42SConor Dooley            The standard Svpbmt supervisor-level extensions for page-based
165*aeb71e42SConor Dooley            memory types as ratified in the 20191213 version of the privileged
166*aeb71e42SConor Dooley            ISA specification.
167*aeb71e42SConor Dooley
168*aeb71e42SConor Dooley        - const: zba
169*aeb71e42SConor Dooley          description: |
170*aeb71e42SConor Dooley            The standard Zba bit-manipulation extension for address generation
171*aeb71e42SConor Dooley            acceleration instructions as ratified at commit 6d33919 ("Merge pull
172*aeb71e42SConor Dooley            request #158 from hirooih/clmul-fix-loop-end-condition") of
173*aeb71e42SConor Dooley            riscv-bitmanip.
174*aeb71e42SConor Dooley
175*aeb71e42SConor Dooley        - const: zbb
176*aeb71e42SConor Dooley          description: |
177*aeb71e42SConor Dooley            The standard Zbb bit-manipulation extension for basic bit-manipulation
178*aeb71e42SConor Dooley            as ratified at commit 6d33919 ("Merge pull request #158 from
179*aeb71e42SConor Dooley            hirooih/clmul-fix-loop-end-condition") of riscv-bitmanip.
180*aeb71e42SConor Dooley
181*aeb71e42SConor Dooley        - const: zbc
182*aeb71e42SConor Dooley          description: |
183*aeb71e42SConor Dooley            The standard Zbc bit-manipulation extension for carry-less
184*aeb71e42SConor Dooley            multiplication as ratified at commit 6d33919 ("Merge pull request
185*aeb71e42SConor Dooley            #158 from hirooih/clmul-fix-loop-end-condition") of riscv-bitmanip.
186*aeb71e42SConor Dooley
187*aeb71e42SConor Dooley        - const: zbs
188*aeb71e42SConor Dooley          description: |
189*aeb71e42SConor Dooley            The standard Zbs bit-manipulation extension for single-bit
190*aeb71e42SConor Dooley            instructions as ratified at commit 6d33919 ("Merge pull request #158
191*aeb71e42SConor Dooley            from hirooih/clmul-fix-loop-end-condition") of riscv-bitmanip.
192*aeb71e42SConor Dooley
193*aeb71e42SConor Dooley        - const: zicbom
194*aeb71e42SConor Dooley          description:
195*aeb71e42SConor Dooley            The standard Zicbom extension for base cache management operations as
196*aeb71e42SConor Dooley            ratified in commit 3dd606f ("Create cmobase-v1.0.pdf") of riscv-CMOs.
197*aeb71e42SConor Dooley
198*aeb71e42SConor Dooley        - const: zicbop
199*aeb71e42SConor Dooley          description:
200*aeb71e42SConor Dooley            The standard Zicbop extension for cache-block prefetch instructions
201*aeb71e42SConor Dooley            as ratified in commit 3dd606f ("Create cmobase-v1.0.pdf") of
202*aeb71e42SConor Dooley            riscv-CMOs.
203*aeb71e42SConor Dooley
204*aeb71e42SConor Dooley        - const: zicboz
205*aeb71e42SConor Dooley          description:
206*aeb71e42SConor Dooley            The standard Zicboz extension for cache-block zeroing as ratified
207*aeb71e42SConor Dooley            in commit 3dd606f ("Create cmobase-v1.0.pdf") of riscv-CMOs.
208*aeb71e42SConor Dooley
209*aeb71e42SConor Dooley        - const: zicntr
210*aeb71e42SConor Dooley          description:
211*aeb71e42SConor Dooley            The standard Zicntr extension for base counters and timers, as
212*aeb71e42SConor Dooley            ratified in the 20191213 version of the unprivileged ISA
213*aeb71e42SConor Dooley            specification.
214*aeb71e42SConor Dooley
215*aeb71e42SConor Dooley        - const: zicsr
216*aeb71e42SConor Dooley          description: |
217*aeb71e42SConor Dooley            The standard Zicsr extension for control and status register
218*aeb71e42SConor Dooley            instructions, as ratified in the 20191213 version of the
219*aeb71e42SConor Dooley            unprivileged ISA specification.
220*aeb71e42SConor Dooley
221*aeb71e42SConor Dooley            This does not include Chapter 10, "Counters", which documents
222*aeb71e42SConor Dooley            special case read-only CSRs, that were moved into the Zicntr and
223*aeb71e42SConor Dooley            Zihpm extensions after the ratification of the 20191213 version of
224*aeb71e42SConor Dooley            the unprivileged specification.
225*aeb71e42SConor Dooley
226*aeb71e42SConor Dooley        - const: zifencei
227*aeb71e42SConor Dooley          description:
228*aeb71e42SConor Dooley            The standard Zifencei extension for instruction-fetch fence, as
229*aeb71e42SConor Dooley            ratified in the 20191213 version of the unprivileged ISA
230*aeb71e42SConor Dooley            specification.
231*aeb71e42SConor Dooley
232*aeb71e42SConor Dooley        - const: zihintpause
233*aeb71e42SConor Dooley          description:
234*aeb71e42SConor Dooley            The standard Zihintpause extension for pause hints, as ratified in
235*aeb71e42SConor Dooley            commit d8ab5c7 ("Zihintpause is ratified") of the riscv-isa-manual.
236*aeb71e42SConor Dooley
237*aeb71e42SConor Dooley        - const: zihpm
238*aeb71e42SConor Dooley          description:
239*aeb71e42SConor Dooley            The standard Zihpm extension for hardware performance counters, as
240*aeb71e42SConor Dooley            ratified in the 20191213 version of the unprivileged ISA
241*aeb71e42SConor Dooley            specification.
242*aeb71e42SConor Dooley
243*aeb71e42SConor Dooley        - const: ztso
244*aeb71e42SConor Dooley          description:
245*aeb71e42SConor Dooley            The standard Ztso extension for total store ordering, as ratified
246*aeb71e42SConor Dooley            in commit 2e5236 ("Ztso is now ratified.") of the
247*aeb71e42SConor Dooley            riscv-isa-manual.
248*aeb71e42SConor Dooley
249*aeb71e42SConor DooleyadditionalProperties: true
250*aeb71e42SConor Dooley...
251