summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2015-03-04 10:35:25 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-03-14 03:22:37 +0000
commit90ef8b700629381ac62aae4f87612ef84b32cb35 (patch)
treef708bd83c0ac30b46f2bf3a5d79991cb4d80c64d /common
parent911da8c150d9d38b9a9f14453098bd1e0f838b49 (diff)
downloadchrome-ec-90ef8b700629381ac62aae4f87612ef84b32cb35.tar.gz
lm4: stm32: Store panic data in backup registers on hard reset
On hard reset / hibernate, RAM will be erased and panic data will normally be lost. When software panic data saving is enabled, try to save this data just before hard reset and restore it when we come back up. BUG=chrome-os-partner:37380 TEST=Manual on Samus with WP + SW sync enabled. Boot AP, then run "crash divzero" on console. After hard reset, verify that "panicinfo" dumps data and shows divzero exception code. BRANCH=Samus Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: I9516dd4b6db12ef35e512cc4710f9b97d7e663cb Reviewed-on: https://chromium-review.googlesource.com/255912 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/system.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/system.c b/common/system.c
index d57b1ce9ab..4bd70400d0 100644
--- a/common/system.c
+++ b/common/system.c
@@ -582,7 +582,7 @@ void system_common_pre_init(void)
* because it might change panic pointer.
*/
if (system_get_reset_flags() & RESET_FLAG_WATCHDOG)
- panic_log_watchdog();
+ panic_set_reason(PANIC_SW_WATCHDOG, 0, 0);
#endif
/*