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>
This commit is contained in:
parent
0325dc6f7c
commit
18b02c5630
1 changed files with 1 additions and 14 deletions
|
@ -17,11 +17,9 @@
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <elog.h>
|
#include <elog.h>
|
||||||
#include <vendorcode/google/chromeos/chromeos.h>
|
#include <vendorcode/google/chromeos/chromeos.h>
|
||||||
#if CONFIG_VBOOT
|
|
||||||
#include <vboot/vbnv.h>
|
#include <vboot/vbnv.h>
|
||||||
#include <vboot/vboot_common.h>
|
#include <vboot/vboot_common.h>
|
||||||
#include <vboot_struct.h>
|
#include <vboot_struct.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
void elog_add_boot_reason(void)
|
void elog_add_boot_reason(void)
|
||||||
{
|
{
|
||||||
|
@ -29,18 +27,7 @@ void elog_add_boot_reason(void)
|
||||||
elog_add_event(ELOG_TYPE_CROS_DEVELOPER_MODE);
|
elog_add_event(ELOG_TYPE_CROS_DEVELOPER_MODE);
|
||||||
printk(BIOS_DEBUG, "%s: Logged dev mode boot\n", __func__);
|
printk(BIOS_DEBUG, "%s: Logged dev mode boot\n", __func__);
|
||||||
} else if (vboot_recovery_mode_enabled()) {
|
} else if (vboot_recovery_mode_enabled()) {
|
||||||
u8 reason = 0;
|
u8 reason = vboot_check_recovery_request();
|
||||||
#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
|
|
||||||
|
|
||||||
elog_add_event_byte(ELOG_TYPE_CROS_RECOVERY_MODE,
|
elog_add_event_byte(ELOG_TYPE_CROS_RECOVERY_MODE,
|
||||||
reason ? reason : ELOG_CROS_RECOVERY_MODE_BUTTON);
|
reason ? reason : ELOG_CROS_RECOVERY_MODE_BUTTON);
|
||||||
printk(BIOS_DEBUG, "%s: Logged recovery mode boot, "
|
printk(BIOS_DEBUG, "%s: Logged recovery mode boot, "
|
||||||
|
|
Loading…
Reference in a new issue