chromeos: Check for recovery reason code in shared data
When using RW firmware path the proper recovery reason can be retrieved from the shared data region. This will result in the actual reason being logged instead of the default "recovery button pressed" reason. BUG=chrome-os-partner:20788 BRANCH=falco TEST=manual: 1) build and boot on falco 2) crossystem recovery_request=193 3) reboot into recovery mode, check reason with <TAB> 4) reboot back into chromeos 5) check event log entry for previous recovery mode: 25 | 2013-07-15 10:34:23 | Chrome OS Recovery Mode | Test from User Mode Change-Id: I6f9dfed501f06881e9cf4392724ad28b97521305 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/61906 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
3decedc014
commit
6577d1932a
1 changed files with 8 additions and 0 deletions
|
|
@ -29,6 +29,7 @@
|
|||
#include "gnvs.h"
|
||||
#if CONFIG_VBOOT_VERIFY_FIRMWARE
|
||||
#include "vboot_handoff.h"
|
||||
#include <vboot_struct.h>
|
||||
#endif
|
||||
|
||||
chromeos_acpi_t *vboot_data = NULL;
|
||||
|
|
@ -60,6 +61,13 @@ void chromeos_init_vboot(chromeos_acpi_t *chromeos)
|
|||
elog_add_event(ELOG_TYPE_CROS_DEVELOPER_MODE);
|
||||
if (recovery_mode_enabled()) {
|
||||
int reason = get_recovery_mode_from_vbnv();
|
||||
#if CONFIG_VBOOT_VERIFY_FIRMWARE
|
||||
if (vboot_handoff && !reason) {
|
||||
VbSharedDataHeader *sd = (VbSharedDataHeader *)
|
||||
vboot_handoff->shared_data;
|
||||
reason = sd->recovery_reason;
|
||||
}
|
||||
#endif
|
||||
elog_add_event_byte(ELOG_TYPE_CROS_RECOVERY_MODE,
|
||||
reason ? reason : ELOG_CROS_RECOVERY_MODE_BUTTON);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue