blob: 584816911dd6ff00d6da6eafa28b1b46f2d540a5 [file] [log] [blame]
Louis Mayencourt5f0fc152019-11-29 15:05:14 +00001SPCI manifest binding to device tree
2====================================
3
4This document defines the nodes and properties used to define a partition,
5according to the SPCI specification.
6
7Version 1.0
8-----------
9
10spci-manifest-partition
11^^^^^^^^^^^^^^^^^^^^^^^
12
13- compatible [mandatory]
14 - value type: <string>
15 - Must be the string "arm,spci-manifest-X.Y" which specifies the major and
16 minor versions fo the device tree binding for the SPCI manifest represented
17 by this node. The minor number is incremented if the binding changes in a
18 backwards compatible manner.
Louis Mayencourt950ef2f2020-03-27 11:49:20 +000019
Louis Mayencourt5f0fc152019-11-29 15:05:14 +000020 - 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
23- spci-version [mandatory]
24 - value type: <u32>
25 - Must be two 16 bits values (X, Y), concatenated as 31:16 -> X,
26 15:0 -> Y, where:
Louis Mayencourt950ef2f2020-03-27 11:49:20 +000027
Louis Mayencourt5f0fc152019-11-29 15:05:14 +000028 - X is the major version of PSA-FF-A expected by the partition at the SPCI
29 instance it will execute.
30 - Y is the minor version of PSA-FF-A expected by the partition at the SPCI
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.
37 UUID can be shared by multiple instances of partitions that offer the same
38 service For example:
Louis Mayencourt950ef2f2020-03-27 11:49:20 +000039
Louis Mayencourt5f0fc152019-11-29 15:05:14 +000040 - If there are multiple instances of a Trusted OS, then the UUID can be
41 shared by all instances.
42 - The TEE driver in the HLOS can use the UUID with the
43 SPCI_PARTITION_INFO_GET interface to determine the:
Louis Mayencourt950ef2f2020-03-27 11:49:20 +000044
Louis Mayencourt5f0fc152019-11-29 15:05:14 +000045 - Number of Trusted OSs
46 - The partition ID of each instance of the Trusted OS
47
48- id
49 - value type: <u32>
50 - Pre-allocated partition ID.
51
52- auxiliary-id
53 - value type: <u32>
54 - Pre-allocated ID that could be used in memory management transactions.
55
56- description
57 - value type: <string>
58 - Name of the partition e.g. for debugging purposes.
59
60- execution-ctx-count [mandatory]
61 - value type: <u32>
62 - Number of vCPUs that a VM or SP wants to instantiate.
Louis Mayencourt950ef2f2020-03-27 11:49:20 +000063
Louis Mayencourt5f0fc152019-11-29 15:05:14 +000064 - In the absence of virtualization, this is the number of execution
65 contexts that a partition implements.
66 - If value of this field = 1 and number of PEs > 1 then the partition is
67 treated as UP & migrate capable.
68 - If the value of this field > 1 then the partition is treated as a MP
69 capable partition irrespective of the number of PEs.
70
71- exception-level [mandatory]
72 - value type: <u32>
73 - The target exception level for the partition:
Louis Mayencourt950ef2f2020-03-27 11:49:20 +000074
Louis Mayencourt5f0fc152019-11-29 15:05:14 +000075 - 0x0: EL1
76 - 0x1: S_EL0
77 - 0x2: S_EL1
78 - 0x3: EL2
79 - 0x4: Supervisor mode
80 - 0x5: Secure User mode
81
82- execution-state [mandatory]
83 - value type: <u32>
84 - The target execution state of the partition:
Louis Mayencourt950ef2f2020-03-27 11:49:20 +000085
Louis Mayencourt5f0fc152019-11-29 15:05:14 +000086 - 0: AArch64
87 - 1: AArch32
88
89- load-address
90 - value type: <u64>
91 - Physical base address of the partition in memory. Absence of this field
92 indicates that the partition is position independent and can be loaded at
93 any address chosen at boot time.
94
95- entrypoint-offset
96 - value type: <u64>
97 - Offset from the base of the partition's binary image to the entry point of
98 the partition. Absence of this field indicates that the entry point is at
99 offset 0x0 from the base of the partition's binary.
100
101- xlat-granule [mandatory]
102 - value type: <u32>
103 - Translation granule used with the partition:
Louis Mayencourt950ef2f2020-03-27 11:49:20 +0000104
Louis Mayencourt5f0fc152019-11-29 15:05:14 +0000105 - 0x0: 4k
106 - 0x1: 16k
107 - 0x2: 32k
108
109- boot-order
110 - value type: <u32>
111 - A unique number amongst all partitions that specifies if this partition
112 must be booted before others. The partition with the smaller number will be
113 booted first.
114
115- rx-tx-buffer
116 - value type: "memory-regions" node
117 - Specific "memory-regions" nodes that describe the RX/TX buffers expected
118 by the partition.
119 The "compatible" must be the string "arm,spci-manifest-rx_tx-buffer".
120
121- messaging-method [mandatory]
122 - value type: <u32>
123 - Specifies which messaging methods are supported by the partition:
Louis Mayencourt950ef2f2020-03-27 11:49:20 +0000124
Louis Mayencourt5f0fc152019-11-29 15:05:14 +0000125 - 0x0: direct messaging method
126 - 0x1: indirect messaging method
127 - 0x2: both direct and indirect messaging methods
128
129- has-primary-scheduler
130 - value type: <empty>
131 - Presence of this field indicates that the partition implements the primary
132 scheduler. If so, run-time EL must be EL1.
133
134- run-time-model
135 - value type: <u32>
136 - Run time model that the SPM must enforce for this SP:
Louis Mayencourt950ef2f2020-03-27 11:49:20 +0000137
Louis Mayencourt5f0fc152019-11-29 15:05:14 +0000138 - 0x0: Run to completion
139 - 0x1: Preemptible
140
141- time-slice-mem
142 - value type: <empty>
143 - Presence of this field indicates that the partition doesn't expect the
144 partition manager to time slice long running memory management functions.
145
146- gp-register-num
147 - value type: <u32>
148 - Presence of this field indicates that the partition expects the
149 spci_init_info structure to be passed in via the specified general purpose
150 register.
151 The field specifies the general purpose register number but not its width.
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.
156
157- stream-endpoint-ids
158 - value type: <prop-encoded-array>
159 - List of <u32> tuples, identifying the IDs this partition is acting as
160 proxy for.
161
162memory-regions
163--------------
164
165- compatible [mandatory]
166 - value type: <string>
167 - Must be the string "arm,spci-manifest-memory-regions".
168
169- description
170 - value type: <string>
171 - Name of the memory region e.g. for debugging purposes.
172
173- pages-count [mandatory]
174 - value type: <u32>
175 - Count of pages of memory region as a multiple of the translation granule
176 size
177
178- attributes [mandatory]
179 - value type: <u32>
180 - ?? TO DEFINE
181
182- base-address
183 - value type: <u64>
184 - Base address of the region. The address must be aligned to the translation
185 granule size.
186 The address given may be a Physical Address (PA), Virtual Address (VA), or
187 Intermediate Physical Address (IPA). Refer to the SPCI specification for
188 more information on the restrictions around the address type.
189 If the base address is omitted then the partition manager must map a memory
190 region of the specified size into the partition's translation regime and
191 then communicate the region properties (including the base address chosen
192 by the partition manager) to the partition.
193
194device-regions
195--------------
196
197- compatible [mandatory]
198 - value type: <string>
199 - Must be the string "arm,spci-manifest-device-regions".
200
201- description
202 - value type: <string>
203 - Name of the device region e.g. for debugging purposes.
204
205- reg [mandatory]
206 - value type: <prop-encoded-array>
207 - A (address, num-pages) pair describing the device, where:
Louis Mayencourt950ef2f2020-03-27 11:49:20 +0000208
Louis Mayencourt5f0fc152019-11-29 15:05:14 +0000209 - address: The physical base address <u64> value of the device MMIO
210 region.
211 - num-pages: The <u32> number of pages of the region. The total size of
212 the region is this value multiplied by the translation granule size.
213
214- attributes [mandatory]
215 - value type: <u32>
216 - ?? TO DEFINE
217
218- smmu-id
219 - value type: <u32>
220 - On systems with multiple System Memory Management Units (SMMUs) this
221 identifier is used to inform the partition manager which SMMU the device is
222 upstream of. If the field is omitted then it is assumed that the device is
223 not upstream of any SMMU.
224
225- stream-ids [mandatory]
226 - value type: <prop-encoded-array>
227 - A list of (id, mem-manage) pair, where:
Louis Mayencourt950ef2f2020-03-27 11:49:20 +0000228
Louis Mayencourt5f0fc152019-11-29 15:05:14 +0000229 - id: A unique <u32> value amongst all devices assigned to the partition.
230 - mem-manage: A <u32> value used in memory management operations.
231
232- interrupts [mandatory]
233 - value type: <prop-encoded-array>
234 - A list of (id, attributes) pair describing the device interrupts, where:
Louis Mayencourt950ef2f2020-03-27 11:49:20 +0000235
Louis Mayencourt5f0fc152019-11-29 15:05:14 +0000236 - id: The <u32> interrupt IDs.
237 - attributes: A ?? TO DEFINE value,
238 containing the attributes for each interrupt ID:
Louis Mayencourt950ef2f2020-03-27 11:49:20 +0000239
Louis Mayencourt5f0fc152019-11-29 15:05:14 +0000240 - Interrupt type: SPI, PPI, SGI
241 - Interrupt configuration: Edge triggered, Level triggered
242 - Interrupt security state: Secure, Non-secure
243 - Interrupt priority value
244 - Target execution context/vCPU for each SPI
245
246- exclusive-access
247 - value type: <empty>
248 - Presence of this field implies that this endpoint must be granted exclusive
249 access and ownership of this devices's MMIO region.
250
251--------------
252
253*Copyright (c) 2019-2020, Arm Limited and Contributors. All rights reserved.*