From 18b02c5630ce0c1edfa2b87168043d92fc473ab8 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Mon, 25 Jul 2016 13:26:32 -0700 Subject: google/chromeos: Use vboot bootmode functions for elog add boot reason BUG=chrome-os-partner:55639 Change-Id: I3ac2b256862758bb5c9e6c2f1311972af474e8f6 Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/15870 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/vendorcode/google/chromeos/elog.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src') diff --git a/src/vendorcode/google/chromeos/elog.c b/src/vendorcode/google/chromeos/elog.c index 1b36527dd3..206f9d9d7b 100644 --- a/src/vendorcode/google/chromeos/elog.c +++ b/src/vendorcode/google/chromeos/elog.c @@ -17,11 +17,9 @@ #include #include #include -#if CONFIG_VBOOT #include #include #include -#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, " -- cgit v1.2.3