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>
This commit is contained in:
parent
c0f2cfb0ac
commit
27e5aacc52
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue