From 739e6a84aa9ccacf54db3da6c1e0777cb86ebea5 Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Tue, 13 May 2014 20:28:49 -0700 Subject: elog: Add function to log boot reason in ChromeOS case This adds a generic helper function for adding boot reason in the ChromeOS case. If vboot is enabled, it will use information passed in via the vboot handoff table in cbmem to determine mode and reason in the case of recovery. BUG=chromium:373467 BRANCH=nyan TEST=built along with follow-up CL and booted on Big under various modes, verified entry was added to eventlog with "mosys eventlog list" Signed-off-by: David Hendricks Original-Change-Id: I50a7aa6d55eb46413fe9929e732d6eb18c758d4b Original-Reviewed-on: https://chromium-review.googlesource.com/199690 Original-Reviewed-by: Duncan Laurie Original-Commit-Queue: David Hendricks Original-Tested-by: David Hendricks (cherry picked from commit 961c0bd1dd5512b1c2feb2ed4391bf507900eb7a) Signed-off-by: Marc Jones Change-Id: I6ae4e2a891966d2d1de7d37dcc551383e94e4d75 Reviewed-on: http://review.coreboot.org/7991 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks --- src/vendorcode/google/chromeos/chromeos.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/vendorcode/google/chromeos/chromeos.h') diff --git a/src/vendorcode/google/chromeos/chromeos.h b/src/vendorcode/google/chromeos/chromeos.h index 9b2537d51a..a2ecac849f 100644 --- a/src/vendorcode/google/chromeos/chromeos.h +++ b/src/vendorcode/google/chromeos/chromeos.h @@ -34,8 +34,12 @@ void save_vbnv(const uint8_t *vbnv_copy); #if CONFIG_CHROMEOS /* functions implemented in vboot.c */ void init_chromeos(int bootmode); + +/* functions implemented in elog.c */ +void elog_add_boot_reason(void); #else static inline void init_chromeos(int bootmode) { } +static inline void elog_add_boot_reason(void) { return; } #endif /* CONFIG_CHROMEOS */ struct romstage_handoff; -- cgit v1.2.3