[coreboot-gerrit] Patch set updated for coreboot: google/chromeos: Use vboot bootmode functions for elog add boot reason

Furquan Shaikh (furquan@google.com) gerrit at coreboot.org
Wed Jul 27 23:59:36 CEST 2016


Furquan Shaikh (furquan at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15870

-gerrit

commit 81af98600ec5c986d990199427610a736e3882c8
Author: Furquan Shaikh <furquan at google.com>
Date:   Mon Jul 25 13:26:32 2016 -0700

    google/chromeos: Use vboot bootmode functions for elog add boot reason
    
    BUG=chrome-os-partner:55639
    
    Change-Id: I3ac2b256862758bb5c9e6c2f1311972af474e8f6
    Signed-off-by: Furquan Shaikh <furquan at google.com>
---
 src/vendorcode/google/chromeos/elog.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/src/vendorcode/google/chromeos/elog.c b/src/vendorcode/google/chromeos/elog.c
index 1b36527..206f9d9 100644
--- a/src/vendorcode/google/chromeos/elog.c
+++ b/src/vendorcode/google/chromeos/elog.c
@@ -17,11 +17,9 @@
 #include <console/console.h>
 #include <elog.h>
 #include <vendorcode/google/chromeos/chromeos.h>
-#if CONFIG_VBOOT
 #include <vboot/vbnv.h>
 #include <vboot/vboot_common.h>
 #include <vboot_struct.h>
-#endif
 
 void elog_add_boot_reason(void)
 {
@@ -29,18 +27,7 @@ void elog_add_boot_reason(void)
 		elog_add_event(ELOG_TYPE_CROS_DEVELOPER_MODE);
 		printk(BIOS_DEBUG, "%s: Logged dev mode boot\n", __func__);
 	} else if (vboot_recovery_mode_enabled()) {
-		u8 reason = 0;
-#if CONFIG_VBOOT
-		struct vboot_handoff *vbho = cbmem_find(CBMEM_ID_VBOOT_HANDOFF);
-
-		reason = get_recovery_mode_from_vbnv();
-		if (vbho && !reason) {
-			VbSharedDataHeader *sd = (VbSharedDataHeader *)
-				vbho->shared_data;
-			reason = sd->recovery_reason;
-		}
-#endif
-
+		u8 reason = vboot_check_recovery_request();
 		elog_add_event_byte(ELOG_TYPE_CROS_RECOVERY_MODE,
 			reason ? reason : ELOG_CROS_RECOVERY_MODE_BUTTON);
 		printk(BIOS_DEBUG, "%s: Logged recovery mode boot, "



More information about the coreboot-gerrit mailing list