summaryrefslogtreecommitdiff
path: root/src/vboot
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@chromium.org>2016-11-05 23:52:08 -0700
committerFurquan Shaikh <furquan@google.com>2016-11-10 00:44:02 +0100
commit470852bb0898b07630b03d8246b9232fa84fe4de (patch)
treee357d1f1291642073701de81d12bac05886ebd72 /src/vboot
parent5dc2c1ba8ab30b6143fd3e860e8edb9414077922 (diff)
vboot: Add support for recovery mode with forced memory retraining
1. Add new function vboot_recovery_mode_memory_retrain that indicates if recovery mode requires memory retraining to be performed. 2. Add helper function get_recovery_mode_retrain_switch to read memory retrain switch. This is provided as weak function which should be implemented by mainboard just like {get,clear}_recovery_mode_switch. BUG=chrome-os-partner:59352 BRANCH=None TEST=Verified behavior of recovery mode with forced memory retraining on reef Change-Id: I46c10fbf25bc100d9f562c36da3ac646c9dae7d1 Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://review.coreboot.org/17241 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/vboot')
-rw-r--r--src/vboot/bootmode.c10
-rw-r--r--src/vboot/vboot_common.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/vboot/bootmode.c b/src/vboot/bootmode.c
index 12a4dc0c8d..5bb70406e3 100644
--- a/src/vboot/bootmode.c
+++ b/src/vboot/bootmode.c
@@ -162,6 +162,16 @@ int vboot_recovery_mode_enabled(void)
return !!vboot_check_recovery_request();
}
+int __attribute__((weak)) get_recovery_mode_retrain_switch(void)
+{
+ return 0;
+}
+
+int vboot_recovery_mode_memory_retrain(void)
+{
+ return get_recovery_mode_retrain_switch();
+}
+
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 59fd44ca30..956b54c196 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__ */