summaryrefslogtreecommitdiff
path: root/bl2
diff options
context:
space:
mode:
authorRoberto Vargas <roberto.vargas@arm.com>2017-11-17 10:51:54 +0000
committerRoberto Vargas <roberto.vargas@arm.com>2018-01-18 09:57:18 +0000
commit487d3bf286d73cf5cb9dadb95426b4aed36764ad (patch)
tree26b78564a33755ee804e638ac6ced88e3dc4c9b6 /bl2
parentd1f7292e43c89c807e924ea5f13625de3f46718d (diff)
bl2-el3: Mark all the assembly functions in bl2 at el3
When BL2_AT_EL3 option is enabled some platforms are going to need a resident part in BL2 because the boot rom may jump to it after a reset. This patch introduces __TEXT_RESIDENT_START__ and __TEXT_RESIDENT_END__ linker symbols that mark the resident region. Change-Id: Ib20c1b8ee257831bcc0ca7d3df98d0cb617a04f8 Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
Diffstat (limited to 'bl2')
-rw-r--r--bl2/bl2_el3.ld.S13
1 files changed, 11 insertions, 2 deletions
diff --git a/bl2/bl2_el3.ld.S b/bl2/bl2_el3.ld.S
index 7ec4646f..57709e35 100644
--- a/bl2/bl2_el3.ld.S
+++ b/bl2/bl2_el3.ld.S
@@ -25,7 +25,10 @@ SECTIONS
#if SEPARATE_CODE_AND_RODATA
.text . : {
__TEXT_START__ = .;
- *bl2_el3_entrypoint.o(.text*)
+ __TEXT_RESIDENT_START__ = .;
+ *bl2_el3_entrypoint.o(.text*)
+ *(.text.asm.*)
+ __TEXT_RESIDENT_END__ = .;
*(.text*)
*(.vectors)
. = NEXT(PAGE_SIZE);
@@ -54,10 +57,16 @@ SECTIONS
. = NEXT(PAGE_SIZE);
__RODATA_END__ = .;
} >RAM
+
+ ASSERT(__TEXT_RESIDENT_END__ - __TEXT_RESIDENT_START__ <= PAGE_SIZE,
+ "Resident part of BL2 has exceeded its limit.")
#else
ro . : {
__RO_START__ = .;
- *bl2_el3_entrypoint.o(.text*)
+ __TEXT_RESIDENT_START__ = .;
+ *bl2_el3_entrypoint.o(.text*)
+ *(.text.asm.*)
+ __TEXT_RESIDENT_END__ = .;
*(.text*)
*(.rodata*)