diff options
author | Furquan Shaikh <furquan@google.com> | 2016-07-25 13:26:32 -0700 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2016-07-28 00:36:48 +0200 |
commit | 18b02c5630ce0c1edfa2b87168043d92fc473ab8 (patch) | |
tree | 583a72567af7669952afcc5bd7969a4060ca35bc | |
parent | 0325dc6f7cbdad4fd29315bfcb7f4e54fb678f3e (diff) |
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@google.com>
Reviewed-on: https://review.coreboot.org/15870
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r-- | src/vendorcode/google/chromeos/elog.c | 15 |
1 files changed, 1 insertions, 14 deletions
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 <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, " |