Andrey Petrov (andrey.petrov@intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17164
-gerrit
commit 6841aeb3b8293d8a66531071a71f57ea45babb38 Author: Andrey Petrov andrey.petrov@intel.com Date: Thu Oct 27 10:11:18 2016 -0700
vboot: Add recovery mode with full memory retrain
BUG=chrome-os-partner:56643 BRANCH=none TEST=invoke power-alt-refresh key combination, notice memory is retrained in recovery
Change-Id: I2f6ff7eac5f6c7af198cd1a43902cdd9ca6e66c0 Signed-off-by: Andrey Petrov andrey.petrov@intel.com --- src/vboot/bootmode.c | 6 ++++++ src/vboot/vboot_common.h | 1 + 2 files changed, 7 insertions(+)
diff --git a/src/vboot/bootmode.c b/src/vboot/bootmode.c index 12a4dc0..6637cab 100644 --- a/src/vboot/bootmode.c +++ b/src/vboot/bootmode.c @@ -22,6 +22,7 @@ #include <vboot/misc.h> #include <vboot/vbnv.h> #include <vboot/vboot_common.h> +#include <ec/google/chromeec/ec.h>
static int vb2_get_recovery_reason_shared_data(void) { @@ -162,6 +163,11 @@ int vboot_recovery_mode_enabled(void) return !!vboot_check_recovery_request(); }
+int vboot_recovery_mode_memory_retrain(void) +{ + return !!((google_chromeec_get_switches() & EC_SWITCH_RECOVERY_MEM_RETRAIN)); +} + int vboot_developer_mode_enabled(void) { if (!IS_ENABLED(CONFIG_VBOOT)) diff --git a/src/vboot/vboot_common.h b/src/vboot/vboot_common.h index 59fd44c..956b54c 100644 --- a/src/vboot/vboot_common.h +++ b/src/vboot/vboot_common.h @@ -107,5 +107,6 @@ void verstage_mainboard_init(void); /* Check boot modes */ int vboot_developer_mode_enabled(void); int vboot_recovery_mode_enabled(void); +int vboot_recovery_mode_memory_retrain(void);
#endif /* __VBOOT_VBOOT_COMMON_H__ */