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