ffa-manifest-binding.rst 12 KB

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