summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2018-12-28 11:26:03 +0800
committerchrome-bot <chrome-bot@chromium.org>2019-01-24 00:51:29 -0800
commitd7579bd4589d08eeabf7c01f055b925acb7aed67 (patch)
tree3adead141ceea596ac42f0ed05e2aa59d47a41d1 /core
parent3cd175cd9ddec3fd88153b3edb9e1d7e4526420d (diff)
downloadchrome-ec-d7579bd4589d08eeabf7c01f055b925acb7aed67.tar.gz
mt_scp: Add support to store some code in DRAM
This allows to store specific code/data in a .dram region. This is used by mt_scp to run code off DRAM, as we plan to have more code than what can fit in SRAM. BRANCH=none BUG=b:122058243 TEST=make BOARD=kukui_scp -j objdump -x build/kukui_scp/ec.obj => Some code is loaded in DRAM TEST=Load kukui_scp, icachetest works Change-Id: Idbab809ba86cabe3b984944adc2781b37d2d544b Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1391542
Diffstat (limited to 'core')
-rw-r--r--core/cortex-m/ec.lds.S11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S
index 2a9a9b2fe0..8bd5bfa21a 100644
--- a/core/cortex-m/ec.lds.S
+++ b/core/cortex-m/ec.lds.S
@@ -64,6 +64,10 @@ MEMORY
#undef REGION
#undef REGION_LOAD
#endif /* CONFIG_MEMORY_REGIONS */
+
+#ifdef CONFIG_DRAM_BASE
+ DRAM (rwx) : ORIGIN = CONFIG_DRAM_BASE, LENGTH = CONFIG_DRAM_SIZE
+#endif
}
SECTIONS
{
@@ -422,6 +426,13 @@ SECTIONS
#undef REGION_LOAD
#endif /* CONFIG_CHIP_MEMORY_REGIONS */
+#ifdef CONFIG_DRAM_BASE
+ .dram : {
+ KEEP(*(SORT(.dram.keep.*)))
+ *(SORT(.dram.*))
+ } > DRAM
+#endif
+
#if !(defined(SECTION_IS_RO) && defined(CONFIG_FLASH))
/DISCARD/ : {
*(.google)