xref: /rk3399_ARM-atf/docs/components/ffa-manifest-binding.rst (revision 12349d3332325f56462b780e36f31ebac7976d38)
11b17f4f1SOlivier DeprezFF-A manifest binding to device tree
21b17f4f1SOlivier Deprez========================================
31b17f4f1SOlivier Deprez
41b17f4f1SOlivier DeprezThis document defines the nodes and properties used to define a partition,
51b17f4f1SOlivier Deprezaccording to the FF-A specification.
61b17f4f1SOlivier Deprez
71b17f4f1SOlivier DeprezVersion 1.0
81b17f4f1SOlivier Deprez-----------
91b17f4f1SOlivier Deprez
101b17f4f1SOlivier DeprezPartition Properties
111b17f4f1SOlivier Deprez^^^^^^^^^^^^^^^^^^^^
121b17f4f1SOlivier Deprez
131b17f4f1SOlivier Deprez- compatible [mandatory]
141b17f4f1SOlivier Deprez   - value type: <string>
151b17f4f1SOlivier Deprez   - Must be the string "arm,ffa-manifest-X.Y" which specifies the major and
161b17f4f1SOlivier Deprez     minor versions of the device tree binding for the FFA manifest represented
171b17f4f1SOlivier Deprez     by this node. The minor number is incremented if the binding changes in a
181b17f4f1SOlivier Deprez     backwards compatible manner.
191b17f4f1SOlivier Deprez
201b17f4f1SOlivier Deprez      - X is an integer representing the major version number of this document.
211b17f4f1SOlivier Deprez      - Y is an integer representing the minor version number of this document.
221b17f4f1SOlivier Deprez
231b17f4f1SOlivier Deprez- ffa-version [mandatory]
241b17f4f1SOlivier Deprez   - value type: <u32>
251b17f4f1SOlivier Deprez   - Must be two 16 bits values (X, Y), concatenated as 31:16 -> X,
261b17f4f1SOlivier Deprez     15:0 -> Y, where:
271b17f4f1SOlivier Deprez
281b17f4f1SOlivier Deprez      - X is the major version of FF-A expected by the partition at the FFA
291b17f4f1SOlivier Deprez        instance it will execute.
301b17f4f1SOlivier Deprez      - Y is the minor version of FF-A expected by the partition at the FFA
311b17f4f1SOlivier Deprez        instance it will execute.
321b17f4f1SOlivier Deprez
331b17f4f1SOlivier Deprez- uuid [mandatory]
341b17f4f1SOlivier Deprez   - value type: <prop-encoded-array>
351b17f4f1SOlivier Deprez   - An array consisting of 4 <u32> values, identifying the UUID of the service
361b17f4f1SOlivier Deprez     implemented by this partition. The UUID format is described in RFC 4122.
371b17f4f1SOlivier Deprez
381b17f4f1SOlivier Deprez- id
391b17f4f1SOlivier Deprez   - value type: <u32>
401b17f4f1SOlivier Deprez   - Pre-allocated partition ID.
411b17f4f1SOlivier Deprez
421b17f4f1SOlivier Deprez- auxiliary-id
431b17f4f1SOlivier Deprez   - value type: <u32>
441b17f4f1SOlivier Deprez   - Pre-allocated ID that could be used in memory management transactions.
451b17f4f1SOlivier Deprez
461b17f4f1SOlivier Deprez- description
471b17f4f1SOlivier Deprez   - value type: <string>
481b17f4f1SOlivier Deprez   - Name of the partition e.g. for debugging purposes.
491b17f4f1SOlivier Deprez
501b17f4f1SOlivier Deprez- execution-ctx-count [mandatory]
511b17f4f1SOlivier Deprez   - value type: <u32>
521b17f4f1SOlivier Deprez   - Number of vCPUs that a VM or SP wants to instantiate.
531b17f4f1SOlivier Deprez
541b17f4f1SOlivier Deprez      - In the absence of virtualization, this is the number of execution
551b17f4f1SOlivier Deprez        contexts that a partition implements.
561b17f4f1SOlivier Deprez      - If value of this field = 1 and number of PEs > 1 then the partition is
571b17f4f1SOlivier Deprez        treated as UP & migrate capable.
581b17f4f1SOlivier Deprez      - If the value of this field > 1 then the partition is treated as a MP
591b17f4f1SOlivier Deprez        capable partition irrespective of the number of PEs.
601b17f4f1SOlivier Deprez
611b17f4f1SOlivier Deprez- exception-level [mandatory]
621b17f4f1SOlivier Deprez   - value type: <u32>
631b17f4f1SOlivier Deprez   - The target exception level for the partition:
641b17f4f1SOlivier Deprez
651b17f4f1SOlivier Deprez      - 0x0: EL1
661b17f4f1SOlivier Deprez      - 0x1: S_EL0
671b17f4f1SOlivier Deprez      - 0x2: S_EL1
681b17f4f1SOlivier Deprez
691b17f4f1SOlivier Deprez- execution-state [mandatory]
701b17f4f1SOlivier Deprez   - value type: <u32>
711b17f4f1SOlivier Deprez   - The target execution state of the partition:
721b17f4f1SOlivier Deprez
731b17f4f1SOlivier Deprez      - 0: AArch64
741b17f4f1SOlivier Deprez      - 1: AArch32
751b17f4f1SOlivier Deprez
761b17f4f1SOlivier Deprez- load-address
771b17f4f1SOlivier Deprez   - value type: <u64>
781b17f4f1SOlivier Deprez   - Physical base address of the partition in memory. Absence of this field
791b17f4f1SOlivier Deprez     indicates that the partition is position independent and can be loaded at
801b17f4f1SOlivier Deprez     any address chosen at boot time.
811b17f4f1SOlivier Deprez
821b17f4f1SOlivier Deprez- entrypoint-offset
831b17f4f1SOlivier Deprez   - value type: <u64>
841b17f4f1SOlivier Deprez   - Offset from the base of the partition's binary image to the entry point of
851b17f4f1SOlivier Deprez     the partition. Absence of this field indicates that the entry point is at
861b17f4f1SOlivier Deprez     offset 0x0 from the base of the partition's binary.
871b17f4f1SOlivier Deprez
881b17f4f1SOlivier Deprez- xlat-granule [mandatory]
891b17f4f1SOlivier Deprez   - value type: <u32>
901b17f4f1SOlivier Deprez   - Translation granule used with the partition:
911b17f4f1SOlivier Deprez
921b17f4f1SOlivier Deprez      - 0x0: 4k
931b17f4f1SOlivier Deprez      - 0x1: 16k
941b17f4f1SOlivier Deprez      - 0x2: 64k
951b17f4f1SOlivier Deprez
961b17f4f1SOlivier Deprez- boot-order
971b17f4f1SOlivier Deprez   - value type: <u32>
981b17f4f1SOlivier Deprez   - A unique number amongst all partitions that specifies if this partition
991b17f4f1SOlivier Deprez     must be booted before others. The partition with the smaller number will be
1001b17f4f1SOlivier Deprez     booted first.
1011b17f4f1SOlivier Deprez
1021b17f4f1SOlivier Deprez- rx-tx-buffer
1031b17f4f1SOlivier Deprez   - value type: "memory-regions" node
1041b17f4f1SOlivier Deprez   - Specific "memory-regions" nodes that describe the RX/TX buffers expected
1051b17f4f1SOlivier Deprez     by the partition.
1061b17f4f1SOlivier Deprez     The "compatible" must be the string "arm,ffa-manifest-rx_tx-buffer".
1071b17f4f1SOlivier Deprez
1081b17f4f1SOlivier Deprez- messaging-method [mandatory]
109bb320dbcSMaksims Svecovs   - value type: <u8>
110bb320dbcSMaksims Svecovs   - Specifies which messaging methods are supported by the partition, set bit
111bb320dbcSMaksims Svecovs     means the feature is supported, clear bit - not supported:
1121b17f4f1SOlivier Deprez
113*12349d33SMaksims Svecovs      - Bit[0]: partition can receive direct requests if set
114*12349d33SMaksims Svecovs      - Bit[1]: partition can send direct requests if set
115*12349d33SMaksims Svecovs      - Bit[2]: partition can send and receive indirect messages
116*12349d33SMaksims Svecovs
117*12349d33SMaksims Svecovs- managed-exit
118*12349d33SMaksims Svecovs   - value type: <empty>
119*12349d33SMaksims Svecovs   - Specifies if managed exit is supported.
1201b17f4f1SOlivier Deprez
1211b17f4f1SOlivier Deprez- has-primary-scheduler
1221b17f4f1SOlivier Deprez   - value type: <empty>
1231b17f4f1SOlivier Deprez   - Presence of this field indicates that the partition implements the primary
1241b17f4f1SOlivier Deprez     scheduler. If so, run-time EL must be EL1.
1251b17f4f1SOlivier Deprez
1261b17f4f1SOlivier Deprez- run-time-model
1271b17f4f1SOlivier Deprez   - value type: <u32>
1281b17f4f1SOlivier Deprez   - Run time model that the SPM must enforce for this SP:
1291b17f4f1SOlivier Deprez
1301b17f4f1SOlivier Deprez      - 0x0: Run to completion
1311b17f4f1SOlivier Deprez      - 0x1: Preemptible
1321b17f4f1SOlivier Deprez
1331b17f4f1SOlivier Deprez- time-slice-mem
1341b17f4f1SOlivier Deprez   - value type: <empty>
1351b17f4f1SOlivier Deprez   - Presence of this field indicates that the partition doesn't expect the
1361b17f4f1SOlivier Deprez     partition manager to time slice long running memory management functions.
1371b17f4f1SOlivier Deprez
1381b17f4f1SOlivier Deprez- gp-register-num
1391b17f4f1SOlivier Deprez   - value type: <u32>
1401b17f4f1SOlivier Deprez   - Presence of this field indicates that the partition expects the
1411b17f4f1SOlivier Deprez     ffa_init_info structure to be passed in via the specified general purpose
1421b17f4f1SOlivier Deprez     register.
1431b17f4f1SOlivier Deprez     The field specifies the general purpose register number but not its width.
1441b17f4f1SOlivier Deprez     The width is derived from the partition's execution state, as specified in
1451b17f4f1SOlivier Deprez     the partition properties. For example, if the number value is 1 then the
1461b17f4f1SOlivier Deprez     general-purpose register used will be x1 in AArch64 state and w1 in AArch32
1471b17f4f1SOlivier Deprez     state.
1481b17f4f1SOlivier Deprez
1491b17f4f1SOlivier Deprez- stream-endpoint-ids
1501b17f4f1SOlivier Deprez   - value type: <prop-encoded-array>
1511b17f4f1SOlivier Deprez   - List of <u32> tuples, identifying the IDs this partition is acting as
1521b17f4f1SOlivier Deprez     proxy for.
1531b17f4f1SOlivier Deprez
1541b17f4f1SOlivier DeprezMemory Regions
1551b17f4f1SOlivier Deprez--------------
1561b17f4f1SOlivier Deprez
1571b17f4f1SOlivier Deprez- compatible [mandatory]
1581b17f4f1SOlivier Deprez   - value type: <string>
1591b17f4f1SOlivier Deprez   - Must be the string "arm,ffa-manifest-memory-regions".
1601b17f4f1SOlivier Deprez
1611b17f4f1SOlivier Deprez- description
1621b17f4f1SOlivier Deprez   - value type: <string>
1631b17f4f1SOlivier Deprez   - Name of the memory region e.g. for debugging purposes.
1641b17f4f1SOlivier Deprez
1651b17f4f1SOlivier Deprez- pages-count [mandatory]
1661b17f4f1SOlivier Deprez   - value type: <u32>
1671b17f4f1SOlivier Deprez   - Count of pages of memory region as a multiple of the translation granule
1681b17f4f1SOlivier Deprez     size
1691b17f4f1SOlivier Deprez
1701b17f4f1SOlivier Deprez- attributes [mandatory]
1711b17f4f1SOlivier Deprez   - value type: <u32>
1721b17f4f1SOlivier Deprez   - Mapping modes: ORed to get required permission
1731b17f4f1SOlivier Deprez
1741b17f4f1SOlivier Deprez      - 0x1: Read
1751b17f4f1SOlivier Deprez      - 0x2: Write
1761b17f4f1SOlivier Deprez      - 0x4: Execute
1771b17f4f1SOlivier Deprez
1781b17f4f1SOlivier Deprez- base-address
1791b17f4f1SOlivier Deprez   - value type: <u64>
1801b17f4f1SOlivier Deprez   - Base address of the region. The address must be aligned to the translation
1811b17f4f1SOlivier Deprez     granule size.
1821b17f4f1SOlivier Deprez     The address given may be a Physical Address (PA), Virtual Address (VA), or
1831b17f4f1SOlivier Deprez     Intermediate Physical Address (IPA). Refer to the FFA specification for
1841b17f4f1SOlivier Deprez     more information on the restrictions around the address type.
1851b17f4f1SOlivier Deprez     If the base address is omitted then the partition manager must map a memory
1861b17f4f1SOlivier Deprez     region of the specified size into the partition's translation regime and
1871b17f4f1SOlivier Deprez     then communicate the region properties (including the base address chosen
1881b17f4f1SOlivier Deprez     by the partition manager) to the partition.
1891b17f4f1SOlivier Deprez
1901b17f4f1SOlivier DeprezDevice Regions
1911b17f4f1SOlivier Deprez--------------
1921b17f4f1SOlivier Deprez
1931b17f4f1SOlivier Deprez- compatible [mandatory]
1941b17f4f1SOlivier Deprez   - value type: <string>
1951b17f4f1SOlivier Deprez   - Must be the string "arm,ffa-manifest-device-regions".
1961b17f4f1SOlivier Deprez
1971b17f4f1SOlivier Deprez- description
1981b17f4f1SOlivier Deprez   - value type: <string>
1991b17f4f1SOlivier Deprez   - Name of the device region e.g. for debugging purposes.
2001b17f4f1SOlivier Deprez
2011b17f4f1SOlivier Deprez- reg [mandatory]
2021b17f4f1SOlivier Deprez   - value type: <prop-encoded-array>
2031b17f4f1SOlivier Deprez   - A (address, num-pages) pair describing the device, where:
2041b17f4f1SOlivier Deprez
2051b17f4f1SOlivier Deprez      - address: The physical base address <u64> value of the device MMIO
2061b17f4f1SOlivier Deprez        region.
2071b17f4f1SOlivier Deprez      - num-pages: The <u32> number of pages of the region. The total size of
2081b17f4f1SOlivier Deprez        the region is this value multiplied by the translation granule size.
2091b17f4f1SOlivier Deprez
2101b17f4f1SOlivier Deprez- attributes [mandatory]
2111b17f4f1SOlivier Deprez   - value type: <u32>
2121b17f4f1SOlivier Deprez   - Mapping modes: ORed to get required permission
2131b17f4f1SOlivier Deprez
2141b17f4f1SOlivier Deprez     - 0x1: Read
2151b17f4f1SOlivier Deprez     - 0x2: Write
2161b17f4f1SOlivier Deprez     - 0x4: Execute
2171b17f4f1SOlivier Deprez
2181b17f4f1SOlivier Deprez- smmu-id
2191b17f4f1SOlivier Deprez   - value type: <u32>
2201b17f4f1SOlivier Deprez   - On systems with multiple System Memory Management Units (SMMUs) this
2211b17f4f1SOlivier Deprez     identifier is used to inform the partition manager which SMMU the device is
2221b17f4f1SOlivier Deprez     upstream of. If the field is omitted then it is assumed that the device is
2231b17f4f1SOlivier Deprez     not upstream of any SMMU.
2241b17f4f1SOlivier Deprez
2251b17f4f1SOlivier Deprez- stream-ids
2261b17f4f1SOlivier Deprez   - value type: <prop-encoded-array>
2271b17f4f1SOlivier Deprez   - A list of (id, mem-manage) pair, where:
2281b17f4f1SOlivier Deprez
2291b17f4f1SOlivier Deprez      - id: A unique <u32> value amongst all devices assigned to the partition.
2301b17f4f1SOlivier Deprez
2311b17f4f1SOlivier Deprez- interrupts [mandatory]
2321b17f4f1SOlivier Deprez   - value type: <prop-encoded-array>
2331b17f4f1SOlivier Deprez   - A list of (id, attributes) pair describing the device interrupts, where:
2341b17f4f1SOlivier Deprez
2351b17f4f1SOlivier Deprez      - id: The <u32> interrupt IDs.
2361b17f4f1SOlivier Deprez      - attributes: A <u32> value,
2371b17f4f1SOlivier Deprez        containing the attributes for each interrupt ID:
2381b17f4f1SOlivier Deprez
2391b17f4f1SOlivier Deprez         - Interrupt type: SPI, PPI, SGI
2401b17f4f1SOlivier Deprez         - Interrupt configuration: Edge triggered, Level triggered
2411b17f4f1SOlivier Deprez         - Interrupt security state: Secure, Non-secure
2421b17f4f1SOlivier Deprez         - Interrupt priority value
2431b17f4f1SOlivier Deprez         - Target execution context/vCPU for each SPI
2441b17f4f1SOlivier Deprez
2451b17f4f1SOlivier Deprez- exclusive-access
2461b17f4f1SOlivier Deprez   - value type: <empty>
2471b17f4f1SOlivier Deprez   - Presence of this field implies that this endpoint must be granted exclusive
2481b17f4f1SOlivier Deprez     access and ownership of this device's MMIO region.
2491b17f4f1SOlivier Deprez
2501b17f4f1SOlivier Deprez--------------
2511b17f4f1SOlivier Deprez
2521b17f4f1SOlivier Deprez*Copyright (c) 2019-2021, Arm Limited and Contributors. All rights reserved.*
253