eventlog: Add additional EC host events
Add additional EC host events for logging. Some of these should likely
never end up in the event log.
BUG=chrome-os-partner:36985
TEST=Manual on Samus. Trigger EC panic, verify that "Panic Reset in
previous boot" is seen in /var/log/eventlog.
BRANCH=Samus
Change-Id: I8b54409e1c596eb5ce692bdb83c8911a5070af62
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/252402
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
(cherry picked from commit 07eb0e002faadfee36642265591d912c485829d8)
Reviewed-on: https://chromium-review.googlesource.com/253520
diff --git a/include/lib/elog.h b/include/lib/elog.h
index 73d2ce7..5f56881 100644
--- a/include/lib/elog.h
+++ b/include/lib/elog.h
@@ -128,6 +128,13 @@
#define EC_EVENT_KEYBOARD_RECOVERY 0x0f
#define EC_EVENT_THERMAL_SHUTDOWN 0x10
#define EC_EVENT_BATTERY_SHUTDOWN 0x11
+#define EC_EVENT_THROTTLE_START 0x12
+#define EC_EVENT_THROTTLE_STOP 0x13
+#define EC_EVENT_HANG_DETECT 0x14
+#define EC_EVENT_HANG_REBOOT 0x15
+#define EC_EVENT_PD_MCU 0x16
+#define EC_EVENT_BATTERY_STATUS 0x17
+#define EC_EVENT_PANIC 0x18
struct elog_ec_event {
uint8_t event;
uint8_t checksum;
diff --git a/lib/eventlog/elog.c b/lib/eventlog/elog.c
index f5278d4..67b8dfc 100644
--- a/lib/eventlog/elog.c
+++ b/lib/eventlog/elog.c
@@ -247,6 +247,13 @@
"Thermal Shutdown in previous boot" },
{ EC_EVENT_BATTERY_SHUTDOWN,
"Battery Shutdown in previous boot" },
+ { EC_EVENT_THROTTLE_START, "Throttle Requested" },
+ { EC_EVENT_THROTTLE_STOP, "Throttle Request Removed" },
+ { EC_EVENT_HANG_DETECT, "Host Event Hang" },
+ { EC_EVENT_HANG_REBOOT, "Host Event Hang Reboot" },
+ { EC_EVENT_PD_MCU, "PD MCU Request" },
+ { EC_EVENT_BATTERY_STATUS, "Battery Status Request" },
+ { EC_EVENT_PANIC, "Panic Reset in previous boot" },
{ 0, NULL },
};
static struct valstr cros_recovery_reasons[] = {