summaryrefslogtreecommitdiff
path: root/bl2
diff options
context:
space:
mode:
authorManish V Badarkhe <Manish.Badarkhe@arm.com>2021-12-16 10:41:47 +0000
committerManish V Badarkhe <Manish.Badarkhe@arm.com>2022-01-11 23:06:22 +0000
commit0aa0b3afd643379805440dddffffeb21dab52523 (patch)
treeb8997b5d18c41f0f095dc0486d06f2e1b9fabced /bl2
parentc9c56f6e2b8b53cf3b2da3ea1db7e889a7152c79 (diff)
downloadarm-trusted-firmware-0aa0b3afd643379805440dddffffeb21dab52523.tar.gz
refactor(measured-boot): avoid Measured-Boot dependency on Trusted-Boot
Measured-Boot and Trusted-Boot are orthogonal to each other and hence removed dependency of Trusted-Boot on Measured-Boot by making below changes - 1. BL1 and BL2 main functions are used for initializing Crypto module instead of the authentication module 2. Updated Crypto module registration macro for MEASURED_BOOT with only necessary callbacks for calculating image hashes 3. The 'load_auth_image' function is now used for the image measurement during Trusted or Non-Trusted Boot flow Change-Id: I3570e80bae8ce8f5b58d84bd955aa43e925d9fff Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Diffstat (limited to 'bl2')
-rw-r--r--bl2/bl2_main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bl2/bl2_main.c b/bl2/bl2_main.c
index 90fe39bc2..5da803795 100644
--- a/bl2/bl2_main.c
+++ b/bl2/bl2_main.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2021, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2022, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -13,6 +13,7 @@
#include <common/bl_common.h>
#include <common/debug.h>
#include <drivers/auth/auth_mod.h>
+#include <drivers/auth/crypto_mod.h>
#include <drivers/console.h>
#include <drivers/fwu/fwu.h>
#include <lib/extensions/pauth.h>
@@ -89,10 +90,10 @@ void bl2_main(void)
fwu_init();
#endif /* PSA_FWU_SUPPORT */
-#if TRUSTED_BOARD_BOOT
+ crypto_mod_init();
+
/* Initialize authentication module */
auth_mod_init();
-#endif /* TRUSTED_BOARD_BOOT */
/* Initialize the Measured Boot backend */
bl2_plat_mboot_init();