vboot: remove extraneous vboot_recovery_mode_memory_retrain
Just call get_recovery_mode_retrain_switch() directly. BUG=b:124141368 TEST=make clean && make test-abuild BRANCH=none Change-Id: Icb88d6862db1782e0218276984e527638b21fd3a Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/39343 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
committed by
Patrick Georgi
parent
18129f919a
commit
9a2922871d
@@ -15,6 +15,7 @@
|
|||||||
#include <security/vboot/antirollback.h>
|
#include <security/vboot/antirollback.h>
|
||||||
#include <arch/symbols.h>
|
#include <arch/symbols.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <bootmode.h>
|
||||||
#include <cbfs.h>
|
#include <cbfs.h>
|
||||||
#include <cbmem.h>
|
#include <cbmem.h>
|
||||||
#include <cf9_reset.h>
|
#include <cf9_reset.h>
|
||||||
@@ -120,7 +121,7 @@ static void fsp_fill_mrc_cache(FSPM_ARCH_UPD *arch_upd, uint32_t fsp_version)
|
|||||||
if (vboot_recovery_mode_enabled()) {
|
if (vboot_recovery_mode_enabled()) {
|
||||||
if (!CONFIG(HAS_RECOVERY_MRC_CACHE))
|
if (!CONFIG(HAS_RECOVERY_MRC_CACHE))
|
||||||
return;
|
return;
|
||||||
if (vboot_recovery_mode_memory_retrain())
|
if (get_recovery_mode_retrain_switch())
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -521,7 +521,7 @@ static void invalidate_normal_cache(void)
|
|||||||
/* Invalidate only on recovery mode with retraining enabled. */
|
/* Invalidate only on recovery mode with retraining enabled. */
|
||||||
if (!vboot_recovery_mode_enabled())
|
if (!vboot_recovery_mode_enabled())
|
||||||
return;
|
return;
|
||||||
if (!vboot_recovery_mode_memory_retrain())
|
if (!get_recovery_mode_retrain_switch())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (fmap_locate_area_as_rdev_rw(name, &rdev) < 0) {
|
if (fmap_locate_area_as_rdev_rw(name, &rdev) < 0) {
|
||||||
|
@@ -71,11 +71,6 @@ int __weak get_recovery_mode_retrain_switch(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int vboot_recovery_mode_memory_retrain(void)
|
|
||||||
{
|
|
||||||
return get_recovery_mode_retrain_switch();
|
|
||||||
}
|
|
||||||
|
|
||||||
#if CONFIG(VBOOT_NO_BOARD_SUPPORT)
|
#if CONFIG(VBOOT_NO_BOARD_SUPPORT)
|
||||||
/**
|
/**
|
||||||
* TODO: Create flash protection interface which implements get_write_protect_state.
|
* TODO: Create flash protection interface which implements get_write_protect_state.
|
||||||
|
@@ -67,14 +67,12 @@ void verstage_mainboard_init(void);
|
|||||||
#if CONFIG(VBOOT)
|
#if CONFIG(VBOOT)
|
||||||
int vboot_developer_mode_enabled(void);
|
int vboot_developer_mode_enabled(void);
|
||||||
int vboot_recovery_mode_enabled(void);
|
int vboot_recovery_mode_enabled(void);
|
||||||
int vboot_recovery_mode_memory_retrain(void);
|
|
||||||
int vboot_can_enable_udc(void);
|
int vboot_can_enable_udc(void);
|
||||||
void vboot_run_logic(void);
|
void vboot_run_logic(void);
|
||||||
int vboot_locate_cbfs(struct region_device *rdev);
|
int vboot_locate_cbfs(struct region_device *rdev);
|
||||||
#else /* !CONFIG_VBOOT */
|
#else /* !CONFIG_VBOOT */
|
||||||
static inline int vboot_developer_mode_enabled(void) { return 0; }
|
static inline int vboot_developer_mode_enabled(void) { return 0; }
|
||||||
static inline int vboot_recovery_mode_enabled(void) { return 0; }
|
static inline int vboot_recovery_mode_enabled(void) { return 0; }
|
||||||
static inline int vboot_recovery_mode_memory_retrain(void) { return 0; }
|
|
||||||
/* If VBOOT is not enabled, we are okay enabling USB device controller (UDC). */
|
/* If VBOOT is not enabled, we are okay enabling USB device controller (UDC). */
|
||||||
static inline int vboot_can_enable_udc(void) { return 1; }
|
static inline int vboot_can_enable_udc(void) { return 1; }
|
||||||
static inline void vboot_run_logic(void) {}
|
static inline void vboot_run_logic(void) {}
|
||||||
|
@@ -14,6 +14,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <bootmode.h>
|
||||||
#include <cbfs.h>
|
#include <cbfs.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <ip_checksum.h>
|
#include <ip_checksum.h>
|
||||||
@@ -174,7 +175,7 @@ static void mt_mem_init_run(struct dramc_param_ops *dparam_ops)
|
|||||||
/* Load calibration params from flash and run fast calibration */
|
/* Load calibration params from flash and run fast calibration */
|
||||||
if (recovery_mode) {
|
if (recovery_mode) {
|
||||||
printk(BIOS_WARNING, "Skip loading cached calibration data\n");
|
printk(BIOS_WARNING, "Skip loading cached calibration data\n");
|
||||||
if (vboot_recovery_mode_memory_retrain() ||
|
if (get_recovery_mode_retrain_switch() ||
|
||||||
vboot_check_recovery_request() == VB2_RECOVERY_TRAIN_AND_REBOOT) {
|
vboot_check_recovery_request() == VB2_RECOVERY_TRAIN_AND_REBOOT) {
|
||||||
printk(BIOS_WARNING, "Retrain memory in next boot\n");
|
printk(BIOS_WARNING, "Retrain memory in next boot\n");
|
||||||
/* Use 0xFF as erased flash data. */
|
/* Use 0xFF as erased flash data. */
|
||||||
|
Reference in New Issue
Block a user