blob: 903985364420aea5e7d955bd55db4948613e5945 [file] [log] [blame]
Tamas Banede4f052022-09-16 16:26:15 +02001/*
Manish V Badarkhef7ca31b2023-06-16 13:04:23 +01002 * Copyright (c) 2022-2023, Arm Limited. All rights reserved.
Tamas Banede4f052022-09-16 16:26:15 +02003 *
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/rss/rss_measured_boot.h>
11#include <lib/psa/measured_boot.h>
12
13#include <plat/common/common_def.h>
14#include <platform_def.h>
15
16/* TC specific table with image IDs and metadata. Intentionally not a
17 * const struct, some members might set by bootloaders during trusted boot.
18 */
19struct rss_mboot_metadata tc_rss_mboot_metadata[] = {
20 {
21 .id = BL31_IMAGE_ID,
22 .slot = U(9),
23 .signer_id_size = SIGNER_ID_MIN_SIZE,
24 .sw_type = RSS_MBOOT_BL31_STRING,
25 .lock_measurement = true },
26 {
27 .id = HW_CONFIG_ID,
28 .slot = U(10),
29 .signer_id_size = SIGNER_ID_MIN_SIZE,
30 .sw_type = RSS_MBOOT_HW_CONFIG_STRING,
31 .lock_measurement = true },
32 {
33 .id = SOC_FW_CONFIG_ID,
34 .slot = U(11),
35 .signer_id_size = SIGNER_ID_MIN_SIZE,
36 .sw_type = RSS_MBOOT_SOC_FW_CONFIG_STRING,
37 .lock_measurement = true },
38 {
39 .id = RSS_MBOOT_INVALID_ID }
40};
41
42void bl2_plat_mboot_init(void)
43{
44 /* Initialize the communication channel between AP and RSS */
45 (void)rss_comms_init(PLAT_RSS_AP_SND_MHU_BASE,
46 PLAT_RSS_AP_RCV_MHU_BASE);
47
Manish V Badarkhef7ca31b2023-06-16 13:04:23 +010048 rss_measured_boot_init(tc_rss_mboot_metadata);
Tamas Banede4f052022-09-16 16:26:15 +020049}
50
51void bl2_plat_mboot_finish(void)
52{
53 /* Nothing to do. */
54}