blob: 6821a6ab5e98d6a496afb71c3c4d9989034ab17f [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>
Manish V Badarkhe4a2cc6b2023-07-12 10:21:38 +010012#include <tools_share/zero_oid.h>
Tamas Banede4f052022-09-16 16:26:15 +020013
14#include <plat/arm/common/plat_arm.h>
15#include <platform_def.h>
16
17/* Table with platform specific 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 = FW_CONFIG_ID,
23 .slot = U(6),
24 .signer_id_size = SIGNER_ID_MIN_SIZE,
25 .sw_type = RSS_MBOOT_FW_CONFIG_STRING,
Manish V Badarkhe4a2cc6b2023-07-12 10:21:38 +010026 .pk_oid = ZERO_OID,
Tamas Banede4f052022-09-16 16:26:15 +020027 .lock_measurement = true },
28 {
29 .id = TB_FW_CONFIG_ID,
30 .slot = U(7),
31 .signer_id_size = SIGNER_ID_MIN_SIZE,
32 .sw_type = RSS_MBOOT_TB_FW_CONFIG_STRING,
Manish V Badarkhe4a2cc6b2023-07-12 10:21:38 +010033 .pk_oid = ZERO_OID,
Tamas Banede4f052022-09-16 16:26:15 +020034 .lock_measurement = true },
35 {
36 .id = BL2_IMAGE_ID,
37 .slot = U(8),
38 .signer_id_size = SIGNER_ID_MIN_SIZE,
39 .sw_type = RSS_MBOOT_BL2_STRING,
Manish V Badarkhe4a2cc6b2023-07-12 10:21:38 +010040 .pk_oid = ZERO_OID,
Tamas Banede4f052022-09-16 16:26:15 +020041 .lock_measurement = true },
42
43 {
44 .id = RSS_MBOOT_INVALID_ID }
45};
46
47void 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
Manish V Badarkhef7ca31b2023-06-16 13:04:23 +010053 rss_measured_boot_init(tc_rss_mboot_metadata);
Tamas Banede4f052022-09-16 16:26:15 +020054}
55
56void bl1_plat_mboot_finish(void)
57{
58 /* Nothing to do. */
59}