xref: /rk3399_ARM-atf/plat/arm/board/neoverse_rd/platform/rdv3/rdv3_bl1_measured_boot.c (revision c16e919803c0b9b75922895301331b22c790e531)
1 /*
2  * Copyright (c) 2024, Arm Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #include <stdint.h>
8 
9 #include <drivers/arm/rse_comms.h>
10 #include <drivers/measured_boot/rse/rse_measured_boot.h>
11 #include <lib/psa/measured_boot.h>
12 #include <plat/arm/common/plat_arm.h>
13 #include <platform_def.h>
14 
15 #include <nrd_plat.h>
16 #include <rdv3_rse_comms.h>
17 
18 /*
19  * Platform specific table with image IDs and metadata. Intentionally not a
20  * const struct, some members might set by bootloaders during trusted boot.
21  */
22 struct rse_mboot_metadata rdv3_rse_mboot_metadata[] = {
23 	{
24 		.id = FW_CONFIG_ID,
25 		.slot = U(8),
26 		.signer_id_size = SIGNER_ID_MIN_SIZE,
27 		.sw_type = MBOOT_FW_CONFIG_STRING,
28 		.lock_measurement = false
29 	},
30 	{
31 		.id = TB_FW_CONFIG_ID,
32 		.slot = U(9),
33 		.signer_id_size = SIGNER_ID_MIN_SIZE,
34 		.sw_type = MBOOT_TB_FW_CONFIG_STRING,
35 		.lock_measurement = false
36 	},
37 	{
38 		.id = BL2_IMAGE_ID,
39 		.slot = U(10),
40 		.signer_id_size = SIGNER_ID_MIN_SIZE,
41 		.sw_type = MBOOT_BL2_IMAGE_STRING,
42 		.lock_measurement = false
43 	},
44 	{
45 		.id = RSE_MBOOT_INVALID_ID
46 	}
47 };
48 
bl1_plat_mboot_init(void)49 void bl1_plat_mboot_init(void)
50 {
51 	/* Initialize the communication channel between AP and RSE */
52 	(void)plat_rse_comms_init();
53 
54 	rse_measured_boot_init(rdv3_rse_mboot_metadata);
55 }
56 
bl1_plat_mboot_finish(void)57 void bl1_plat_mboot_finish(void)
58 {
59 	/* Nothing to do. */
60 }
61