summaryrefslogtreecommitdiff
path: root/bl31/bl31.ld.S
diff options
context:
space:
mode:
authorVikram Kanigiri <vikram.kanigiri@arm.com>2015-09-24 15:45:43 +0100
committerAchin Gupta <achin.gupta@arm.com>2015-09-25 16:35:10 +0100
commit7173f5f61866d525b9786d31a01f105f58e90c72 (patch)
tree4ca4fd3e6801e3b544870c14a883cd7d936e715d /bl31/bl31.ld.S
parenta6ef882c0e29f9459a927106fab36ea31587bf9a (diff)
Fix relocation of __PERCPU_BAKERY_LOCK_SIZE__
When a platform port does not define PLAT_PERCPU_BAKERY_LOCK_SIZE, the total memory that should be allocated per-cpu to accommodate all bakery locks is calculated by the linker in bl31.ld.S. The linker stores this value in the __PERCPU_BAKERY_LOCK_SIZE__ linker symbol. The runtime value of this symbol is different from the link time value as the symbol is relocated into the current section (.bss). This patch fixes this issue by marking the symbol as ABSOLUTE which allows it to retain its correct value even at runtime. The description of PLAT_PERCPU_BAKERY_LOCK_SIZE in the porting-guide.md has been made clearer as well. Change-Id: Ia0cfd42f51deaf739d792297e60cad5c6e6e610b
Diffstat (limited to 'bl31/bl31.ld.S')
-rw-r--r--bl31/bl31.ld.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/bl31/bl31.ld.S b/bl31/bl31.ld.S
index 72507911..e572f9be 100644
--- a/bl31/bl31.ld.S
+++ b/bl31/bl31.ld.S
@@ -124,7 +124,7 @@ SECTIONS
__BAKERY_LOCK_START__ = .;
*(bakery_lock)
. = ALIGN(CACHE_WRITEBACK_GRANULE);
- __PERCPU_BAKERY_LOCK_SIZE__ = . - __BAKERY_LOCK_START__;
+ __PERCPU_BAKERY_LOCK_SIZE__ = ABSOLUTE(. - __BAKERY_LOCK_START__);
. = . + (__PERCPU_BAKERY_LOCK_SIZE__ * (PLATFORM_CORE_COUNT - 1));
__BAKERY_LOCK_END__ = .;
#ifdef PLAT_PERCPU_BAKERY_LOCK_SIZE