xref: /rk3399_ARM-atf/plat/arm/board/tc/tc_bl1_dpe.c (revision 1f47a7133f7fe7fb038aca97fc93533964b2b429)
1 /*
2  * Copyright (c) 2024, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #include <stdint.h>
8 
9 #include <drivers/arm/rss_comms.h>
10 #include <drivers/measured_boot/metadata.h>
11 #include <drivers/measured_boot/rss/dice_prot_env.h>
12 #include <plat/arm/common/plat_arm.h>
13 #include <plat/common/platform.h>
14 #include <platform_def.h>
15 #include <tools_share/zero_oid.h>
16 
17 struct dpe_metadata tc_dpe_metadata[] = {
18 	{
19 		.id = FW_CONFIG_ID,
20 		.signer_id_size = SIGNER_ID_MIN_SIZE,
21 		.sw_type = MBOOT_FW_CONFIG_STRING,
22 		.allow_new_context_to_derive = false,
23 		.retain_parent_context = true,
24 		.create_certificate = false,
25 		.pk_oid = ZERO_OID },
26 	{
27 		.id = TB_FW_CONFIG_ID,
28 		.signer_id_size = SIGNER_ID_MIN_SIZE,
29 		.sw_type = MBOOT_TB_FW_CONFIG_STRING,
30 		.allow_new_context_to_derive = false,
31 		.retain_parent_context = true,
32 		.create_certificate = false,
33 		.pk_oid = ZERO_OID },
34 	{
35 		.id = BL2_IMAGE_ID,
36 		.signer_id_size = SIGNER_ID_MIN_SIZE,
37 		.sw_type = MBOOT_BL2_IMAGE_STRING,
38 		.allow_new_context_to_derive = true,
39 		.retain_parent_context = false,
40 		.create_certificate = false,
41 		.pk_oid = ZERO_OID },
42 	{
43 		.id = DPE_INVALID_ID }
44 };
45 
46 
47 void bl1_plat_mboot_init(void)
48 {
49 	/* Initialize the communication channel between AP and RSS */
50 	(void)rss_comms_init(PLAT_RSS_AP_SND_MHU_BASE,
51 			     PLAT_RSS_AP_RCV_MHU_BASE);
52 
53 	dpe_init(tc_dpe_metadata);
54 }
55 
56 void bl1_plat_mboot_finish(void)
57 {
58 	/* Nothing to do. */
59 }
60