xref: /rk3399_ARM-atf/tools/cot_dt2c/tests/test_invalid_missing_attribute.dtsi (revision e264b5573952c72805a14e69e438168c00163e9a)
1/*
2 * Copyright (c) 2024, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 * This file provide a malformed CoT DT file that there
7 * are image/certificate that missing mandantory attributes
8 *
9 */
10
11#include <tools_share/cca_oid.h>
12#include <common/tbbr/tbbr_img_def.h>
13#include <common/nv_cntr_ids.h>
14
15cot {
16	manifests {
17		compatible = "arm, cert-descs";
18
19		cca_content_cert: cca_content_cert {
20			root-certificate;
21			antirollback-counter = <&cca_nv_ctr>;
22
23			tb_fw_hash: tb_fw_hash {
24				oid = TRUSTED_BOOT_FW_HASH_OID;
25			};
26			tb_fw_config_hash: tb_fw_config_hash {
27				oid = TRUSTED_BOOT_FW_CONFIG_HASH_OID;
28			};
29			hw_config_hash: hw_config_hash {
30			};
31			fw_config_hash: fw_config_hash {
32				oid = FW_CONFIG_HASH_OID;
33			};
34			soc_fw_hash: soc_fw_hash {
35				oid = SOC_AP_FW_HASH_OID;
36			};
37			soc_fw_config_hash: soc_fw_config_hash {
38				oid = SOC_FW_CONFIG_HASH_OID;
39			};
40			rmm_hash: rmm_hash {
41				oid = RMM_HASH_OID;
42			};
43		};
44
45		core_swd_key_cert: core_swd_key_cert {
46			root-certificate;
47			image-id = <CORE_SWD_KEY_CERT_ID>;
48			signing-key = <&swd_rot_pk>;
49			antirollback-counter = <&trusted_nv_ctr>;
50
51			core_swd_pk: core_swd_pk {
52				oid = CORE_SWD_PK_OID;
53			};
54		};
55
56		trusted_os_fw_content_cert: trusted_os_fw_content_cert {
57			image-id = <TRUSTED_OS_FW_CONTENT_CERT_ID>;
58			parent = <&core_swd_key_cert>;
59			signing-key = <&core_swd_pk>;
60			antirollback-counter = <&trusted_nv_ctr>;
61
62			tos_fw_hash: tos_fw_hash {
63				oid = TRUSTED_OS_FW_HASH_OID;
64			};
65			tos_fw_config_hash: tos_fw_config_hash {
66				oid = TRUSTED_OS_FW_CONFIG_HASH_OID;
67			};
68		};
69
70		plat_key_cert: plat_key_cert {
71			root-certificate;
72			image-id = <PLAT_KEY_CERT_ID>;
73			signing-key = <&prot_pk>;
74			antirollback-counter = <&non_trusted_nv_ctr>;
75
76			plat_pk: plat_pk {
77				oid = PLAT_PK_OID;
78			};
79		};
80
81		non_trusted_fw_content_cert: non_trusted_fw_content_cert {
82			image-id = <NON_TRUSTED_FW_CONTENT_CERT_ID>;
83			parent = <&plat_key_cert>;
84			signing-key = <&plat_pk>;
85			antirollback-counter = <&non_trusted_nv_ctr>;
86
87			nt_world_bl_hash: nt_world_bl_hash {
88				oid = NON_TRUSTED_WORLD_BOOTLOADER_HASH_OID;
89			};
90			nt_fw_config_hash: nt_fw_config_hash {
91				oid = NON_TRUSTED_FW_CONFIG_HASH_OID;
92			};
93		};
94
95#if defined(SPD_spmd)
96		sip_sp_content_cert: sip_sp_content_cert {
97			image-id = <SIP_SP_CONTENT_CERT_ID>;
98			parent = <&core_swd_key_cert>;
99			signing-key = <&core_swd_pk>;
100			antirollback-counter = <&trusted_nv_ctr>;
101
102			sp_pkg1_hash: sp_pkg1_hash {
103				oid = SP_PKG1_HASH_OID;
104			};
105			sp_pkg2_hash: sp_pkg2_hash {
106				oid = SP_PKG2_HASH_OID;
107			};
108			sp_pkg3_hash: sp_pkg3_hash {
109				oid = SP_PKG3_HASH_OID;
110			};
111			sp_pkg4_hash: sp_pkg4_hash {
112				oid = SP_PKG4_HASH_OID;
113			};
114		};
115
116		plat_sp_content_cert: plat_sp_content_cert {
117			parent = <&plat_key_cert>;
118			signing-key = <&plat_pk>;
119			antirollback-counter = <&non_trusted_nv_ctr>;
120
121			sp_pkg5_hash: sp_pkg5_hash {
122				oid = SP_PKG5_HASH_OID;
123			};
124			sp_pkg6_hash: sp_pkg6_hash {
125				oid = SP_PKG6_HASH_OID;
126			};
127			sp_pkg7_hash: sp_pkg7_hash {
128				oid = SP_PKG7_HASH_OID;
129			};
130			sp_pkg8_hash: sp_pkg8_hash {
131				oid = SP_PKG8_HASH_OID;
132			};
133		};
134#endif
135	};
136
137	images {
138		compatible = "arm, img-descs";
139
140		hw_config {
141			image-id = <HW_CONFIG_ID>;
142			hash = <&hw_config_hash>;
143		};
144
145		bl31_image {
146			image-id = <BL31_IMAGE_ID>;
147			parent = <&cca_content_cert>;
148			hash = <&soc_fw_hash>;
149		};
150
151		soc_fw_config {
152			image-id = <SOC_FW_CONFIG_ID>;
153			parent = <&cca_content_cert>;
154			hash = <&soc_fw_config_hash>;
155		};
156
157		rmm_image {
158			image-id = <RMM_IMAGE_ID>;
159			parent = <&cca_content_cert>;
160			hash = <&rmm_hash>;
161		};
162
163		bl32_image {
164			image-id = <BL32_IMAGE_ID>;
165			parent = <&trusted_os_fw_content_cert>;
166			hash = <&tos_fw_hash>;
167		};
168
169		tos_fw_config {
170			image-id = <TOS_FW_CONFIG_ID>;
171			parent = <&trusted_os_fw_content_cert>;
172			hash = <&tos_fw_config_hash>;
173		};
174
175		bl33_image {
176			image-id = <BL33_IMAGE_ID>;
177			parent = <&non_trusted_fw_content_cert>;
178			hash = <&nt_world_bl_hash>;
179		};
180
181		nt_fw_config {
182			image-id = <NT_FW_CONFIG_ID>;
183			parent = <&non_trusted_fw_content_cert>;
184			hash = <&nt_fw_config_hash>;
185		};
186
187#if defined(SPD_spmd)
188		sp_pkg1 {
189			parent = <&sip_sp_content_cert>;
190			hash = <&sp_pkg1_hash>;
191		};
192
193		sp_pkg2 {
194			image-id = <SP_PKG2_ID>;
195			parent = <&sip_sp_content_cert>;
196			hash = <&sp_pkg2_hash>;
197		};
198
199		sp_pkg3 {
200			image-id = <SP_PKG3_ID>;
201			parent = <&sip_sp_content_cert>;
202			hash = <&sp_pkg3_hash>;
203		};
204
205		sp_pkg4 {
206			image-id = <SP_PKG4_ID>;
207			parent = <&sip_sp_content_cert>;
208			hash = <&sp_pkg4_hash>;
209		};
210
211		sp_pkg5 {
212			image-id = <SP_PKG5_ID>;
213			parent = <&plat_sp_content_cert>;
214			hash = <&sp_pkg5_hash>;
215		};
216
217		sp_pkg6 {
218			image-id = <SP_PKG6_ID>;
219			parent = <&plat_sp_content_cert>;
220			hash = <&sp_pkg6_hash>;
221		};
222
223		sp_pkg7 {
224			image-id = <SP_PKG7_ID>;
225			parent = <&plat_sp_content_cert>;
226			hash = <&sp_pkg7_hash>;
227		};
228
229		sp_pkg8 {
230			image-id = <SP_PKG8_ID>;
231			parent = <&plat_sp_content_cert>;
232			hash = <&sp_pkg8_hash>;
233		};
234#endif
235	};
236};
237
238non_volatile_counters: non_volatile_counters {
239	compatible = "arm, non-volatile-counter";
240
241	#address-cells = <1>;
242	#size-cells = <0>;
243
244	cca_nv_ctr: cca_nv_ctr {
245		id  = <TRUSTED_NV_CTR_ID>;
246		oid = CCA_FW_NVCOUNTER_OID;
247	};
248
249	trusted_nv_ctr: trusted_nv_ctr {
250		id  = <TRUSTED_NV_CTR_ID>;
251		oid = TRUSTED_FW_NVCOUNTER_OID;
252	};
253
254	non_trusted_nv_ctr: non_trusted_nv_ctr {
255		id  = <NON_TRUSTED_NV_CTR_ID>;
256		oid = NON_TRUSTED_FW_NVCOUNTER_OID;
257	};
258};
259
260rot_keys {
261	swd_rot_pk: swd_rot_pk {
262		oid = SWD_ROT_PK_OID;
263	};
264	prot_pk: prot_pk {
265		oid = PROT_PK_OID;
266	};
267};
268