summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorYilun Lin <yllin@chromium.org>2019-10-02 14:05:38 +0800
committerCommit Bot <commit-bot@chromium.org>2019-10-04 12:20:25 +0000
commit99d0d6e76c6c9e566a664bdb76f2e3c6db221cbd (patch)
tree42de472b51bb38265f21eb29928424a2bd6450c4 /core
parent5f7e4c337dae601208f308efba15ad6d9ffbe788 (diff)
downloadchrome-ec-99d0d6e76c6c9e566a664bdb76f2e3c6db221cbd.tar.gz
kukui_scp: support CONFIG_PRESERVE_LOGS
Enable CONFIG_PRESERVE_LOGS to gather more information when SCP is crashed. TEST=1. crash scp 2. restart scp 3. restart timberslide to ensure the logs are fetched 4. see that untransmitted logs are fetched into /var/log/cros_scp.log BUG=b:140220117 BRANCH=none Change-Id: I12635afa6c92fd8fa9cc889ce75999f855f18db0 Signed-off-by: Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1833943 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'core')
-rw-r--r--core/cortex-m/ec.lds.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S
index 90ba292c5b..bbf9a7df01 100644
--- a/core/cortex-m/ec.lds.S
+++ b/core/cortex-m/ec.lds.S
@@ -279,6 +279,18 @@ SECTIONS
__data_lma_start = .;
+#ifdef CONFIG_PRESERVE_LOGS
+ .preserve_logs(NOLOAD) : {
+ . = ALIGN(8);
+ *(SORT(.preserved_logs.*))
+ . = ALIGN(8);
+ __preserved_logs_end = .;
+ } > IRAM
+
+ ASSERT((SIZEOF(.preserve_logs) + CONFIG_RAM_BASE) ==
+ __preserved_logs_end, "preserve_logs must be at CONFIG_RAM_BASE.")
+#endif
+
.bss : {
/*
* Align to 512 bytes. This is convenient when some memory block