summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTinghan Shen <tinghan.shen@mediatek.com>2021-10-28 17:23:03 +0800
committerCommit Bot <commit-bot@chromium.org>2021-10-29 09:48:43 +0000
commitfa2a95c0938617cb1ec4657bb8a3b307578ffe2a (patch)
treeda6908d662eb3bb330c642c6e2497e0a6552d411 /include
parentbf53b543a53439ee72cdcdfdc2d4bb872cfb9f55 (diff)
downloadchrome-ec-fa2a95c0938617cb1ec4657bb8a3b307578ffe2a.tar.gz
core/riscv-rv32i: dump panic info on console channel
The panic information currently dumps by debug_print API which implemented on SCP UART. This implies that the panic information can only be observed on SCP UART. We cannot have any information about crashed SCP on non-development environment. Add a new panic API to dump information on console channel, so that panic information can be transmitted to kernel side via host command. BRANCH=None BUG=b:199444513 BUG=b:189356151 TEST=build pass Change-Id: I2167d16a709fa2814f3b0a208411ae5e7f51f70b Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3225807 Reviewed-by: Rong Chang <rongchang@chromium.org> Commit-Queue: Tzung-Bi Shih <tzungbi@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/config.h3
-rw-r--r--include/panic.h8
2 files changed, 11 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h
index 1f618ded95..9fd746071c 100644
--- a/include/config.h
+++ b/include/config.h
@@ -1532,6 +1532,9 @@
/* Don't save General Purpose Registers during panic */
#undef CONFIG_PANIC_STRIP_GPR
+/* Provide another output method of panic information by console channel */
+#undef CONFIG_PANIC_CONSOLE_OUTPUT
+
/*
* Provide the default GPIO abstraction layer.
* You want this unless you are doing a really tiny firmware.
diff --git a/include/panic.h b/include/panic.h
index 577e592e32..4976486e95 100644
--- a/include/panic.h
+++ b/include/panic.h
@@ -176,6 +176,14 @@ void panic_printf(const char *format, ...);
*/
void panic_data_print(const struct panic_data *pdata);
+/*
+ * Print saved panic information on console channel to observe panic
+ * information
+ *
+ * @param pdata pointer to saved panic data
+ */
+void panic_data_ccprint(const struct panic_data *pdata);
+
/**
* Report an assertion failure and reset
*