xref: /rk3399_ARM-atf/docs/components/ffa-manifest-binding.rst (revision 1b17f4f1f8af0ce7f1bbcef94a9ef546330c0b34)
1*1b17f4f1SOlivier DeprezFF-A manifest binding to device tree
2*1b17f4f1SOlivier Deprez========================================
3*1b17f4f1SOlivier Deprez
4*1b17f4f1SOlivier DeprezThis document defines the nodes and properties used to define a partition,
5*1b17f4f1SOlivier Deprezaccording to the FF-A specification.
6*1b17f4f1SOlivier Deprez
7*1b17f4f1SOlivier DeprezVersion 1.0
8*1b17f4f1SOlivier Deprez-----------
9*1b17f4f1SOlivier Deprez
10*1b17f4f1SOlivier DeprezPartition Properties
11*1b17f4f1SOlivier Deprez^^^^^^^^^^^^^^^^^^^^
12*1b17f4f1SOlivier Deprez
13*1b17f4f1SOlivier Deprez- compatible [mandatory]
14*1b17f4f1SOlivier Deprez   - value type: <string>
15*1b17f4f1SOlivier Deprez   - Must be the string "arm,ffa-manifest-X.Y" which specifies the major and
16*1b17f4f1SOlivier Deprez     minor versions of the device tree binding for the FFA manifest represented
17*1b17f4f1SOlivier Deprez     by this node. The minor number is incremented if the binding changes in a
18*1b17f4f1SOlivier Deprez     backwards compatible manner.
19*1b17f4f1SOlivier Deprez
20*1b17f4f1SOlivier Deprez      - X is an integer representing the major version number of this document.
21*1b17f4f1SOlivier Deprez      - Y is an integer representing the minor version number of this document.
22*1b17f4f1SOlivier Deprez
23*1b17f4f1SOlivier Deprez- ffa-version [mandatory]
24*1b17f4f1SOlivier Deprez   - value type: <u32>
25*1b17f4f1SOlivier Deprez   - Must be two 16 bits values (X, Y), concatenated as 31:16 -> X,
26*1b17f4f1SOlivier Deprez     15:0 -> Y, where:
27*1b17f4f1SOlivier Deprez
28*1b17f4f1SOlivier Deprez      - X is the major version of FF-A expected by the partition at the FFA
29*1b17f4f1SOlivier Deprez        instance it will execute.
30*1b17f4f1SOlivier Deprez      - Y is the minor version of FF-A expected by the partition at the FFA
31*1b17f4f1SOlivier Deprez        instance it will execute.
32*1b17f4f1SOlivier Deprez
33*1b17f4f1SOlivier Deprez- uuid [mandatory]
34*1b17f4f1SOlivier Deprez   - value type: <prop-encoded-array>
35*1b17f4f1SOlivier Deprez   - An array consisting of 4 <u32> values, identifying the UUID of the service
36*1b17f4f1SOlivier Deprez     implemented by this partition. The UUID format is described in RFC 4122.
37*1b17f4f1SOlivier Deprez
38*1b17f4f1SOlivier Deprez- id
39*1b17f4f1SOlivier Deprez   - value type: <u32>
40*1b17f4f1SOlivier Deprez   - Pre-allocated partition ID.
41*1b17f4f1SOlivier Deprez
42*1b17f4f1SOlivier Deprez- auxiliary-id
43*1b17f4f1SOlivier Deprez   - value type: <u32>
44*1b17f4f1SOlivier Deprez   - Pre-allocated ID that could be used in memory management transactions.
45*1b17f4f1SOlivier Deprez
46*1b17f4f1SOlivier Deprez- description
47*1b17f4f1SOlivier Deprez   - value type: <string>
48*1b17f4f1SOlivier Deprez   - Name of the partition e.g. for debugging purposes.
49*1b17f4f1SOlivier Deprez
50*1b17f4f1SOlivier Deprez- execution-ctx-count [mandatory]
51*1b17f4f1SOlivier Deprez   - value type: <u32>
52*1b17f4f1SOlivier Deprez   - Number of vCPUs that a VM or SP wants to instantiate.
53*1b17f4f1SOlivier Deprez
54*1b17f4f1SOlivier Deprez      - In the absence of virtualization, this is the number of execution
55*1b17f4f1SOlivier Deprez        contexts that a partition implements.
56*1b17f4f1SOlivier Deprez      - If value of this field = 1 and number of PEs > 1 then the partition is
57*1b17f4f1SOlivier Deprez        treated as UP & migrate capable.
58*1b17f4f1SOlivier Deprez      - If the value of this field > 1 then the partition is treated as a MP
59*1b17f4f1SOlivier Deprez        capable partition irrespective of the number of PEs.
60*1b17f4f1SOlivier Deprez
61*1b17f4f1SOlivier Deprez- exception-level [mandatory]
62*1b17f4f1SOlivier Deprez   - value type: <u32>
63*1b17f4f1SOlivier Deprez   - The target exception level for the partition:
64*1b17f4f1SOlivier Deprez
65*1b17f4f1SOlivier Deprez      - 0x0: EL1
66*1b17f4f1SOlivier Deprez      - 0x1: S_EL0
67*1b17f4f1SOlivier Deprez      - 0x2: S_EL1
68*1b17f4f1SOlivier Deprez
69*1b17f4f1SOlivier Deprez- execution-state [mandatory]
70*1b17f4f1SOlivier Deprez   - value type: <u32>
71*1b17f4f1SOlivier Deprez   - The target execution state of the partition:
72*1b17f4f1SOlivier Deprez
73*1b17f4f1SOlivier Deprez      - 0: AArch64
74*1b17f4f1SOlivier Deprez      - 1: AArch32
75*1b17f4f1SOlivier Deprez
76*1b17f4f1SOlivier Deprez- load-address
77*1b17f4f1SOlivier Deprez   - value type: <u64>
78*1b17f4f1SOlivier Deprez   - Physical base address of the partition in memory. Absence of this field
79*1b17f4f1SOlivier Deprez     indicates that the partition is position independent and can be loaded at
80*1b17f4f1SOlivier Deprez     any address chosen at boot time.
81*1b17f4f1SOlivier Deprez
82*1b17f4f1SOlivier Deprez- entrypoint-offset
83*1b17f4f1SOlivier Deprez   - value type: <u64>
84*1b17f4f1SOlivier Deprez   - Offset from the base of the partition's binary image to the entry point of
85*1b17f4f1SOlivier Deprez     the partition. Absence of this field indicates that the entry point is at
86*1b17f4f1SOlivier Deprez     offset 0x0 from the base of the partition's binary.
87*1b17f4f1SOlivier Deprez
88*1b17f4f1SOlivier Deprez- xlat-granule [mandatory]
89*1b17f4f1SOlivier Deprez   - value type: <u32>
90*1b17f4f1SOlivier Deprez   - Translation granule used with the partition:
91*1b17f4f1SOlivier Deprez
92*1b17f4f1SOlivier Deprez      - 0x0: 4k
93*1b17f4f1SOlivier Deprez      - 0x1: 16k
94*1b17f4f1SOlivier Deprez      - 0x2: 64k
95*1b17f4f1SOlivier Deprez
96*1b17f4f1SOlivier Deprez- boot-order
97*1b17f4f1SOlivier Deprez   - value type: <u32>
98*1b17f4f1SOlivier Deprez   - A unique number amongst all partitions that specifies if this partition
99*1b17f4f1SOlivier Deprez     must be booted before others. The partition with the smaller number will be
100*1b17f4f1SOlivier Deprez     booted first.
101*1b17f4f1SOlivier Deprez
102*1b17f4f1SOlivier Deprez- rx-tx-buffer
103*1b17f4f1SOlivier Deprez   - value type: "memory-regions" node
104*1b17f4f1SOlivier Deprez   - Specific "memory-regions" nodes that describe the RX/TX buffers expected
105*1b17f4f1SOlivier Deprez     by the partition.
106*1b17f4f1SOlivier Deprez     The "compatible" must be the string "arm,ffa-manifest-rx_tx-buffer".
107*1b17f4f1SOlivier Deprez
108*1b17f4f1SOlivier Deprez- messaging-method [mandatory]
109*1b17f4f1SOlivier Deprez   - value type: <u32>
110*1b17f4f1SOlivier Deprez   - Specifies which messaging methods are supported by the partition:
111*1b17f4f1SOlivier Deprez
112*1b17f4f1SOlivier Deprez      - 0x0: direct messaging method
113*1b17f4f1SOlivier Deprez      - 0x1: indirect messaging method
114*1b17f4f1SOlivier Deprez      - 0x2: both direct and indirect messaging methods
115*1b17f4f1SOlivier Deprez      - 0x3: direct messaging method with managed exit support
116*1b17f4f1SOlivier Deprez      - 0x4: both messaging methods with managed exit support
117*1b17f4f1SOlivier Deprez
118*1b17f4f1SOlivier Deprez- has-primary-scheduler
119*1b17f4f1SOlivier Deprez   - value type: <empty>
120*1b17f4f1SOlivier Deprez   - Presence of this field indicates that the partition implements the primary
121*1b17f4f1SOlivier Deprez     scheduler. If so, run-time EL must be EL1.
122*1b17f4f1SOlivier Deprez
123*1b17f4f1SOlivier Deprez- run-time-model
124*1b17f4f1SOlivier Deprez   - value type: <u32>
125*1b17f4f1SOlivier Deprez   - Run time model that the SPM must enforce for this SP:
126*1b17f4f1SOlivier Deprez
127*1b17f4f1SOlivier Deprez      - 0x0: Run to completion
128*1b17f4f1SOlivier Deprez      - 0x1: Preemptible
129*1b17f4f1SOlivier Deprez
130*1b17f4f1SOlivier Deprez- time-slice-mem
131*1b17f4f1SOlivier Deprez   - value type: <empty>
132*1b17f4f1SOlivier Deprez   - Presence of this field indicates that the partition doesn't expect the
133*1b17f4f1SOlivier Deprez     partition manager to time slice long running memory management functions.
134*1b17f4f1SOlivier Deprez
135*1b17f4f1SOlivier Deprez- gp-register-num
136*1b17f4f1SOlivier Deprez   - value type: <u32>
137*1b17f4f1SOlivier Deprez   - Presence of this field indicates that the partition expects the
138*1b17f4f1SOlivier Deprez     ffa_init_info structure to be passed in via the specified general purpose
139*1b17f4f1SOlivier Deprez     register.
140*1b17f4f1SOlivier Deprez     The field specifies the general purpose register number but not its width.
141*1b17f4f1SOlivier Deprez     The width is derived from the partition's execution state, as specified in
142*1b17f4f1SOlivier Deprez     the partition properties. For example, if the number value is 1 then the
143*1b17f4f1SOlivier Deprez     general-purpose register used will be x1 in AArch64 state and w1 in AArch32
144*1b17f4f1SOlivier Deprez     state.
145*1b17f4f1SOlivier Deprez
146*1b17f4f1SOlivier Deprez- stream-endpoint-ids
147*1b17f4f1SOlivier Deprez   - value type: <prop-encoded-array>
148*1b17f4f1SOlivier Deprez   - List of <u32> tuples, identifying the IDs this partition is acting as
149*1b17f4f1SOlivier Deprez     proxy for.
150*1b17f4f1SOlivier Deprez
151*1b17f4f1SOlivier DeprezMemory Regions
152*1b17f4f1SOlivier Deprez--------------
153*1b17f4f1SOlivier Deprez
154*1b17f4f1SOlivier Deprez- compatible [mandatory]
155*1b17f4f1SOlivier Deprez   - value type: <string>
156*1b17f4f1SOlivier Deprez   - Must be the string "arm,ffa-manifest-memory-regions".
157*1b17f4f1SOlivier Deprez
158*1b17f4f1SOlivier Deprez- description
159*1b17f4f1SOlivier Deprez   - value type: <string>
160*1b17f4f1SOlivier Deprez   - Name of the memory region e.g. for debugging purposes.
161*1b17f4f1SOlivier Deprez
162*1b17f4f1SOlivier Deprez- pages-count [mandatory]
163*1b17f4f1SOlivier Deprez   - value type: <u32>
164*1b17f4f1SOlivier Deprez   - Count of pages of memory region as a multiple of the translation granule
165*1b17f4f1SOlivier Deprez     size
166*1b17f4f1SOlivier Deprez
167*1b17f4f1SOlivier Deprez- attributes [mandatory]
168*1b17f4f1SOlivier Deprez   - value type: <u32>
169*1b17f4f1SOlivier Deprez   - Mapping modes: ORed to get required permission
170*1b17f4f1SOlivier Deprez
171*1b17f4f1SOlivier Deprez      - 0x1: Read
172*1b17f4f1SOlivier Deprez      - 0x2: Write
173*1b17f4f1SOlivier Deprez      - 0x4: Execute
174*1b17f4f1SOlivier Deprez
175*1b17f4f1SOlivier Deprez- base-address
176*1b17f4f1SOlivier Deprez   - value type: <u64>
177*1b17f4f1SOlivier Deprez   - Base address of the region. The address must be aligned to the translation
178*1b17f4f1SOlivier Deprez     granule size.
179*1b17f4f1SOlivier Deprez     The address given may be a Physical Address (PA), Virtual Address (VA), or
180*1b17f4f1SOlivier Deprez     Intermediate Physical Address (IPA). Refer to the FFA specification for
181*1b17f4f1SOlivier Deprez     more information on the restrictions around the address type.
182*1b17f4f1SOlivier Deprez     If the base address is omitted then the partition manager must map a memory
183*1b17f4f1SOlivier Deprez     region of the specified size into the partition's translation regime and
184*1b17f4f1SOlivier Deprez     then communicate the region properties (including the base address chosen
185*1b17f4f1SOlivier Deprez     by the partition manager) to the partition.
186*1b17f4f1SOlivier Deprez
187*1b17f4f1SOlivier DeprezDevice Regions
188*1b17f4f1SOlivier Deprez--------------
189*1b17f4f1SOlivier Deprez
190*1b17f4f1SOlivier Deprez- compatible [mandatory]
191*1b17f4f1SOlivier Deprez   - value type: <string>
192*1b17f4f1SOlivier Deprez   - Must be the string "arm,ffa-manifest-device-regions".
193*1b17f4f1SOlivier Deprez
194*1b17f4f1SOlivier Deprez- description
195*1b17f4f1SOlivier Deprez   - value type: <string>
196*1b17f4f1SOlivier Deprez   - Name of the device region e.g. for debugging purposes.
197*1b17f4f1SOlivier Deprez
198*1b17f4f1SOlivier Deprez- reg [mandatory]
199*1b17f4f1SOlivier Deprez   - value type: <prop-encoded-array>
200*1b17f4f1SOlivier Deprez   - A (address, num-pages) pair describing the device, where:
201*1b17f4f1SOlivier Deprez
202*1b17f4f1SOlivier Deprez      - address: The physical base address <u64> value of the device MMIO
203*1b17f4f1SOlivier Deprez        region.
204*1b17f4f1SOlivier Deprez      - num-pages: The <u32> number of pages of the region. The total size of
205*1b17f4f1SOlivier Deprez        the region is this value multiplied by the translation granule size.
206*1b17f4f1SOlivier Deprez
207*1b17f4f1SOlivier Deprez- attributes [mandatory]
208*1b17f4f1SOlivier Deprez   - value type: <u32>
209*1b17f4f1SOlivier Deprez   - Mapping modes: ORed to get required permission
210*1b17f4f1SOlivier Deprez
211*1b17f4f1SOlivier Deprez     - 0x1: Read
212*1b17f4f1SOlivier Deprez     - 0x2: Write
213*1b17f4f1SOlivier Deprez     - 0x4: Execute
214*1b17f4f1SOlivier Deprez
215*1b17f4f1SOlivier Deprez- smmu-id
216*1b17f4f1SOlivier Deprez   - value type: <u32>
217*1b17f4f1SOlivier Deprez   - On systems with multiple System Memory Management Units (SMMUs) this
218*1b17f4f1SOlivier Deprez     identifier is used to inform the partition manager which SMMU the device is
219*1b17f4f1SOlivier Deprez     upstream of. If the field is omitted then it is assumed that the device is
220*1b17f4f1SOlivier Deprez     not upstream of any SMMU.
221*1b17f4f1SOlivier Deprez
222*1b17f4f1SOlivier Deprez- stream-ids
223*1b17f4f1SOlivier Deprez   - value type: <prop-encoded-array>
224*1b17f4f1SOlivier Deprez   - A list of (id, mem-manage) pair, where:
225*1b17f4f1SOlivier Deprez
226*1b17f4f1SOlivier Deprez      - id: A unique <u32> value amongst all devices assigned to the partition.
227*1b17f4f1SOlivier Deprez
228*1b17f4f1SOlivier Deprez- interrupts [mandatory]
229*1b17f4f1SOlivier Deprez   - value type: <prop-encoded-array>
230*1b17f4f1SOlivier Deprez   - A list of (id, attributes) pair describing the device interrupts, where:
231*1b17f4f1SOlivier Deprez
232*1b17f4f1SOlivier Deprez      - id: The <u32> interrupt IDs.
233*1b17f4f1SOlivier Deprez      - attributes: A <u32> value,
234*1b17f4f1SOlivier Deprez        containing the attributes for each interrupt ID:
235*1b17f4f1SOlivier Deprez
236*1b17f4f1SOlivier Deprez         - Interrupt type: SPI, PPI, SGI
237*1b17f4f1SOlivier Deprez         - Interrupt configuration: Edge triggered, Level triggered
238*1b17f4f1SOlivier Deprez         - Interrupt security state: Secure, Non-secure
239*1b17f4f1SOlivier Deprez         - Interrupt priority value
240*1b17f4f1SOlivier Deprez         - Target execution context/vCPU for each SPI
241*1b17f4f1SOlivier Deprez
242*1b17f4f1SOlivier Deprez- exclusive-access
243*1b17f4f1SOlivier Deprez   - value type: <empty>
244*1b17f4f1SOlivier Deprez   - Presence of this field implies that this endpoint must be granted exclusive
245*1b17f4f1SOlivier Deprez     access and ownership of this device's MMIO region.
246*1b17f4f1SOlivier Deprez
247*1b17f4f1SOlivier Deprez--------------
248*1b17f4f1SOlivier Deprez
249*1b17f4f1SOlivier Deprez*Copyright (c) 2019-2021, Arm Limited and Contributors. All rights reserved.*
250