mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 18:14:24 +00:00

Implemented 'plat_mboot_measure_key' platform function for TC platform to measure and publicise the public key information via RSS. Change-Id: I10d90e921b135e729d5450d5a7468d0598072e60 Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
59 lines
1.4 KiB
C
59 lines
1.4 KiB
C
/*
|
|
* Copyright (c) 2022-2023, Arm Limited. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <drivers/arm/rss_comms.h>
|
|
#include <drivers/measured_boot/rss/rss_measured_boot.h>
|
|
#include <lib/psa/measured_boot.h>
|
|
#include <tools_share/zero_oid.h>
|
|
|
|
#include <plat/arm/common/plat_arm.h>
|
|
#include <platform_def.h>
|
|
|
|
/* Table with platform specific image IDs and metadata. Intentionally not a
|
|
* const struct, some members might set by bootloaders during trusted boot.
|
|
*/
|
|
struct rss_mboot_metadata tc_rss_mboot_metadata[] = {
|
|
{
|
|
.id = FW_CONFIG_ID,
|
|
.slot = U(6),
|
|
.signer_id_size = SIGNER_ID_MIN_SIZE,
|
|
.sw_type = RSS_MBOOT_FW_CONFIG_STRING,
|
|
.pk_oid = ZERO_OID,
|
|
.lock_measurement = true },
|
|
{
|
|
.id = TB_FW_CONFIG_ID,
|
|
.slot = U(7),
|
|
.signer_id_size = SIGNER_ID_MIN_SIZE,
|
|
.sw_type = RSS_MBOOT_TB_FW_CONFIG_STRING,
|
|
.pk_oid = ZERO_OID,
|
|
.lock_measurement = true },
|
|
{
|
|
.id = BL2_IMAGE_ID,
|
|
.slot = U(8),
|
|
.signer_id_size = SIGNER_ID_MIN_SIZE,
|
|
.sw_type = RSS_MBOOT_BL2_STRING,
|
|
.pk_oid = ZERO_OID,
|
|
.lock_measurement = true },
|
|
|
|
{
|
|
.id = RSS_MBOOT_INVALID_ID }
|
|
};
|
|
|
|
void bl1_plat_mboot_init(void)
|
|
{
|
|
/* Initialize the communication channel between AP and RSS */
|
|
(void)rss_comms_init(PLAT_RSS_AP_SND_MHU_BASE,
|
|
PLAT_RSS_AP_RCV_MHU_BASE);
|
|
|
|
rss_measured_boot_init(tc_rss_mboot_metadata);
|
|
}
|
|
|
|
void bl1_plat_mboot_finish(void)
|
|
{
|
|
/* Nothing to do. */
|
|
}
|