aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlexei Fedorov <Alexei.Fedorov@arm.com>2020-07-21 17:07:45 +0100
committerAlexei Fedorov <Alexei.Fedorov@arm.com>2020-08-10 10:40:35 +0000
commitfa1fdb223cdc0b01ef944b5fe9664a16867dfa34 (patch)
tree2b61012b45e1663bf399243cb9384cc1a3f17fe0 /include
parent8ae3a91c39d8a22acf845f134cb7a093be0ab918 (diff)
downloadplatform_external_arm-trusted-firmware-fa1fdb223cdc0b01ef944b5fe9664a16867dfa34.tar.gz
platform_external_arm-trusted-firmware-fa1fdb223cdc0b01ef944b5fe9664a16867dfa34.tar.bz2
platform_external_arm-trusted-firmware-fa1fdb223cdc0b01ef944b5fe9664a16867dfa34.zip
plat/arm: Reduce size of BL31 binary
BL31 binary size is aligned to 4KB because of the code in include\plat\arm\common\arm_reclaim_init.ld.S: __INIT_CODE_UNALIGNED__ = .; . = ALIGN(PAGE_SIZE); __INIT_CODE_END__ = .; with all the zero data after the last instruction of BL31 code to the end of the page. This causes increase in size of BL31 binary stored in FIP and its loading time by BL2. This patch reduces the size of BL31 image by moving page alignment from __INIT_CODE_END__ to __STACKS_END__ which also increases the stack size for secondary CPUs. Change-Id: Ie2ec503fc774c22c12ec506d74fd3ef2b0b183a9 Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Diffstat (limited to 'include')
-rw-r--r--include/plat/arm/common/arm_reclaim_init.ld.S3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/plat/arm/common/arm_reclaim_init.ld.S b/include/plat/arm/common/arm_reclaim_init.ld.S
index 03976f34f..e4d4f1254 100644
--- a/include/plat/arm/common/arm_reclaim_init.ld.S
+++ b/include/plat/arm/common/arm_reclaim_init.ld.S
@@ -13,8 +13,6 @@ SECTIONS
. = ALIGN(PAGE_SIZE);
__INIT_CODE_START__ = .;
*(*text.init*);
- __INIT_CODE_UNALIGNED__ = .;
- . = ALIGN(PAGE_SIZE);
__INIT_CODE_END__ = .;
} >RAM
@@ -42,6 +40,7 @@ SECTIONS
/* Offset mask */ \
MASK = ABS(SIGN >> 63) - 1; \
. += ABS(OFFSET) & ABS(MASK); \
+ . = ALIGN(PAGE_SIZE); \
__STACKS_END__ = .; \
/* Total stack size */ \
SIZE = ABS(. - __STACKS_START__); \