mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
UPSTREAM: 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 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> Change-Id: I46c10fbf25bc100d9f562c36da3ac646c9dae7d1 Reviewed-on: https://chromium-review.googlesource.com/410098 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
c2d8c02576
commit
e088d6cc51
3 changed files with 12 additions and 0 deletions
|
@ -22,6 +22,7 @@ int get_write_protect_state(void);
|
|||
int get_sw_write_protect_state(void);
|
||||
int get_developer_mode_switch(void);
|
||||
int get_recovery_mode_switch(void);
|
||||
int get_recovery_mode_retrain_switch(void);
|
||||
int clear_recovery_mode_switch(void);
|
||||
int get_wipeout_mode_switch(void);
|
||||
int get_lid_switch(void);
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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__ */
|
||||
|
|
Loading…
Add table
Reference in a new issue