Stefan Reinauer (stefan.reinauer@coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1321
-gerrit
commit 7a33471cb4802513b5349967fd5f328a9f491b13 Author: Duncan Laurie dlaurie@chromium.org Date: Sat Jun 23 17:33:30 2012 -0700
ELOG: Log events for Chrome OS developer/recovery mode
If a Chrome OS device is in developer mode log an event. When the device is in recovery mode also log an event and provide the recovery reason.
Enable developer mode and trigger recovery mode and verify that the events are logged:
238 | 2012-06-23 17:31:56 | Chrome OS Developer Mode 239 | 2012-06-23 17:31:56 | Chrome OS Recovery Mode | User Requested from Developer Screen
Change-Id: I14d41f44e04fd91340569617c7314da7e35a154f Signed-off-by: Duncan Laurie dlaurie@chromium.org --- src/vendorcode/google/chromeos/gnvs.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/vendorcode/google/chromeos/gnvs.c b/src/vendorcode/google/chromeos/gnvs.c index aaca95a..c8ccfe4 100644 --- a/src/vendorcode/google/chromeos/gnvs.c +++ b/src/vendorcode/google/chromeos/gnvs.c @@ -21,6 +21,9 @@ #include <string.h> #include <cbfs.h> #include <console/console.h> +#include <elog.h> + +#include "chromeos.h" #include "gnvs.h"
chromeos_acpi_t *vboot_data = NULL; @@ -32,6 +35,14 @@ void chromeos_init_vboot(chromeos_acpi_t *chromeos)
/* Copy saved ME hash into NVS */ memcpy(vboot_data->mehh, me_hash_saved, sizeof(vboot_data->mehh)); + +#if CONFIG_ELOG + if (developer_mode_enabled()) + elog_add_event(ELOG_TYPE_CROS_DEVELOPER_MODE); + if (recovery_mode_enabled()) + elog_add_event_byte(ELOG_TYPE_CROS_RECOVERY_MODE, + get_recovery_mode_from_vbnv()); +#endif }
void chromeos_set_me_hash(u32 *hash, int len)