psa-ffa-manifest-binding.rst 8.03 KB
Newer Older
J-Alves's avatar
J-Alves committed
1
2
PSA FF-A manifest binding to device tree
========================================
3
4

This document defines the nodes and properties used to define a partition,
J-Alves's avatar
J-Alves committed
5
according to the PSA FF-A specification.
6
7
8
9

Version 1.0
-----------

10
11
Partition Properties
^^^^^^^^^^^^^^^^^^^^
12
13
14

- compatible [mandatory]
   - value type: <string>
J-Alves's avatar
J-Alves committed
15
16
   - Must be the string "arm,ffa-manifest-X.Y" which specifies the major and
     minor versions fo the device tree binding for the FFA manifest represented
17
18
     by this node. The minor number is incremented if the binding changes in a
     backwards compatible manner.
19

20
21
22
      - X is an integer representing the major version number of this document.
      - Y is an integer representing the minor version number of this document.

J-Alves's avatar
J-Alves committed
23
- ffa-version [mandatory]
24
25
26
   - value type: <u32>
   - Must be two 16 bits values (X, Y), concatenated as 31:16 -> X,
     15:0 -> Y, where:
27

J-Alves's avatar
J-Alves committed
28
      - X is the major version of PSA-FF-A expected by the partition at the FFA
29
        instance it will execute.
J-Alves's avatar
J-Alves committed
30
      - Y is the minor version of PSA-FF-A expected by the partition at the FFA
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
        instance it will execute.

- uuid [mandatory]
   - value type: <prop-encoded-array>
   - An array consisting of 4 <u32> values, identifying the UUID of the service
     implemented by this partition. The UUID format is described in RFC 4122.

- id
   - value type: <u32>
   - Pre-allocated partition ID.

- auxiliary-id
   - value type: <u32>
   - Pre-allocated ID that could be used in memory management transactions.

- description
   - value type: <string>
   - Name of the partition e.g. for debugging purposes.

- execution-ctx-count [mandatory]
   - value type: <u32>
   - Number of vCPUs that a VM or SP wants to instantiate.
53

54
55
56
57
58
59
60
61
62
63
      - In the absence of virtualization, this is the number of execution
        contexts that a partition implements.
      - If value of this field = 1 and number of PEs > 1 then the partition is
        treated as UP & migrate capable.
      - If the value of this field > 1 then the partition is treated as a MP
        capable partition irrespective of the number of PEs.

- exception-level [mandatory]
   - value type: <u32>
   - The target exception level for the partition:
64

65
66
67
68
69
70
71
      - 0x0: EL1
      - 0x1: S_EL0
      - 0x2: S_EL1

- execution-state [mandatory]
   - value type: <u32>
   - The target execution state of the partition:
72

73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
      - 0: AArch64
      - 1: AArch32

- load-address
   - value type: <u64>
   - Physical base address of the partition in memory. Absence of this field
     indicates that the partition is position independent and can be loaded at
     any address chosen at boot time.

- entrypoint-offset
   - value type: <u64>
   - Offset from the base of the partition's binary image to the entry point of
     the partition. Absence of this field indicates that the entry point is at
     offset 0x0 from the base of the partition's binary.

- xlat-granule [mandatory]
   - value type: <u32>
   - Translation granule used with the partition:
91

92
93
      - 0x0: 4k
      - 0x1: 16k
94
      - 0x2: 64k
95
96
97
98
99
100
101
102
103
104
105

- boot-order
   - value type: <u32>
   - A unique number amongst all partitions that specifies if this partition
     must be booted before others. The partition with the smaller number will be
     booted first.

- rx-tx-buffer
   - value type: "memory-regions" node
   - Specific "memory-regions" nodes that describe the RX/TX buffers expected
     by the partition.
J-Alves's avatar
J-Alves committed
106
     The "compatible" must be the string "arm,ffa-manifest-rx_tx-buffer".
107
108
109
110

- messaging-method [mandatory]
   - value type: <u32>
   - Specifies which messaging methods are supported by the partition:
111

112
113
114
115
116
117
118
119
120
121
122
123
      - 0x0: direct messaging method
      - 0x1: indirect messaging method
      - 0x2: both direct and indirect messaging methods

- has-primary-scheduler
   - value type: <empty>
   - Presence of this field indicates that the partition implements the primary
     scheduler. If so, run-time EL must be EL1.

- run-time-model
   - value type: <u32>
   - Run time model that the SPM must enforce for this SP:
