test_invalid_missing_root.dtsi 4.9 KB

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