summaryrefslogtreecommitdiff
path: root/include/link_defs.h
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2019-01-23 15:13:01 +0800
committerchrome-bot <chrome-bot@chromium.org>2019-02-18 08:51:20 -0800
commit0528c46598c8c89f04b7129722de50e178b62aa2 (patch)
tree9afe729c302f433174b1f8bcecfeaf206d5cb554 /include/link_defs.h
parent80020d90d17ac1507abcefe9004ed6ae8cb9728d (diff)
downloadchrome-ec-0528c46598c8c89f04b7129722de50e178b62aa2.tar.gz
core: Allow .bss and .data sections in DRAM
We manually copy other .data from the original section on boot, and clear DRAM .bss. This way, a single object file (or archive) can be moved fully to DRAM. BRANCH=none BUG=b:122058243 TEST=With next CL, dram_test works Change-Id: I1a434bbd8a4135d16b3f49b0d1b75b96506e3e24 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1445652 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'include/link_defs.h')
-rw-r--r--include/link_defs.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/link_defs.h b/include/link_defs.h
index 37049a36eb..a9bd0bcf9b 100644
--- a/include/link_defs.h
+++ b/include/link_defs.h
@@ -108,6 +108,13 @@ extern const void *__data_lma_start;
extern const void *__data_start;
extern const void *__data_end;
+/* DRAM image sections. */
+extern const void *__dram_data_lma_start;
+extern void *__dram_data_start;
+extern void *__dram_data_end;
+extern void *__dram_bss_start;
+extern void *__dram_bss_end;
+
/* Helper for special chip-specific memory sections */
#ifdef CONFIG_CHIP_MEMORY_REGIONS
#define __SECTION(name) __attribute__((section("." STRINGIFY(name) ".50_auto")))