summaryrefslogtreecommitdiff
path: root/src/vendorcode/google/chromeos
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2012-06-23 17:33:30 -0700
committerRonald G. Minnich <rminnich@gmail.com>2012-07-25 22:24:56 +0200
commit27e5aacc522a4ce97ffd8d57a93042d9703d70fe (patch)
tree95aa6cf76b338689dcb806cd04ee1d77cd3380ec /src/vendorcode/google/chromeos
parentc0f2cfb0ac55eb476387b703cb561868f989c16e (diff)
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> Reviewed-on: http://review.coreboot.org/1321 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/vendorcode/google/chromeos')
-rw-r--r--src/vendorcode/google/chromeos/gnvs.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/vendorcode/google/chromeos/gnvs.c b/src/vendorcode/google/chromeos/gnvs.c
index aaca95aa43..c8ccfe4301 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)