[coreboot-gerrit] Patch set updated for coreboot: d35b9b6 chromeos: Check for recovery reason code in shared data
Patrick Georgi (patrick@georgi-clan.de)
gerrit at coreboot.org
Fri Dec 20 21:15:54 CET 2013
Patrick Georgi (patrick at georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4368
-gerrit
commit d35b9b6bdb1c81f5889cd7bdfb4863ea372dfbc4
Author: Duncan Laurie <dlaurie at chromium.org>
Date: Mon Jul 15 10:38:12 2013 -0700
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.
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 at chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/61906
Reviewed-by: Aaron Durbin <adurbin at chromium.org>
---
src/vendorcode/google/chromeos/gnvs.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/vendorcode/google/chromeos/gnvs.c b/src/vendorcode/google/chromeos/gnvs.c
index 5ee3665..9f51097 100644
--- a/src/vendorcode/google/chromeos/gnvs.c
+++ b/src/vendorcode/google/chromeos/gnvs.c
@@ -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);
}
More information about the coreboot-gerrit
mailing list