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