]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
feat(fvp): add crypto support in BL31
authorManish V Badarkhe <manish.badarkhe@arm.com>
Fri, 25 Feb 2022 09:06:57 +0000 (09:06 +0000)
committerManish V Badarkhe <Manish.Badarkhe@arm.com>
Wed, 5 Oct 2022 14:25:28 +0000 (15:25 +0100)
DRTM implementation needs crypto support in BL31 to calculate
hash of various DRTM components

Signed-off-by: Manish V Badarkhe <manish.badarkhe@arm.com>
Change-Id: I659ce8e54550946db253d23f150cca8b2fa7b880

plat/arm/board/fvp/platform.mk
plat/arm/common/arm_common.mk
plat/arm/common/arm_dyn_cfg.c

index 811b2754b76d65e78c114c1b7f3a17e159c999f7..46022761211abfdca6aac47d4fc23dd8c56ddfa4 100644 (file)
@@ -414,7 +414,8 @@ endif
 endif
 
 ifeq (${DRTM_SUPPORT}, 1)
-BL31_SOURCES   += plat/arm/board/fvp/fvp_drtm_dma_prot.c
+BL31_SOURCES   += plat/arm/board/fvp/fvp_drtm_dma_prot.c       \
+                 plat/arm/common/arm_dyn_cfg.c
 endif
 
 ifeq (${TRUSTED_BOARD_BOOT}, 1)
index bd59ec00a8a001e495fdf128d32126a02537243a..5dda4853bfbc15f28b7ce06536194d69f7b4e814 100644 (file)
@@ -419,11 +419,12 @@ ifeq (${MEASURED_BOOT},1)
     BL2_SOURCES                +=      ${EVENT_LOG_SOURCES}
 endif
 
-ifneq ($(filter 1,${MEASURED_BOOT} ${TRUSTED_BOARD_BOOT}),)
+ifneq ($(filter 1,${MEASURED_BOOT} ${TRUSTED_BOARD_BOOT} ${DRTM_SUPPORT}),)
     CRYPTO_SOURCES     :=      drivers/auth/crypto_mod.c       \
                                lib/fconf/fconf_tbbr_getter.c
     BL1_SOURCES                +=      ${CRYPTO_SOURCES}
     BL2_SOURCES                +=      ${CRYPTO_SOURCES}
+    BL31_SOURCES       +=      drivers/auth/crypto_mod.c
 
     # We expect to locate the *.mk files under the directories specified below
     ifeq (${ARM_CRYPTOCELL_INTEG},0)
index a62693c50742322cf73fa7fb5c869bbbc1d7f053..c88621e37ba4d49dabf82bce9449ee073625190d 100644 (file)
@@ -45,7 +45,7 @@ int arm_get_mbedtls_heap(void **heap_addr, size_t *heap_size)
        assert(heap_addr != NULL);
        assert(heap_size != NULL);
 
-#if defined(IMAGE_BL1) || BL2_AT_EL3
+#if defined(IMAGE_BL1) || BL2_AT_EL3 || defined(IMAGE_BL31)
 
        /* If in BL1 or BL2_AT_EL3 define a heap */
        static unsigned char heap[TF_MBEDTLS_HEAP_SIZE];