butterfly: Log EC shutdown reason in ELOG

The EC saves its last "shutdown reason" for the system in EC RAM
that we can read back and log on boot.

The decode for the "reason" field will be added to mosys.

Change-Id: I834d39122e45262ef8e7ba59201accbee5857aac
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/48323
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Stefan Reinauer <reinauer@google.com>
Tested-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/4127
Tested-by: build bot (Jenkins)
This commit is contained in:
Duncan Laurie 2012-11-26 14:53:42 -08:00 committed by Stefan Reinauer
parent 8c5947709a
commit 19afe8de6d
1 changed files with 3 additions and 0 deletions

View File

@ -140,6 +140,9 @@ struct elog_event_data_me_extended {
/* Last post code from previous boot */
#define ELOG_TYPE_LAST_POST_CODE 0xa3
/* EC Shutdown Reason */
#define ELOG_TYPE_EC_SHUTDOWN 0xa5
extern int elog_init(void);
extern int elog_clear(void);
extern void elog_add_event_raw(u8 event_type, void *data, u8 data_size);