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