summaryrefslogtreecommitdiff
path: root/zephyr/linker/CMakeLists.txt
diff options
context:
space:
mode:
authorRob Barnes <robbarnes@google.com>2022-09-14 20:47:00 +0000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-11-17 00:47:31 +0000
commitafdd762d014f295e19b71d789890e565d5b9286d (patch)
treedc4986e66945c4d246a056852f039fc2c5dce26f /zephyr/linker/CMakeLists.txt
parentec31407993ec9b5ae14fed72d728a4061d656d65 (diff)
downloadchrome-ec-afdd762d014f295e19b71d789890e565d5b9286d.tar.gz
system: Ensure space for panic and jump data
Ensure space is available for end of ram data. End of ram data must be located at the very end of noinit ram. This currently includes panic_data followed by jump_data. This is being enforced with linker asserts and build asserts rather than allocating the space directly so RAM utiliztion reports are still relevant. Introduce PLATFORM_EC_PRESERVED_END_OF_RAM_SIZE config option and default it to 1KB. This can be adjusted on boards that are constrained. BUG=b:246778588,b:246798928 BRANCH=None TEST=./twister -c -s zephyr/test/jump_tags/jump_tags.default && make run-kb_8042 Change-Id: I444bbe3a583396b4f9b104bb6999e78ae3ff6f2f Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3896272 Reviewed-by: Aaron Massey <aaronmassey@google.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Diffstat (limited to 'zephyr/linker/CMakeLists.txt')
-rw-r--r--zephyr/linker/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/zephyr/linker/CMakeLists.txt b/zephyr/linker/CMakeLists.txt
index 94544d454b..adffc2246f 100644
--- a/zephyr/linker/CMakeLists.txt
+++ b/zephyr/linker/CMakeLists.txt
@@ -21,3 +21,7 @@ zephyr_linker_sources_ifdef(CONFIG_SOC_FAMILY_MEC ROM_START SORT_KEY 1
zephyr_linker_sources(DATA_SECTIONS iterables-ram.ld)
zephyr_linker_sources(SECTIONS iterables-rom.ld)
+
+# Ensure there's space for panic and jump data at the end of ram
+# Must be added to "SECTIONS" because this is applied last
+zephyr_linker_sources(SECTIONS end-of-ram.ld)