From fdb9166b9494402eb2da7e0b004c121b322725e0 Mon Sep 17 00:00:00 2001 From: Madhukar Pappireddy Date: Wed, 16 Mar 2022 14:20:48 -0500 Subject: [PATCH] fix(fvp): disable reclaiming init code by default In anticipation of Spectre BHB workaround mitigation patches, we disable the RECLAIM_INIT_CODE for FVP platform. Since the spectre BHB mitigation workarounds inevitably increase the size of the various segments due to additional instructions and/or macros, these segments cannot be fit in the existing memory layout designated for BL31 image. The issue is specifically seen in complex build configs for FVP platform. One such config has TBB with Dual CoT and test secure payload dispatcher(TSPD) enabled. Even a small increase in individual segment size in order of few bytes might lead to build fails due to alignment requirements(PAGE_ALIGN to 4KB). This is needed to workaround the following build failures observed across multiple build configs: aarch64-none-elf-ld.bfd: BL31 init has exceeded progbits limit. aarch64-none-elf-ld.bfd: /work/workspace/workspace/tf-worker_ws_2/trusted_firmware/build/fvp/debug/bl31/bl31.elf section coherent_ram will not fit in region RAM aarch64-none-elf-ld.bfd: BL31 image has exceeded its limit. aarch64-none-elf-ld.bfd: region RAM overflowed by 4096 bytes Change-Id: Idfab539e9a40f4346ee11eea1e618c97e93e19a1 Signed-off-by: Madhukar Pappireddy --- plat/arm/board/fvp/platform.mk | 8 -------- 1 file changed, 8 deletions(-) diff --git a/plat/arm/board/fvp/platform.mk b/plat/arm/board/fvp/platform.mk index a24a2e50c..acac88645 100644 --- a/plat/arm/board/fvp/platform.mk +++ b/plat/arm/board/fvp/platform.mk @@ -308,14 +308,6 @@ ENABLE_AMU := 1 # Enable dynamic mitigation support by default DYNAMIC_WORKAROUND_CVE_2018_3639 := 1 -# Enable reclaiming of BL31 initialisation code for secondary cores -# stacks for FVP. However, don't enable reclaiming for clang. -ifneq (${RESET_TO_BL31},1) -ifeq ($(findstring clang,$(notdir $(CC))),) -RECLAIM_INIT_CODE := 1 -endif -endif - ifeq (${ENABLE_AMU},1) BL31_SOURCES += lib/cpus/aarch64/cpuamu.c \ lib/cpus/aarch64/cpuamu_helpers.S