mb/ocp/deltalake: Add VPD option to force memory training
Add function to force memory training and add VPD variable to operate this function. Tested=On OCP Delta Lake, memory training can be forced via VPD. Signed-off-by: Tim Chu <Tim.Chu@quantatw.com> Change-Id: I53a923b51b36f9f5db491ef142109f58f9a4611d Reviewed-on: https://review.coreboot.org/c/coreboot/+/51972 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
This commit is contained in:
parent
736c94f361
commit
96088bf089
|
@ -183,6 +183,8 @@ static void mainboard_config_iio(FSPM_UPD *mupd)
|
||||||
|
|
||||||
void mainboard_memory_init_params(FSPM_UPD *mupd)
|
void mainboard_memory_init_params(FSPM_UPD *mupd)
|
||||||
{
|
{
|
||||||
|
uint8_t val;
|
||||||
|
|
||||||
/* Since it's the first IPMI command, it's better to run get BMC
|
/* Since it's the first IPMI command, it's better to run get BMC
|
||||||
selftest result first */
|
selftest result first */
|
||||||
if (ipmi_kcs_premem_init(CONFIG_BMC_KCS_BASE, 0) == CB_SUCCESS) {
|
if (ipmi_kcs_premem_init(CONFIG_BMC_KCS_BASE, 0) == CB_SUCCESS) {
|
||||||
|
@ -190,6 +192,14 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
|
||||||
init_frb2_wdt();
|
init_frb2_wdt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Enable force memory training */
|
||||||
|
if (vpd_get_bool(MEM_TRAIN_FORCE, VPD_RW_THEN_RO, &val)) {
|
||||||
|
if (mupd->FspmArchUpd.NvsBufferPtr && val) {
|
||||||
|
mupd->FspmArchUpd.NvsBufferPtr = 0;
|
||||||
|
printk(BIOS_DEBUG, "Force Memory Training...Start\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mainboard_config_gpios(mupd);
|
mainboard_config_gpios(mupd);
|
||||||
mainboard_config_iio(mupd);
|
mainboard_config_iio(mupd);
|
||||||
mainboard_config_upd(mupd);
|
mainboard_config_upd(mupd);
|
||||||
|
|
|
@ -50,4 +50,7 @@
|
||||||
#define SKIP_INTEL_TXT_LOCKDOWN "skip_intel_txt_lockdown"
|
#define SKIP_INTEL_TXT_LOCKDOWN "skip_intel_txt_lockdown"
|
||||||
#define SKIP_INTEL_TXT_LOCKDOWN_DEFAULT 0
|
#define SKIP_INTEL_TXT_LOCKDOWN_DEFAULT 0
|
||||||
|
|
||||||
|
/* Force memory training: 0 = Disable, 1 = Enable, Default setting is 0 */
|
||||||
|
#define MEM_TRAIN_FORCE "mem_train_force_enable"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue