mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-19 02:54:24 +00:00
Merge "fix(fvp): adjust BL2 maximum size as per total SRAM size" into integration
This commit is contained in:
commit
cd91aa17c9
1 changed files with 8 additions and 4 deletions
|
@ -205,14 +205,18 @@ defined(IMAGE_BL2) && MEASURED_BOOT
|
|||
#endif
|
||||
|
||||
/*
|
||||
* PLAT_ARM_MAX_BL2_SIZE is calculated using the current BL2 debug size plus a
|
||||
* little space for growth.
|
||||
* Set the maximum size of BL2 to be close to half of the Trusted SRAM.
|
||||
* Maximum size of BL2 increases as Trusted SRAM size increases.
|
||||
*/
|
||||
#if CRYPTO_SUPPORT
|
||||
#if (TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_RSA_AND_ECDSA) || COT_DESC_IN_DTB
|
||||
# define PLAT_ARM_MAX_BL2_SIZE (UL(0x1E000) - FVP_BL2_ROMLIB_OPTIMIZATION)
|
||||
# define PLAT_ARM_MAX_BL2_SIZE ((PLAT_ARM_TRUSTED_SRAM_SIZE / 2) - \
|
||||
(2 * PAGE_SIZE) - \
|
||||
FVP_BL2_ROMLIB_OPTIMIZATION)
|
||||
#else
|
||||
# define PLAT_ARM_MAX_BL2_SIZE (UL(0x1D000) - FVP_BL2_ROMLIB_OPTIMIZATION)
|
||||
# define PLAT_ARM_MAX_BL2_SIZE ((PLAT_ARM_TRUSTED_SRAM_SIZE / 2) - \
|
||||
(3 * PAGE_SIZE) - \
|
||||
FVP_BL2_ROMLIB_OPTIMIZATION)
|
||||
#endif
|
||||
#elif ARM_BL31_IN_DRAM
|
||||
/* When ARM_BL31_IN_DRAM is set, BL2 can use almost all of Trusted SRAM. */
|
||||
|
|
Loading…
Add table
Reference in a new issue