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