blob: 7ea2c2ec473301f0f7318b0336f8e0cfe1761e36 [file] [log] [blame]
Tamas Banede4f052022-09-16 16:26:15 +02001/*
2 * Copyright (c) 2022, 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/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
48 rss_measured_boot_init();
49}
50
51void bl2_plat_mboot_finish(void)
52{
53 /* Nothing to do. */
54}