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

Change-Id: I729e28feb94546acf6173e7b67990f5b29d02fc7
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/204525
Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
David Hendricks 2014-06-18 13:03:03 -07:00 committed by chrome-internal-fetch
commit 2598dc63dd

View file

@ -622,6 +622,9 @@ int elog_init(void)
if (acpi_slp_type != 3)
#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