aboutsummaryrefslogtreecommitdiff
path: root/include/common
diff options
context:
space:
mode:
authorAlexei Fedorov <Alexei.Fedorov@arm.com>2020-05-30 17:33:26 +0100
committerAlexei Fedorov <Alexei.Fedorov@arm.com>2020-05-31 11:40:44 +0100
commit34dd1e96fdae59d56d19a8d1270a03860af9f015 (patch)
treedf83e59cccb4ec4fab8175af4ab5ce37a136cabc /include/common
parentdd1eb34aa6a1f1cd7e8bbb5a288fb5e39e503f5d (diff)
downloadtrusted-firmware-a-34dd1e96fdae59d56d19a8d1270a03860af9f015.tar.gz
TF-A: Fix BL31 linker script error
The patch fixes BL31 linker script error "Init code ends past the end of the stacks" for platforms with number of CPUs less than 4, which is caused by __STACKS_END__ address being lower than __INIT_CODE_END__. The modified BL31 linker script detects such cases and increases the total amount of stack memory, setting __STACKS_END__ = __INIT_CODE_END__, and CPUs' stacks are calculated by BL31 'plat_get_my_stack' function accordingly. For platforms with more than 4 CPUs and __INIT_CODE_END__ < __STACKS_END__ stack memory does not increase and allocated CPUs' stacks match the existing implementation. The patch removes exclusion of PSCI initialization functions from the reclaimed .init section in 'arm_reclaim_init.ld.S' script, which increases the size of reclaimed memory region. Change-Id: I927773e00dd84e1ffe72f9ee534f4f2fc7b6153c Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Diffstat (limited to 'include/common')
-rw-r--r--include/common/bl_common.ld.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/common/bl_common.ld.h b/include/common/bl_common.ld.h
index 97fed72044..208e3d6819 100644
--- a/include/common/bl_common.ld.h
+++ b/include/common/bl_common.ld.h
@@ -101,12 +101,14 @@
__DATA_END__ = .; \
}
+#if !(defined(IMAGE_BL31) && RECLAIM_INIT_CODE)
#define STACK_SECTION \
stacks (NOLOAD) : { \
__STACKS_START__ = .; \
*(tzfw_normal_stacks) \
__STACKS_END__ = .; \
}
+#endif
/*
* If BL doesn't use any bakery lock then __PERCPU_BAKERY_LOCK_SIZE__