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>
This commit is contained in:
Furquan Shaikh
2017-11-29 12:53:31 -08:00
committed by chrome-bot
parent 0fd8813520
commit 9fa6de15cf

View File

@@ -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)