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

#include <tools_share/tbbr_oid.h>
#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_counter>;

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

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

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

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

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

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

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

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

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

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

		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_counter: trusted_nv_counter {
		id  = <TRUSTED_NV_CTR_ID>;
		oid = TRUSTED_FW_NVCOUNTER_OID;
	};

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