blob: 631b6584eefe2ea37e1c1e9fab5033fdabb13e34 [file] [log] [blame]
Olivier Deprezcbf7d5b2023-05-22 12:12:24 +02001FF-A manifest binding to device tree
2====================================
3
4This document defines the nodes and properties used to define a partition,
5according to the FF-A specification.
6
7.. contents::
8
9Partition Properties
10--------------------
11
12- compatible [mandatory]
13 - value type: <string>
14 - Must be the string "arm,ffa-manifest-X.Y" which specifies the major and
15 minor versions of the device tree binding for the FFA manifest represented
16 by this node. The minor number is incremented if the binding changes in a
17 backwards compatible manner.
18
19 - X is an integer representing the major version number of this document.
20 - Y is an integer representing the minor version number of this document.
21
22- ffa-version [mandatory]
23 - value type: <u32>
24 - Must be two 16 bits values (X, Y), concatenated as 31:16 -> X,
25 15:0 -> Y, where:
26
27 - X is the major version of FF-A expected by the partition at the FFA
28 instance it will execute.
29 - Y is the minor version of FF-A expected by the partition at the FFA
30 instance it will execute.
31
32- uuid [mandatory]
33 - value type: <prop-encoded-array>
34 - An array consisting of 4 <u32> values, identifying the UUID of the service
35 implemented by this partition. The UUID format is described in RFC 4122.
36
37- id
38 - value type: <u32>
39 - Pre-allocated partition ID.
40
41- auxiliary-id
42 - value type: <u32>
43 - Pre-allocated ID that could be used in memory management transactions.
44
45- description
46 - value type: <string>
47 - Name of the partition e.g. for debugging purposes.
48
49- execution-ctx-count [mandatory]
50 - value type: <u32>
51 - Number of vCPUs that a VM or SP wants to instantiate.
52
53 - In the absence of virtualization, this is the number of execution
54 contexts that a partition implements.
55 - If value of this field = 1 and number of PEs > 1 then the partition is
56 treated as UP & migrate capable.
57 - If the value of this field > 1 then the partition is treated as a MP
58 capable partition irrespective of the number of PEs.
59
60- exception-level [mandatory]
61 - value type: <u32>
62 - The target exception level for the partition:
63
64 - 0x0: EL1
65 - 0x1: S_EL0
66 - 0x2: S_EL1
67
68- execution-state [mandatory]
69 - value type: <u32>
70 - The target execution state of the partition:
71
72 - 0: AArch64
73 - 1: AArch32
74
75- load-address
76 - value type: <u64>
77 - Physical base address of the partition in memory. Absence of this field
78 indicates that the partition is position independent and can be loaded at
79 any address chosen at boot time.
80
81- entrypoint-offset
82 - value type: <u64>
83 - Offset from the base of the partition's binary image to the entry point of
84 the partition. Absence of this field indicates that the entry point is at
85 offset 0x0 from the base of the partition's binary.
86
87- xlat-granule [mandatory]
88 - value type: <u32>
89 - Translation granule used with the partition:
90
91 - 0x0: 4k
92 - 0x1: 16k
93 - 0x2: 64k
94
95- boot-order
96 - value type: <u16>
97 - A unique number amongst all partitions that specifies if this partition
98 must be booted before others. The partition with the smaller number will be
99 booted first.
100
101- rx-tx-buffer
102 - value type: "memory-regions" node
103 - Specific "memory-regions" nodes that describe the RX/TX buffers expected
104 by the partition.
105 The "compatible" must be the string "arm,ffa-manifest-rx_tx-buffer".
106
107- messaging-method [mandatory]
108 - value type: <u8>
109 - Specifies which messaging methods are supported by the partition, set bit
110 means the feature is supported, clear bit - not supported:
111
112 - Bit[0]: partition can receive direct requests if set
113 - Bit[1]: partition can send direct requests if set
114 - Bit[2]: partition can send and receive indirect messages
115
116- managed-exit
117 - value type: <empty>
118 - Specifies if managed exit is supported.
119 - This field is deprecated in favor of ns-interrupts-action field in the FF-A
120 v1.1 EAC0 spec.
121
122- ns-interrupts-action [mandatory]
123 - value type: <u32>
124 - Specifies the action that the SPMC must take in response to a Non-secure
125 physical interrupt.
126
127 - 0x0: Non-secure interrupt is queued
128 - 0x1: Non-secure interrupt is signaled after a managed exit
129 - 0x2: Non-secure interrupt is signaled
130
131 - This field supersedes the managed-exit field in the FF-A v1.0 spec.
132
133- other-s-interrupts-action
134 - value type: <u32>
135 - Specifies the action that the SPMC must take in response to a Other-Secure
136 physical interrupt.
137
138 - 0x0: Other-Secure interrupt is queued
139 - 0x1: Other-Secure interrupt is signaled
140
141- has-primary-scheduler
142 - value type: <empty>
143 - Presence of this field indicates that the partition implements the primary
144 scheduler. If so, run-time EL must be EL1.
145
146- time-slice-mem
147 - value type: <empty>
148 - Presence of this field indicates that the partition doesn't expect the
149 partition manager to time slice long running memory management functions.
150
151- gp-register-num
152 - value type: <u32>
153 - The field specifies the general purpose register number but not its width.
154 The width is derived from the partition's execution state, as specified in
155 the partition properties. For example, if the number value is 1 then the
156 general-purpose register used will be x1 in AArch64 state and w1 in AArch32
157 state.
158 Presence of this field indicates that the partition expects the address of
159 the FF-A boot information blob to be passed in the specified general purpose
160 register.
161
162- stream-endpoint-ids
163 - value type: <prop-encoded-array>
164 - List of <u32> tuples, identifying the IDs this partition is acting as
165 proxy for.
166
167- power-management-messages
168 - value type: <u32>
169 - Specifies which power management messages a partition subscribes to.
170 A set bit means the partition should be informed of the power event, clear
171 bit - should not be informed of event:
172
173 - Bit[0]: CPU_OFF
174 - Bit[1]: CPU_SUSPEND
175 - Bit[2]: CPU_SUSPEND_RESUME
176
177Memory Regions
178--------------
179
180- compatible [mandatory]
181 - value type: <string>
182 - Must be the string "arm,ffa-manifest-memory-regions".
183
184- description
185 - value type: <string>
186 - Name of the memory region e.g. for debugging purposes.
187
188- pages-count [mandatory]
189 - value type: <u32>
190 - Count of pages of memory region as a multiple of the translation granule
191 size
192
193- attributes [mandatory]
194 - value type: <u32>
195 - Mapping modes: ORed to get required permission
196
197 - 0x1: Read
198 - 0x2: Write
199 - 0x4: Execute
200 - 0x8: Security state
201
202- base-address
203 - value type: <u64>
204 - Base address of the region. The address must be aligned to the translation
205 granule size.
206 The address given may be a Physical Address (PA), Virtual Address (VA), or
207 Intermediate Physical Address (IPA). Refer to the FF-A specification for
208 more information on the restrictions around the address type.
209 If the base address is omitted then the partition manager must map a memory
210 region of the specified size into the partition's translation regime and
211 then communicate the region properties (including the base address chosen
212 by the partition manager) to the partition.
213
214Device Regions
215--------------
216
217- compatible [mandatory]
218 - value type: <string>
219 - Must be the string "arm,ffa-manifest-device-regions".
220
221- description
222 - value type: <string>
223 - Name of the device region e.g. for debugging purposes.
224
225- pages-count [mandatory]
226 - value type: <u32>
227 - Count of pages of memory region as a multiple of the translation granule
228 size
229
230- attributes [mandatory]
231 - value type: <u32>
232 - Mapping modes: ORed to get required permission
233
234 - 0x1: Read
235 - 0x2: Write
236 - 0x4: Execute
237 - 0x8: Security state
238
239- base-address [mandatory]
240 - value type: <u64>
241 - Base address of the region. The address must be aligned to the translation
242 granule size.
243 The address given may be a Physical Address (PA), Virtual Address (VA), or
244 Intermediate Physical Address (IPA). Refer to the FF-A specification for
245 more information on the restrictions around the address type.
246
247- smmu-id
248 - value type: <u32>
249 - On systems with multiple System Memory Management Units (SMMUs) this
250 identifier is used to inform the partition manager which SMMU the device is
251 upstream of. If the field is omitted then it is assumed that the device is
252 not upstream of any SMMU.
253
254- stream-ids
255 - value type: <prop-encoded-array>
256 - A list of (id, mem-manage) pair, where:
257
258 - id: A unique <u32> value amongst all devices assigned to the partition.
259
260- interrupts [mandatory]
261 - value type: <prop-encoded-array>
262 - A list of (id, attributes) pair describing the device interrupts, where:
263
264 - id: The <u32> interrupt IDs.
265 - attributes: A <u32> value, containing attributes for each interrupt ID:
266
267 +----------------------+----------+
268 |Field | Bit(s) |
269 +----------------------+----------+
270 | Priority | 7:0 |
271 +----------------------+----------+
272 | Security state | 8 |
273 +----------------------+----------+
274 | Config(Edge/Level) | 9 |
275 +----------------------+----------+
276 | Type(SPI/PPI/SGI) | 11:10 |
277 +----------------------+----------+
278
279 Security state:
280 - Secure: 1
281 - Non-secure: 0
282
283 Configuration:
284 - Edge triggered: 0
285 - Level triggered: 1
286
287 Type:
288 - SPI: 0b10
289 - PPI: 0b01
290 - SGI: 0b00
291
292- interrupts-target
293 - value type: <prop-encoded-array>
294 - A list of (id, mpdir upper bits, mpidr lower bits) tuples describing which
295 mpidr the interrupt is routed to, where:
296
297 - id: The <u32> interrupt ID. Must be one of those specified in the
298 "interrupts" field.
299 - mpidr upper bits: The <u32> describing the upper bits of the 64 bits
300 mpidr
301 - mpidr lower bits: The <u32> describing the lower bits of the 64 bits
302 mpidr
303
304- exclusive-access
305 - value type: <empty>
306 - Presence of this field implies that this endpoint must be granted exclusive
307 access and ownership of this device's MMIO region.
308
309--------------
310
311*Copyright (c) 2019-2023, Arm Limited and Contributors. All rights reserved.*