diff options
author | David Hendricks <dhendrix@chromium.org> | 2014-06-18 13:03:03 -0700 |
---|---|---|
committer | Marc Jones <marc.jones@se-eng.com> | 2015-01-09 07:46:56 +0100 |
commit | 6a29e6c6b64753d080a483fbe581117dbb164262 (patch) | |
tree | 62d7804663f2c47a6d8912cd1872da7c085283f9 | |
parent | c25318938fd9b86969057f3b4e741b949624ec41 (diff) |
elog: Add ELOG_TYPE_BOOT event using fake boot count if necessary
This makes it so that we always log the generic "system boot" event.
If boot count support has not been implemented, fake it.
BUG=chrome-os-partner:28772
BRANCH=nyan
TEST=booted on Big, ran "mosys eventlog list" and saw
"System boot" event logged with boot count == 0
Original-Change-Id: I729e28feb94546acf6173e7b67990f5b29d02fc7
Original-Signed-off-by: David Hendricks <dhendrix@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/204525
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
(cherry picked from commit 2598dc63ddc0d76bcdf9814cadd4c75653fd9832)
Signed-off-by: Marc Jones <marc.jones@se-eng.com>
Change-Id: Ieb4e2e36870e97d9c5f88f0190291863a65a6351
Reviewed-on: http://review.coreboot.org/8142
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-rw-r--r-- | src/drivers/elog/elog.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/drivers/elog/elog.c b/src/drivers/elog/elog.c index 85198e2145..77019065ed 100644 --- a/src/drivers/elog/elog.c +++ b/src/drivers/elog/elog.c @@ -622,6 +622,9 @@ int elog_init(void) if (!acpi_is_wakeup_s3()) #endif elog_add_event_dword(ELOG_TYPE_BOOT, boot_count_read()); +#else + /* If boot count is not implemented, fake it. */ + elog_add_event_dword(ELOG_TYPE_BOOT, 0); #endif #if CONFIG_ARCH_X86 |