Debian Codegraph @

tools/cot_dt2c/tests/test_invalid_missing_root.dtsi

raw
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 root certificate
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
15 cot {
16 manifests {
17 compatible = "arm, cert-descs";
18
19 core_swd_key_cert: core_swd_key_cert {
20 image-id = <CORE_SWD_KEY_CERT_ID>;
21 signing-key = <&swd_rot_pk>;
22 antirollback-counter = <&trusted_nv_ctr>;
23
24 core_swd_pk: core_swd_pk {
25 oid = CORE_SWD_PK_OID;
26 };
27 };
28
29 trusted_os_fw_content_cert: trusted_os_fw_content_cert {
30 image-id = <TRUSTED_OS_FW_CONTENT_CERT_ID>;
31 parent = <&core_swd_key_cert>;
32 signing-key = <&core_swd_pk>;
33 antirollback-counter = <&trusted_nv_ctr>;
34
35 tos_fw_hash: tos_fw_hash {
36 oid = TRUSTED_OS_FW_HASH_OID;
37 };
38 tos_fw_config_hash: tos_fw_config_hash {
39 oid = TRUSTED_OS_FW_CONFIG_HASH_OID;
40 };
41 };
42
43 plat_key_cert: plat_key_cert {
44 image-id = <PLAT_KEY_CERT_ID>;
45 signing-key = <&prot_pk>;
46 antirollback-counter = <&non_trusted_nv_ctr>;
47
48 plat_pk: plat_pk {
49 oid = PLAT_PK_OID;
50 };
51 };
52
53 non_trusted_fw_content_cert: non_trusted_fw_content_cert {
54 image-id = <NON_TRUSTED_FW_CONTENT_CERT_ID>;
55 parent = <&plat_key_cert>;
56 signing-key = <&plat_pk>;
57 antirollback-counter = <&non_trusted_nv_ctr>;
58
59 nt_world_bl_hash: nt_world_bl_hash {
60 oid = NON_TRUSTED_WORLD_BOOTLOADER_HASH_OID;
61 };
62 nt_fw_config_hash: nt_fw_config_hash {
63 oid = NON_TRUSTED_FW_CONFIG_HASH_OID;
64 };
65 };
66
67 #if defined(SPD_spmd)
68 sip_sp_content_cert: sip_sp_content_cert {
69 image-id = <SIP_SP_CONTENT_CERT_ID>;
70 parent = <&core_swd_key_cert>;
71 signing-key = <&core_swd_pk>;
72 antirollback-counter = <&trusted_nv_ctr>;
73
74 sp_pkg1_hash: sp_pkg1_hash {
75 oid = SP_PKG1_HASH_OID;
76 };
77 sp_pkg2_hash: sp_pkg2_hash {
78 oid = SP_PKG2_HASH_OID;
79 };
80 sp_pkg3_hash: sp_pkg3_hash {
81 oid = SP_PKG3_HASH_OID;
82 };
83 sp_pkg4_hash: sp_pkg4_hash {
84 oid = SP_PKG4_HASH_OID;
85 };
86 };
87
88 plat_sp_content_cert: plat_sp_content_cert {
89 image-id = <PLAT_SP_CONTENT_CERT_ID>;
90 parent = <&plat_key_cert>;
91 signing-key = <&plat_pk>;
92 antirollback-counter = <&non_trusted_nv_ctr>;
93
94 sp_pkg5_hash: sp_pkg5_hash {
95 oid = SP_PKG5_HASH_OID;
96 };
97 sp_pkg6_hash: sp_pkg6_hash {
98 oid = SP_PKG6_HASH_OID;
99 };
100 sp_pkg7_hash: sp_pkg7_hash {
101 oid = SP_PKG7_HASH_OID;
102 };
103 sp_pkg8_hash: sp_pkg8_hash {
104 oid = SP_PKG8_HASH_OID;
105 };
106 };
107 #endif
108 };
109
110 images {
111 compatible = "arm, img-descs";
112
113 hw_config {
114 image-id = <HW_CONFIG_ID>;
115 parent = <&cca_content_cert>;
116 hash = <&hw_config_hash>;
117 };
118
119 bl31_image {
120 image-id = <BL31_IMAGE_ID>;
121 parent = <&cca_content_cert>;
122 hash = <&soc_fw_hash>;
123 };
124
125 soc_fw_config {
126 image-id = <SOC_FW_CONFIG_ID>;
127 parent = <&cca_content_cert>;
128 hash = <&soc_fw_config_hash>;
129 };
130
131 rmm_image {
132 image-id = <RMM_IMAGE_ID>;
133 parent = <&cca_content_cert>;
134 hash = <&rmm_hash>;
135 };
136
137 bl32_image {
138 image-id = <BL32_IMAGE_ID>;
139 parent = <&trusted_os_fw_content_cert>;
140 hash = <&tos_fw_hash>;
141 };
142
143 tos_fw_config {
144 image-id = <TOS_FW_CONFIG_ID>;
145 parent = <&trusted_os_fw_content_cert>;
146 hash = <&tos_fw_config_hash>;
147 };
148
149 bl33_image {
150 image-id = <BL33_IMAGE_ID>;
151 parent = <&non_trusted_fw_content_cert>;
152 hash = <&nt_world_bl_hash>;
153 };
154
155 nt_fw_config {
156 image-id = <NT_FW_CONFIG_ID>;
157 parent = <&non_trusted_fw_content_cert>;
158 hash = <&nt_fw_config_hash>;
159 };
160
161 #if defined(SPD_spmd)
162 sp_pkg1 {
163 image-id = <SP_PKG1_ID>;
164 parent = <&sip_sp_content_cert>;
165 hash = <&sp_pkg1_hash>;
166 };
167
168 sp_pkg2 {
169 image-id = <SP_PKG2_ID>;
170 parent = <&sip_sp_content_cert>;
171 hash = <&sp_pkg2_hash>;
172 };
173
174 sp_pkg3 {
175 image-id = <SP_PKG3_ID>;
176 parent = <&sip_sp_content_cert>;
177 hash = <&sp_pkg3_hash>;
178 };
179
180 sp_pkg4 {
181 image-id = <SP_PKG4_ID>;
182 parent = <&sip_sp_content_cert>;
183 hash = <&sp_pkg4_hash>;
184 };
185
186 sp_pkg5 {
187 image-id = <SP_PKG5_ID>;
188 parent = <&plat_sp_content_cert>;
189 hash = <&sp_pkg5_hash>;
190 };
191
192 sp_pkg6 {
193 image-id = <SP_PKG6_ID>;
194 parent = <&plat_sp_content_cert>;
195 hash = <&sp_pkg6_hash>;
196 };
197
198 sp_pkg7 {
199 image-id = <SP_PKG7_ID>;
200 parent = <&plat_sp_content_cert>;
201 hash = <&sp_pkg7_hash>;
202 };
203
204 sp_pkg8 {
205 image-id = <SP_PKG8_ID>;
206 parent = <&plat_sp_content_cert>;
207 hash = <&sp_pkg8_hash>;
208 };
209 #endif
210 };
211 };
212
213 non_volatile_counters: non_volatile_counters {
214 compatible = "arm, non-volatile-counter";
215
216 #address-cells = <1>;
217 #size-cells = <0>;
218
219 cca_nv_ctr: cca_nv_ctr {
220 id = <TRUSTED_NV_CTR_ID>;
221 oid = CCA_FW_NVCOUNTER_OID;
222 };
223
224 trusted_nv_ctr: trusted_nv_ctr {
225 id = <TRUSTED_NV_CTR_ID>;
226 oid = TRUSTED_FW_NVCOUNTER_OID;
227 };
228
229 non_trusted_nv_ctr: non_trusted_nv_ctr {
230 id = <NON_TRUSTED_NV_CTR_ID>;
231 oid = NON_TRUSTED_FW_NVCOUNTER_OID;
232 };
233 };
234
235 rot_keys {
236 swd_rot_pk: swd_rot_pk {
237 oid = SWD_ROT_PK_OID;
238 };
239 prot_pk: prot_pk {
240 oid = PROT_PK_OID;
241 };
242 };