summaryrefslogtreecommitdiff
path: root/include/panic.h
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 /include/panic.h
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 'include/panic.h')
-rw-r--r--include/panic.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/panic.h b/include/panic.h
index 122f0c317c..ea7a40f7b0 100644
--- a/include/panic.h
+++ b/include/panic.h
@@ -129,13 +129,18 @@ void panic_reboot(void);
* Store a panic log and halt the system for a software-related reason, such as
* stack overflow or assertion failure.
*/
-void software_panic(uint32_t panic_reason, uint32_t panic_info);
+void software_panic(uint32_t reason, uint32_t info);
/**
- * Log a watchdog panic in the panic log. Called on the subsequent reboot after
- * the watchdog fires.
+ * Log a panic in the panic log, but don't halt the system. Normally
+ * called on the subsequent reboot after panic detection.
*/
-void panic_log_watchdog(void);
+void panic_set_reason(uint32_t reason, uint32_t info, uint8_t exception);
+
+/**
+ * Retrieve the currently stored panic reason + info.
+ */
+void panic_get_reason(uint32_t *reason, uint32_t *info, uint8_t *exception);
#endif
/**