diff options
author | Furquan Shaikh <furquan@chromium.org> | 2017-11-29 12:53:31 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-11-30 11:48:57 -0800 |
commit | 9fa6de15cf57e4beaa5726ebbe0e4ac6af004a79 (patch) | |
tree | 79e7ee57f266c57649647a6195d45c590403f5ad | |
parent | 0fd88135208873cb08eb89cc4f017feeb5ee9caf (diff) | |
download | chrome-ec-9fa6de15cf57e4beaa5726ebbe0e4ac6af004a79.tar.gz |
panic: Set EC_HOST_EVENT_PANIC on chipset reset
Add a hook for CHIPSET_RESET to allow the EC to indicate if there is
any new panic info present. This helps coreboot to log EC panic info
in eventlog.
Also, update the hook priority for CHIPSET_RESET and HOOK_INIT to
HOOK_PRIO_LAST to allow the EC to first log any software panic before
it is checked.
BUG=b:65732924,b:69334392
BRANCH=None
TEST=Verified following:
1. Force panic_set_reason in EC on CHIPSET_RESET
2. reboot on AP console
3. mosys eventlog list shows "EC Event | Panic Reset in previous boot"
Change-Id: I77b49cd0b3bf05b10efc708e3d81af9ed0e3aa49
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/797911
Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r-- | common/panic_output.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/panic_output.c b/common/panic_output.c index c9d59f2061..e54cb0caf8 100644 --- a/common/panic_output.c +++ b/common/panic_output.c @@ -129,7 +129,8 @@ static void panic_init(void) } #endif } -DECLARE_HOOK(HOOK_INIT, panic_init, HOOK_PRIO_DEFAULT); +DECLARE_HOOK(HOOK_INIT, panic_init, HOOK_PRIO_LAST); +DECLARE_HOOK(HOOK_CHIPSET_RESET, panic_init, HOOK_PRIO_LAST); #ifdef CONFIG_CMD_STACKOVERFLOW static void stack_overflow_recurse(int n) |