blob: fd80fdc0e96372ca372166f92694f6e2b11cd1ab [file] [log] [blame]
Tamas Banede4f052022-09-16 16:26:15 +02001/*
Tamas Ban5a637982023-06-05 11:13:16 +02002 * Copyright (c) 2022-2024, 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>
Tamas Ban5a637982023-06-05 11:13:16 +020010#include <drivers/measured_boot/metadata.h>
Tamas Banede4f052022-09-16 16:26:15 +020011#include <drivers/measured_boot/rss/rss_measured_boot.h>
Manish V Badarkhe4a2cc6b2023-07-12 10:21:38 +010012#include <tools_share/tbbr_oid.h>
Tamas Banede4f052022-09-16 16:26:15 +020013
14#include <plat/common/common_def.h>
15#include <platform_def.h>
16
17/* TC specific table with image IDs and metadata. Intentionally not a
18 * const struct, some members might set by bootloaders during trusted boot.
19 */
20struct rss_mboot_metadata tc_rss_mboot_metadata[] = {
21 {
22 .id = BL31_IMAGE_ID,
23 .slot = U(9),
24 .signer_id_size = SIGNER_ID_MIN_SIZE,
Tamas Ban5a637982023-06-05 11:13:16 +020025 .sw_type = MBOOT_BL31_IMAGE_STRING,
Manish V Badarkhe4a2cc6b2023-07-12 10:21:38 +010026 .pk_oid = BL31_IMAGE_KEY_OID,
Tamas Banede4f052022-09-16 16:26:15 +020027 .lock_measurement = true },
28 {
29 .id = HW_CONFIG_ID,
30 .slot = U(10),
31 .signer_id_size = SIGNER_ID_MIN_SIZE,
Tamas Ban5a637982023-06-05 11:13:16 +020032 .sw_type = MBOOT_HW_CONFIG_STRING,
Manish V Badarkhe4a2cc6b2023-07-12 10:21:38 +010033 .pk_oid = HW_CONFIG_KEY_OID,
Tamas Banede4f052022-09-16 16:26:15 +020034 .lock_measurement = true },
35 {
36 .id = SOC_FW_CONFIG_ID,
37 .slot = U(11),
38 .signer_id_size = SIGNER_ID_MIN_SIZE,
Tamas Ban5a637982023-06-05 11:13:16 +020039 .sw_type = MBOOT_SOC_FW_CONFIG_STRING,
Manish V Badarkhe4a2cc6b2023-07-12 10:21:38 +010040 .pk_oid = SOC_FW_CONFIG_KEY_OID,
Tamas Banede4f052022-09-16 16:26:15 +020041 .lock_measurement = true },
42 {
43 .id = RSS_MBOOT_INVALID_ID }
44};
45
46void bl2_plat_mboot_init(void)
47{
48 /* Initialize the communication channel between AP and RSS */
49 (void)rss_comms_init(PLAT_RSS_AP_SND_MHU_BASE,
50 PLAT_RSS_AP_RCV_MHU_BASE);
51
Manish V Badarkhef7ca31b2023-06-16 13:04:23 +010052 rss_measured_boot_init(tc_rss_mboot_metadata);
Tamas Banede4f052022-09-16 16:26:15 +020053}
54
55void bl2_plat_mboot_finish(void)
56{
57 /* Nothing to do. */
58}