diff --git a/docs/auth-framework.md b/docs/auth-framework.md index 531505b..b416acf 100644 --- a/docs/auth-framework.md +++ b/docs/auth-framework.md @@ -909,9 +909,13 @@ ``` The key algorithm (rsa, ecdsa) must be specified in the build system using the -`MBEDTLS_KEY_ALG` variable, so the Makefile can include the corresponding +`TF_MBEDTLS_KEY_ALG` variable, so the Makefile can include the corresponding sources in the build. +Note: If code size is a concern, the build option `MBEDTLS_SHA256_SMALLER` can +be defined in the platform Makefile. It will make mbed TLS use an implementation +of SHA-256 with smaller memory footprint (~1.5 KB less) but slower (~30%). + - - - - - - - - - - - - - - - - - - - - - - - - - - _Copyright (c) 2015, ARM Limited and Contributors. All rights reserved._ diff --git a/plat/arm/common/arm_common.mk b/plat/arm/common/arm_common.mk index 58fc94e..38c8cf8 100644 --- a/plat/arm/common/arm_common.mk +++ b/plat/arm/common/arm_common.mk @@ -76,6 +76,10 @@ $(eval $(call assert_boolean,ARM_XLAT_TABLES_LIB_V1)) $(eval $(call add_define,ARM_XLAT_TABLES_LIB_V1)) +# Use an implementation of SHA-256 with a smaller memory footprint but reduced +# speed. +$(eval $(call add_define,MBEDTLS_SHA256_SMALLER)) + # Enable PSCI_STAT_COUNT/RESIDENCY APIs on ARM platforms ENABLE_PSCI_STAT := 1 ENABLE_PMF := 1