mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 17:44:19 +00:00

It looks safer and cleaner approach to record the measurement taken by BL1 straightaway in TCG Event Log instead of deferring these recordings to BL2. Hence pull in the full-fledged measured boot driver into BL1 that replaces the former ad-hoc platform interfaces i.e. bl1_plat_set_bl2_hash, bl2_plat_get_hash. As a result of this change the BL1 of Arm FVP platform now do the measurements and recordings of below images: 1. FW_CONFIG 2. TB_FW_CONFIG 3. BL2 Change-Id: I798c20336308b5e91b547da4f8ed57c24d490731 Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
35 lines
859 B
C
35 lines
859 B
C
/*
|
|
* Copyright (c) 2021, 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/event_log/event_log.h>
|
|
#include <plat/arm/common/plat_arm.h>
|
|
#include <plat/common/platform.h>
|
|
|
|
extern event_log_metadata_t fvp_event_log_metadata[];
|
|
|
|
const event_log_metadata_t *plat_event_log_get_metadata(void)
|
|
{
|
|
return fvp_event_log_metadata;
|
|
}
|
|
|
|
int plat_mboot_measure_image(unsigned int image_id, image_info_t *image_data)
|
|
{
|
|
/* Calculate image hash and record data in Event Log */
|
|
int err = event_log_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", image_id, err);
|
|
return err;
|
|
}
|
|
|
|
return 0;
|
|
}
|