[coreboot-gerrit] New patch to review for coreboot: elog: Ensure eventlog will always get initialized when configured in

Julius Werner (jwerner@chromium.org) gerrit at coreboot.org
Tue Aug 9 01:25:26 CEST 2016


Julius Werner (jwerner at chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16118

-gerrit

commit c7ea8e1cf9a2e4d5f74b63c8590263c65d32843d
Author: Julius Werner <jwerner at chromium.org>
Date:   Mon Aug 8 16:18:28 2016 -0700

    elog: Ensure eventlog will always get initialized when configured in
    
    Commit 0d9cd92e (chromeos: Clean up elog handling) removed the
    individual elog_init() calls from mainboards that did them and automated
    adding certain events through the boot state machine. Unfortunately,
    the new code would sometimes not log any specific event at all, and
    thereby also never call elog_init() (through elog_add_event()) which
    adds the "System boot" event.
    
    We can assume that any board that configures the eventlog at all
    actually wants to use it, so let's just add another call to elog_init()
    to the boot state machine so we can ensure it gets called at least once.
    
    BRANCH=None
    BUG=chrome-os-partner:56001
    TEST=Booted Kevin, confirmed that eventlog code runs again.
    
    Change-Id: Ibe7bfc94b3e3d11ba881399a39f9915991c89d8c
    Signed-off-by: Julius Werner <jwerner at chromium.org>
---
 src/drivers/elog/elog.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/drivers/elog/elog.c b/src/drivers/elog/elog.c
index 606f5e7..0608c55 100644
--- a/src/drivers/elog/elog.c
+++ b/src/drivers/elog/elog.c
@@ -16,6 +16,7 @@
 #if CONFIG_HAVE_ACPI_RESUME == 1
 #include <arch/acpi.h>
 #endif
+#include <bootstate.h>
 #include <cbmem.h>
 #include <console/console.h>
 #if CONFIG_ARCH_X86
@@ -810,3 +811,6 @@ void elog_add_event_wake(u8 source, u32 instance)
 	};
 	elog_add_event_raw(ELOG_TYPE_WAKE_SOURCE, &wake, sizeof(wake));
 }
+
+static void elog_bs_init(void *unused) { elog_init(); }
+BOOT_STATE_INIT_ENTRY(BS_POST_DEVICE, BS_ON_ENTRY, elog_bs_init, NULL);



More information about the coreboot-gerrit mailing list