mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-08-14 16:37:05 +02:00
Measurements taken during boot are stored in RSS. These measurements are included in the platform attestation token. Change-Id: Iac3356f813fb417315681c718839319832a76191 Signed-off-by: David Vincze <david.vincze@arm.com> Signed-off-by: Tamas Ban <tamas.ban@arm.com>
36 lines
780 B
C
36 lines
780 B
C
|
|
/*
|
|
* Copyright (c) 2022, Arm Limited. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#include <assert.h>
|
|
#include <stdint.h>
|
|
|
|
#include <common/desc_image_load.h>
|
|
#include <drivers/measured_boot/rss/rss_measured_boot.h>
|
|
|
|
extern struct rss_mboot_metadata tc_rss_mboot_metadata[];
|
|
|
|
struct rss_mboot_metadata *plat_rss_mboot_get_metadata(void)
|
|
{
|
|
return tc_rss_mboot_metadata;
|
|
}
|
|
|
|
int plat_mboot_measure_image(unsigned int image_id, image_info_t *image_data)
|
|
{
|
|
int err;
|
|
|
|
/* Calculate image hash and record data in RSS */
|
|
err = rss_mboot_measure_and_record(image_data->image_base,
|
|
image_data->image_size,
|
|
image_id);
|
|
if (err != 0) {
|
|
ERROR("%s%s image id %u (%i)\n",
|
|
"Failed to ", "record in RSS", image_id, err);
|
|
}
|
|
|
|
return err;
|
|
}
|