124

125
126
127
128
129
130
131
132
133
134
135
      - 0x0: Run to completion
      - 0x1: Preemptible

- time-slice-mem
   - value type: <empty>
   - Presence of this field indicates that the partition doesn't expect the
     partition manager to time slice long running memory management functions.

- gp-register-num
   - value type: <u32>
   - Presence of this field indicates that the partition expects the
J-Alves's avatar
J-Alves committed
136
     ffa_init_info structure to be passed in via the specified general purpose
137
138
139
140
141
142
143
144
145
146
147
148
     register.
     The field specifies the general purpose register number but not its width.
     The width is derived from the partition's execution state, as specified in
     the partition properties. For example, if the number value is 1 then the
     general-purpose register used will be x1 in AArch64 state and w1 in AArch32
     state.

- stream-endpoint-ids
   - value type: <prop-encoded-array>
   - List of <u32> tuples, identifying the IDs this partition is acting as
     proxy for.

149
Memory Regions
150
151
152
153
--------------

- compatible [mandatory]
   - value type: <string>
J-Alves's avatar
J-Alves committed
154
   - Must be the string "arm,ffa-manifest-memory-regions".
155
156
157
158
159
160
161
162
163
164
165
166

- description
   - value type: <string>
   - Name of the memory region e.g. for debugging purposes.

- pages-count [mandatory]
   - value type: <u32>
   - Count of pages of memory region as a multiple of the translation granule
     size

- attributes [mandatory]
   - value type: <u32>
167
168
169
170
171
   - Mapping modes: ORed to get required permission

      - 0x1: Read
      - 0x2: Write
      - 0x4: Execute
172
173
174
175
176
177

- base-address
   - value type: <u64>
   - Base address of the region. The address must be aligned to the translation
     granule size.
     The address given may be a Physical Address (PA), Virtual Address (VA), or
J-Alves's avatar
J-Alves committed
178
     Intermediate Physical Address (IPA). Refer to the FFA specification for
179
180
181
182
183
184
     more information on the restrictions around the address type.
     If the base address is omitted then the partition manager must map a memory
     region of the specified size into the partition's translation regime and
     then communicate the region properties (including the base address chosen
     by the partition manager) to the partition.

185
Device Regions
186
187
188
189
--------------

- compatible [mandatory]
   - value type: <string>
J-Alves's avatar
J-Alves committed
190
   - Must be the string "arm,ffa-manifest-device-regions".
191
192
193
194
195
196
197
198

- description
   - value type: <string>
   - Name of the device region e.g. for debugging purposes.

- reg [mandatory]
   - value type: <prop-encoded-array>
   - A (address, num-pages) pair describing the device, where:
199

200
201
202
203
204
205
206
      - address: The physical base address <u64> value of the device MMIO
        region.
      - num-pages: The <u32> number of pages of the region. The total size of
        the region is this value multiplied by the translation granule size.

- attributes [mandatory]
   - value type: <u32>
207
208
209
210
211
   - Mapping modes: ORed to get required permission

     - 0x1: Read
     - 0x2: Write
     - 0x4: Execute
212
213
214
215
216
217
218
219

- smmu-id
   - value type: <u32>
   - On systems with multiple System Memory Management Units (SMMUs) this
     identifier is used to inform the partition manager which SMMU the device is
     upstream of. If the field is omitted then it is assumed that the device is
     not upstream of any SMMU.

220
- stream-ids
221
222
   - value type: <prop-encoded-array>
   - A list of (id, mem-manage) pair, where:
223

224
225
226
227
228
      - id: A unique <u32> value amongst all devices assigned to the partition.

- interrupts [mandatory]
   - value type: <prop-encoded-array>
   - A list of (id, attributes) pair describing the device interrupts, where:
229

230
      - id: The <u32> interrupt IDs.
231
      - attributes: A <u32> value,
232
        containing the attributes for each interrupt ID:
233

234
235
236
237
238
239
240
241
242
243
244
245
246
247
         - Interrupt type: SPI, PPI, SGI
         - Interrupt configuration: Edge triggered, Level triggered
         - Interrupt security state: Secure, Non-secure
         - Interrupt priority value
         - Target execution context/vCPU for each SPI

- exclusive-access
   - value type: <empty>
   - Presence of this field implies that this endpoint must be granted exclusive
     access and ownership of this devices's MMIO region.

--------------

*Copyright (c) 2019-2020, Arm Limited and Contributors. All rights reserved.*