summaryrefslogtreecommitdiff
path: root/bl31/bl31.ld.S
diff options
context:
space:
mode:
Diffstat (limited to 'bl31/bl31.ld.S')
-rw-r--r--bl31/bl31.ld.S30
1 files changed, 30 insertions, 0 deletions
diff --git a/bl31/bl31.ld.S b/bl31/bl31.ld.S
index c7d587cb..c84cff38 100644
--- a/bl31/bl31.ld.S
+++ b/bl31/bl31.ld.S
@@ -15,6 +15,9 @@ ENTRY(bl31_entrypoint)
MEMORY {
RAM (rwx): ORIGIN = BL31_BASE, LENGTH = BL31_LIMIT - BL31_BASE
+#if XLAT_TABLE_IN_OCRAM_S
+ RAM_S (rwx): ORIGIN = 0x180000, LENGTH = 0x8000
+#endif
}
#ifdef PLAT_EXTRA_LD_SCRIPT
@@ -198,11 +201,13 @@ SECTIONS
ASSERT(. <= BL31_PROGBITS_LIMIT, "BL31 progbits has exceeded its limit.")
#endif
+#if !STACK_IN_OCRAM_S
stacks (NOLOAD) : {
__STACKS_START__ = .;
*(tzfw_normal_stacks)
__STACKS_END__ = .;
} >RAM
+#endif
/*
* The .bss section gets initialised to 0 at runtime.
@@ -264,6 +269,7 @@ SECTIONS
__BSS_END__ = .;
} >RAM
+#if !XLAT_TABLE_IN_OCRAM_S
/*
* The xlat_table section is for full, aligned page tables (4K).
* Removing them from .bss avoids forcing 4K alignment on
@@ -273,6 +279,7 @@ SECTIONS
xlat_table (NOLOAD) : {
*(xlat_table)
} >RAM
+#endif
#if USE_COHERENT_MEM
/*
@@ -309,4 +316,27 @@ SECTIONS
__BL31_END__ = .;
ASSERT(. <= BL31_LIMIT, "BL31 image has exceeded its limit.")
+
+#if XLAT_TABLE_IN_OCRAM_S
+ /*
+ * The xlat_table section is for full, aligned page tables (4K).
+ * Removing them from .bss avoids forcing 4K alignment on
+ * the .bss section and eliminates the unecessary zero init
+ */
+ . = 0x180000;
+ xlat_table (NOLOAD) : {
+ *(xlat_table)
+ } >RAM_S
+
+#if STACK_IN_OCRAM_S
+ stacks (NOLOAD) : {
+ __STACKS_START__ = .;
+ *(tzfw_normal_stacks)
+ __STACKS_END__ = .;
+ } >RAM_S
+#endif
+
+ASSERT(. <= OCRAM_S_LIMIT, "OCRAM_S limit has been exceeded.")
+
+#endif
}