From 3f498b0dc282f6229b0a894ba61dc1948c4fb384 Mon Sep 17 00:00:00 2001 From: Alexei Fedorov Date: Mon, 13 Jul 2020 14:06:47 +0100 Subject: TF-A: Add support for Measured Boot driver in BL1 and BL2 This patch adds support for Measured Boot driver functionality in BL1 and BL2 code. Change-Id: I7239a94c3e32b0a3e9e73768a0140e0b52ab0361 Signed-off-by: Alexei Fedorov --- bl2/bl2_main.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'bl2/bl2_main.c') diff --git a/bl2/bl2_main.c b/bl2/bl2_main.c index 802c17464..203e1d4b1 100644 --- a/bl2/bl2_main.c +++ b/bl2/bl2_main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2013-2020, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -14,6 +14,9 @@ #include #include #include +#if MEASURED_BOOT +#include +#endif #include #include @@ -88,14 +91,25 @@ void bl2_main(void) #if TRUSTED_BOARD_BOOT /* Initialize authentication module */ auth_mod_init(); + +#if MEASURED_BOOT + /* Initialize measured boot module */ + measured_boot_init(); + +#endif /* MEASURED_BOOT */ #endif /* TRUSTED_BOARD_BOOT */ - /* initialize boot source */ + /* Initialize boot source */ bl2_plat_preload_setup(); /* Load the subsequent bootloader images. */ next_bl_ep_info = bl2_load_images(); +#if MEASURED_BOOT + /* Finalize measured boot */ + measured_boot_finish(); +#endif /* MEASURED_BOOT */ + #if !BL2_AT_EL3 #ifndef __aarch64__ /* -- cgit v1.2.3