summaryrefslogtreecommitdiff
path: root/bl31
diff options
context:
space:
mode:
authorBai Ping <ping.bai@nxp.com>2017-08-02 09:21:33 +0800
committerAbel Vesa <abel.vesa@nxp.com>2018-06-11 10:08:39 +0300
commit33a7fa4220b8b99430adce131d4b1005a967ac55 (patch)
tree30224c7cec847c8deb7ff0ff33c00fd6dee010ae /bl31
parentbe07f3cd5951283fc0f06f92b79f04e1f22823a4 (diff)
relocate the xlat_table section into ocram_s
On i.MX8MQ, we may need to run ATF in ocram space, but the ocram space is limited, can NOT put all the sections into it, so move the xlat_table section into OCRAM_S. Signed-off-by: Bai Ping <ping.bai@nxp.com>
Diffstat (limited to 'bl31')
-rw-r--r--bl31/bl31.ld.S17
1 files changed, 17 insertions, 0 deletions
diff --git a/bl31/bl31.ld.S b/bl31/bl31.ld.S
index c6a4fe49..e6363354 100644
--- a/bl31/bl31.ld.S
+++ b/bl31/bl31.ld.S
@@ -14,6 +14,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
@@ -214,6 +217,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
@@ -230,6 +234,7 @@ SECTIONS
#endif
*(xlat_table)
} >RAM
+#endif
#if USE_COHERENT_MEM
/*
@@ -272,4 +277,16 @@ SECTIONS
#endif
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
+#endif
}