[coreboot-gerrit] New patch to review for coreboot: chromeos/elog: Filter developer mode entry on S3 resume
Duncan Laurie (dlaurie@chromium.org)
gerrit at coreboot.org
Wed Mar 8 04:30:30 CET 2017
Duncan Laurie (dlaurie at chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18665
-gerrit
commit f0890ad5ec64682c17609d10952d2a4db7dbbdfd
Author: Duncan Laurie <dlaurie at chromium.org>
Date: Tue Mar 7 19:25:48 2017 -0800
chromeos/elog: Filter developer mode entry on S3 resume
The event log entry indicating developer mode is useful for the
boot path, but is not really useful on the resume path and removing
it makes the event log easier to read when developer mode is enabled.
To make this work I have to use #ifdef around the ACPI code since
this is shared with ARM which does not have acpi.h.
BUG=b:36042662
BRANCH=none
TEST=perform suspend/resume on Eve and check that the event log
does not have an entry for Chrome OS Developer Mode.
Change-Id: I1a9d775d18e794b41c3d701e5211c238a888501a
Signed-off-by: Duncan Laurie <dlaurie at chromium.org>
---
src/vendorcode/google/chromeos/elog.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/src/vendorcode/google/chromeos/elog.c b/src/vendorcode/google/chromeos/elog.c
index fd138ed..f16f0ad 100644
--- a/src/vendorcode/google/chromeos/elog.c
+++ b/src/vendorcode/google/chromeos/elog.c
@@ -18,6 +18,10 @@
#include <elog.h>
#include <vboot/vboot_common.h>
+#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)
+#include <arch/acpi.h>
+#endif
+
static void elog_add_boot_reason(void *unused)
{
int rec = vboot_recovery_mode_enabled();
@@ -35,8 +39,19 @@ static void elog_add_boot_reason(void *unused)
}
if (dev) {
- elog_add_event(ELOG_TYPE_CROS_DEVELOPER_MODE);
- printk(BIOS_DEBUG, "%s: Logged dev mode boot\n", __func__);
+ int log_event = 1;
+
+#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)
+ /* Skip logging developer mode in ACPI resume path */
+ if (acpi_is_wakeup())
+ log_event = 0;
+#endif
+
+ if (log_event) {
+ elog_add_event(ELOG_TYPE_CROS_DEVELOPER_MODE);
+ printk(BIOS_DEBUG, "%s: Logged dev mode boot\n",
+ __func__);
+ }
}
}
More information about the coreboot-gerrit
mailing list