elog: Only print TYPE_BOOT on S3-resume if CONFIG_ELOG_BOOT_COUNT

Previously, we were unconditionally adding a TYPE_BOOT message to the ELOG
on every boot (even S3 resume) if CONFIG_ELOG_BOOT_COUNT was disabled.
Now that boot_count_read() returns 0 for the !CONFIG_ELOG_BOOT_COUNT
case, the code becomes a bit simpler.

BUG=b:79865267
TEST=firmware_EventLog

Change-Id: I803fa4c3e03b6cc94751cf0ce34b78021ae2124e
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-on: https://review.coreboot.org/26527
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Daniel Kurtz 2018-05-24 18:22:42 -06:00 committed by Martin Roth
parent f55c3c2eb9
commit 12173feef8
1 changed files with 1 additions and 6 deletions

View File

@ -786,15 +786,10 @@ int elog_init(void)
#if !defined(__SMM__)
/* Log boot count event except in S3 resume */
#if IS_ENABLED(CONFIG_ELOG_BOOT_COUNT)
#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)
if (!acpi_is_wakeup_s3())
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 IS_ENABLED(CONFIG_ARCH_X86)
/* Check and log POST codes from previous boot */