summaryrefslogtreecommitdiff
path: root/common/system.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/system.c')
-rw-r--r--common/system.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/system.c b/common/system.c
index 39ccc29165..b257bc8594 100644
--- a/common/system.c
+++ b/common/system.c
@@ -575,6 +575,16 @@ void system_common_pre_init(void)
{
uintptr_t addr;
+#ifdef CONFIG_SOFTWARE_PANIC
+ /*
+ * Log panic cause if watchdog caused reset. This
+ * must happen before calculating jump_data address
+ * because it might change panic pointer.
+ */
+ if (system_get_reset_flags() & RESET_FLAG_WATCHDOG)
+ panic_log_watchdog();
+#endif
+
/*
* Put the jump data before the panic data, or at the end of RAM if
* panic data is not present.