/*
 * Copyright (c) 2020-2024, Arm Limited. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#if USE_TBBR_DEFS
#include <tools_share/tbbr_oid.h>
#else
#include <platform_oid.h>
#endif

#include <common/tbbr/tbbr_img_def.h>
#include <common/nv_cntr_ids.h>

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_ctr>;

			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_ctr>;

			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_ctr>;

			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_ctr>;

			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_ctr>;
			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_ctr>;

			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_ctr>;

			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_ctr>;

			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_ctr>;

			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_ctr>;

			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)
		sip_sp_content_cert: sip_sp_content_cert {
			image-id = <SIP_SP_CONTENT_CERT_ID>;
			parent = <&trusted_key_cert>;
			signing-key = <&trusted_world_pk>;
			antirollback-counter = <&trusted_nv_ctr>;

			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>;
		};

		fw_config {
			image-id = <FW_CONFIG_ID>;
			parent = <&trusted_boot_fw_cert>;
			hash = <&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 {
			image-id = <SP_PKG1_ID>;
			parent = <&sip_sp_content_cert>;
			hash = <&sp_pkg1_hash>;
		};

		sp_pkg2 {
			image-id = <SP_PKG2_ID>;
			parent = <&sip_sp_content_cert>;
			hash = <&sp_pkg2_hash>;
		};

		sp_pkg3 {
			image-id = <SP_PKG3_ID>;
			parent = <&sip_sp_content_cert>;
			hash = <&sp_pkg3_hash>;
		};

		sp_pkg4 {
			image-id = <SP_PKG4_ID>;
			parent = <&sip_sp_content_cert>;
			hash = <&sp_pkg4_hash>;
		};

		sp_pkg5 {
			image-id = <SP_PKG5_ID>;
			parent = <&sip_sp_content_cert>;
			hash = <&sp_pkg5_hash>;
		};

		sp_pkg6 {
			image-id = <SP_PKG6_ID>;
			parent = <&sip_sp_content_cert>;
			hash = <&sp_pkg6_hash>;
		};

		sp_pkg7 {
			image-id = <SP_PKG7_ID>;
			parent = <&sip_sp_content_cert>;
			hash = <&sp_pkg7_hash>;
		};

		sp_pkg8 {
			image-id = <SP_PKG8_ID>;
			parent = <&sip_sp_content_cert>;
			hash = <&sp_pkg8_hash>;
		};
#endif
	};
};

non_volatile_counters: non_volatile_counters {
	compatible = "arm, non-volatile-counter";

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

	trusted_nv_ctr: trusted_nv_ctr {
		id  = <TRUSTED_NV_CTR_ID>;
		oid = TRUSTED_FW_NVCOUNTER_OID;
	};

	non_trusted_nv_ctr: non_trusted_nv_ctr {
		id  = <NON_TRUSTED_NV_CTR_ID>;
		oid = NON_TRUSTED_FW_NVCOUNTER_OID;
	};
};
