cot_descriptors.dtsi 7.24 KB
Newer Older
1
2
3
4
5
6
7
8
/*
 * Copyright (c) 2020, ARM Limited. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#include <tools_share/tbbr_oid.h>
#include <common/tbbr/tbbr_img_def.h>
9
#include <common/nv_cntr_ids.h>
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149

cot {
	manifests {
		compatible = "arm, cert-descs";

		trusted_boot_fw_cert: trusted_boot_fw_cert {
			root-certificate;
			image-id =<TRUSTED_BOOT_FW_CERT_ID>;
			antirollback-counter = <&trusted_nv_counter>;

			tb_fw_hash: tb_fw_hash {
				oid = TRUSTED_BOOT_FW_HASH_OID;
			};
			tb_fw_config_hash: tb_fw_config_hash {
				oid = TRUSTED_BOOT_FW_CONFIG_HASH_OID;
			};
			hw_config_hash: hw_config_hash {
				oid = HW_CONFIG_HASH_OID;
			};
			fw_config_hash: fw_config_hash {
				oid = FW_CONFIG_HASH_OID;
			};
		};

		trusted_key_cert: trusted_key_cert {
			root-certificate;
			image-id = <TRUSTED_KEY_CERT_ID>;
			antirollback-counter = <&trusted_nv_counter>;

			trusted_world_pk: trusted_world_pk {
				oid = TRUSTED_WORLD_PK_OID;
			};
			non_trusted_world_pk: non_trusted_world_pk {
				oid = NON_TRUSTED_WORLD_PK_OID;
			};
		};

		scp_fw_key_cert: scp_fw_key_cert {
			image-id = <SCP_FW_KEY_CERT_ID>;
			parent = <&trusted_key_cert>;
			signing-key = <&trusted_world_pk>;
			antirollback-counter = <&trusted_nv_counter>;

			scp_fw_content_pk: scp_fw_content_pk {
				oid = SCP_FW_CONTENT_CERT_PK_OID;
			};
		};

		scp_fw_content_cert: scp_fw_content_cert {
			image-id = <SCP_FW_CONTENT_CERT_ID>;
			parent = <&scp_fw_key_cert>;
			signing-key = <&scp_fw_content_pk>;
			antirollback-counter = <&trusted_nv_counter>;

			scp_fw_hash: scp_fw_hash {
				oid = SCP_FW_HASH_OID;
			};
		};

		soc_fw_key_cert: soc_fw_key_cert {
			image-id = <SOC_FW_KEY_CERT_ID>;
			parent = <&trusted_key_cert>;
			signing-key = <&trusted_world_pk>;
			antirollback-counter = <&trusted_nv_counter>;
			soc_fw_content_pk: soc_fw_content_pk {
				oid = SOC_FW_CONTENT_CERT_PK_OID;
			};
		};

		soc_fw_content_cert: soc_fw_content_cert {
			image-id = <SOC_FW_CONTENT_CERT_ID>;
			parent = <&soc_fw_key_cert>;
			signing-key = <&soc_fw_content_pk>;
			antirollback-counter = <&trusted_nv_counter>;

			soc_fw_hash: soc_fw_hash {
				oid = SOC_AP_FW_HASH_OID;
			};
			soc_fw_config_hash: soc_fw_config_hash {
				oid = SOC_FW_CONFIG_HASH_OID;
			};
		};

		trusted_os_fw_key_cert: trusted_os_fw_key_cert {
			image-id = <TRUSTED_OS_FW_KEY_CERT_ID>;
			parent = <&trusted_key_cert>;
			signing-key = <&trusted_world_pk>;
			antirollback-counter = <&trusted_nv_counter>;

			tos_fw_content_pk: tos_fw_content_pk {
				oid = TRUSTED_OS_FW_CONTENT_CERT_PK_OID;
			};
		};

		trusted_os_fw_content_cert: trusted_os_fw_content_cert {
			image-id = <TRUSTED_OS_FW_CONTENT_CERT_ID>;
			parent = <&trusted_os_fw_key_cert>;
			signing-key = <&tos_fw_content_pk>;
			antirollback-counter = <&trusted_nv_counter>;

			tos_fw_hash: tos_fw_hash {
				oid = TRUSTED_OS_FW_HASH_OID;
			};
			tos_fw_extra1_hash: tos_fw_extra1_hash {
				oid = TRUSTED_OS_FW_EXTRA1_HASH_OID;
			};
			tos_fw_extra2_hash: tos_fw_extra2_hash {
				oid = TRUSTED_OS_FW_EXTRA2_HASH_OID;
			};
			tos_fw_config_hash: tos_fw_config_hash {
				oid = TRUSTED_OS_FW_CONFIG_HASH_OID;
			};
		};

		non_trusted_fw_key_cert: non_trusted_fw_key_cert {
			image-id = <NON_TRUSTED_FW_KEY_CERT_ID>;
			parent = <&trusted_key_cert>;
			signing-key = <&non_trusted_world_pk>;
			antirollback-counter = <&non_trusted_nv_counter>;

			nt_fw_content_pk: nt_fw_content_pk {
				oid = NON_TRUSTED_FW_CONTENT_CERT_PK_OID;
			};
		};

		non_trusted_fw_content_cert: non_trusted_fw_content_cert {
			image-id = <NON_TRUSTED_FW_CONTENT_CERT_ID>;
			parent = <&non_trusted_fw_key_cert>;
			signing-key = <&nt_fw_content_pk>;
			antirollback-counter = <&non_trusted_nv_counter>;

			nt_world_bl_hash: nt_world_bl_hash {
				oid = NON_TRUSTED_WORLD_BOOTLOADER_HASH_OID;
			};
			nt_fw_config_hash: nt_fw_config_hash {
				oid = NON_TRUSTED_FW_CONFIG_HASH_OID;
			};
		};

#if defined(SPD_spmd)
150
151
		sip_sp_content_cert: sip_sp_content_cert {
			image-id = <SIP_SP_CONTENT_CERT_ID>;
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
			parent = <&trusted_key_cert>;
			signing-key = <&trusted_world_pk>;
			antirollback-counter = <&trusted_nv_counter>;

			sp_pkg1_hash: sp_pkg1_hash {
				oid = SP_PKG1_HASH_OID;
			};
			sp_pkg2_hash: sp_pkg2_hash {
				oid = SP_PKG2_HASH_OID;
			};
			sp_pkg3_hash: sp_pkg3_hash {
				oid = SP_PKG3_HASH_OID;
			};
			sp_pkg4_hash: sp_pkg4_hash {
				oid = SP_PKG4_HASH_OID;
			};
			sp_pkg5_hash: sp_pkg5_hash {
				oid = SP_PKG5_HASH_OID;
			};
			sp_pkg6_hash: sp_pkg6_hash {
				oid = SP_PKG6_HASH_OID;
			};
			sp_pkg7_hash: sp_pkg7_hash {
				oid = SP_PKG7_HASH_OID;
			};
			sp_pkg8_hash: sp_pkg8_hash {
				oid = SP_PKG8_HASH_OID;
			};
		};
#endif
	};

	images {
		compatible = "arm, img-descs";

		hw_config {
			image-id = <HW_CONFIG_ID>;
			parent = <&trusted_boot_fw_cert>;
			hash = <&hw_config_hash>;
		};

		tb_fw_config {
			image-id = <TB_FW_CONFIG_ID>;
			parent = <&trusted_boot_fw_cert>;
			hash = <&tb_fw_config_hash>;
		};

		scp_bl2_image {
			image-id = <SCP_BL2_IMAGE_ID>;
			parent = <&scp_fw_content_cert>;
			hash = <&scp_fw_hash>;
		};

		bl31_image {
			image-id = <BL31_IMAGE_ID>;
			parent = <&soc_fw_content_cert>;
			hash = <&soc_fw_hash>;
		};

		soc_fw_config {
			image-id = <SOC_FW_CONFIG_ID>;
			parent = <&soc_fw_content_cert>;
			hash = <&soc_fw_config_hash>;
		};

		bl32_image {
			image-id = <BL32_IMAGE_ID>;
			parent = <&trusted_os_fw_content_cert>;
			hash = <&tos_fw_hash>;
		};

		bl32_extra1_image {
			image-id = <BL32_EXTRA1_IMAGE_ID>;
			parent = <&trusted_os_fw_content_cert>;
			hash = <&tos_fw_extra1_hash>;
		};

		bl32_extra2_image {
			image-id = <BL32_EXTRA2_IMAGE_ID>;
			parent = <&trusted_os_fw_content_cert>;
			hash = <&tos_fw_extra2_hash>;
		};

		tos_fw_config {
			image-id = <TOS_FW_CONFIG_ID>;
			parent = <&trusted_os_fw_content_cert>;
			hash = <&tos_fw_config_hash>;
		};

		bl33_image {
			image-id = <BL33_IMAGE_ID>;
			parent = <&non_trusted_fw_content_cert>;
			hash = <&nt_world_bl_hash>;
		};

		nt_fw_config {
			image-id = <NT_FW_CONFIG_ID>;
			parent = <&non_trusted_fw_content_cert>;
			hash = <&nt_fw_config_hash>;
		};

#if defined(SPD_spmd)
		sp_pkg1 {
255
256
			image-id = <SP_PKG1_ID>;
			parent = <&sip_sp_content_cert>;
257
258
259
260
			hash = <&sp_pkg1_hash>;
		};

		sp_pkg2 {
261
262
			image-id = <SP_PKG2_ID>;
			parent = <&sip_sp_content_cert>;
263
264
265
266
			hash = <&sp_pkg2_hash>;
		};

		sp_pkg3 {
267
268
			image-id = <SP_PKG3_ID>;
			parent = <&sip_sp_content_cert>;
269
270
271
272
			hash = <&sp_pkg3_hash>;
		};

		sp_pkg4 {
273
274
			image-id = <SP_PKG4_ID>;
			parent = <&sip_sp_content_cert>;
275
276
277
278
			hash = <&sp_pkg4_hash>;
		};

		sp_pkg5 {
279
280
			image-id = <SP_PKG5_ID>;
			parent = <&sip_sp_content_cert>;
281
282
283
284
			hash = <&sp_pkg5_hash>;
		};

		sp_pkg6 {
285
286
			image-id = <SP_PKG6_ID>;
			parent = <&sip_sp_content_cert>;
287
288
289
290
			hash = <&sp_pkg6_hash>;
		};

		sp_pkg7 {
291
292
			image-id = <SP_PKG7_ID>;
			parent = <&sip_sp_content_cert>;
293
294
295
296
			hash = <&sp_pkg7_hash>;
		};

		sp_pkg8 {
297
298
			image-id = <SP_PKG8_ID>;
			parent = <&sip_sp_content_cert>;
299
300
301
302
303
304
			hash = <&sp_pkg8_hash>;
		};
#endif
	};
};

305
non_volatile_counters: non_volatile_counters {
306
307
308
309
310
	compatible = "arm, non-volatile-counter";

	#address-cells = <1>;
	#size-cells = <0>;

311
312
313
314
315
316
317
318
	trusted_nv_counter: trusted_nv_counter {
		id  = <TRUSTED_NV_CTR_ID>;
		oid = TRUSTED_FW_NVCOUNTER_OID;
	};

	non_trusted_nv_counter: non_trusted_nv_counter {
		id  = <NON_TRUSTED_NV_CTR_ID>;
		oid = NON_TRUSTED_FW_NVCOUNTER_OID;
319
320
	};
};