skylake DDR4 boards: Set `CaVrefConfig` to 2
The `CaVrefConfig` FSP-M UPD describes how the on-die Vref generators are connected to the DRAM. With the exception of an early Skylake RVP board (which doesn't have coreboot support), mainboards using DDR3 or LPDDR3 memory should set `CaVrefConfig` to 0, whereas mainboards with DDR4 should set `CaVrefConfig` to 2. MRC uses this information during memory training, so it is important to use the correct value to avoid any issues, such as increased power usage, system instability or even boot failures. However, several Skylake DDR4 mainboards don't set `CaVrefConfig` to 2. Although they can boot successfully, it's not optimal. For boards that set `DIMM_SPD_SIZE` to 512 (DDR4 SPD size), set `CaVrefConfig` to 2. Change-Id: Idab77daff311584b3e3061e9bf107c2fc1b7bdf1 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/57262 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
This commit is contained in:
parent
8031abfcc2
commit
e1269a7f21
|
@ -36,6 +36,7 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
|
||||||
mainboard_fill_rcomp_strength_data(&mem_cfg->RcompTarget);
|
mainboard_fill_rcomp_strength_data(&mem_cfg->RcompTarget);
|
||||||
|
|
||||||
mem_cfg->DqPinsInterleaved = TRUE;
|
mem_cfg->DqPinsInterleaved = TRUE;
|
||||||
|
mem_cfg->CaVrefConfig = 2;
|
||||||
mem_cfg->MemorySpdDataLen = blk.len;
|
mem_cfg->MemorySpdDataLen = blk.len;
|
||||||
mem_cfg->MemorySpdPtr00 = (uintptr_t) blk.spd_array[0];
|
mem_cfg->MemorySpdPtr00 = (uintptr_t) blk.spd_array[0];
|
||||||
mem_cfg->MemorySpdPtr10 = (uintptr_t) blk.spd_array[1];
|
mem_cfg->MemorySpdPtr10 = (uintptr_t) blk.spd_array[1];
|
||||||
|
|
|
@ -22,6 +22,7 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
|
||||||
assert(sizeof(mem_cfg->RcompTarget) == sizeof(rcomp_targets));
|
assert(sizeof(mem_cfg->RcompTarget) == sizeof(rcomp_targets));
|
||||||
|
|
||||||
mem_cfg->DqPinsInterleaved = 1;
|
mem_cfg->DqPinsInterleaved = 1;
|
||||||
|
mem_cfg->CaVrefConfig = 2;
|
||||||
get_spd_smbus(&blk);
|
get_spd_smbus(&blk);
|
||||||
mem_cfg->MemorySpdDataLen = blk.len;
|
mem_cfg->MemorySpdDataLen = blk.len;
|
||||||
mem_cfg->MemorySpdPtr00 = (uintptr_t)blk.spd_array[0];
|
mem_cfg->MemorySpdPtr00 = (uintptr_t)blk.spd_array[0];
|
||||||
|
|
|
@ -32,6 +32,7 @@ void variant_configure_fspm(FSPM_UPD *mupd)
|
||||||
mainboard_fill_rcomp_strength_data(&mem_cfg->RcompTarget);
|
mainboard_fill_rcomp_strength_data(&mem_cfg->RcompTarget);
|
||||||
|
|
||||||
mem_cfg->DqPinsInterleaved = TRUE;
|
mem_cfg->DqPinsInterleaved = TRUE;
|
||||||
|
mem_cfg->CaVrefConfig = 2;
|
||||||
mem_cfg->MemorySpdDataLen = blk.len;
|
mem_cfg->MemorySpdDataLen = blk.len;
|
||||||
mem_cfg->MemorySpdPtr00 = (uintptr_t)blk.spd_array[0];
|
mem_cfg->MemorySpdPtr00 = (uintptr_t)blk.spd_array[0];
|
||||||
mem_cfg->MemorySpdPtr10 = (uintptr_t)blk.spd_array[1];
|
mem_cfg->MemorySpdPtr10 = (uintptr_t)blk.spd_array[1];
|
||||||
|
|
|
@ -19,6 +19,7 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
|
||||||
mainboard_fill_rcomp_strength_data(&mem_cfg->RcompTarget);
|
mainboard_fill_rcomp_strength_data(&mem_cfg->RcompTarget);
|
||||||
|
|
||||||
mem_cfg->DqPinsInterleaved = 1;
|
mem_cfg->DqPinsInterleaved = 1;
|
||||||
|
mem_cfg->CaVrefConfig = 2;
|
||||||
get_spd_smbus(&blk);
|
get_spd_smbus(&blk);
|
||||||
mem_cfg->MemorySpdDataLen = blk.len;
|
mem_cfg->MemorySpdDataLen = blk.len;
|
||||||
mem_cfg->MemorySpdPtr00 = (uintptr_t)blk.spd_array[0];
|
mem_cfg->MemorySpdPtr00 = (uintptr_t)blk.spd_array[0];
|
||||||
|
|
|
@ -27,6 +27,7 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
|
||||||
.addr_map = { 0x50, 0x52, },
|
.addr_map = { 0x50, 0x52, },
|
||||||
};
|
};
|
||||||
mem_cfg->DqPinsInterleaved = 1;
|
mem_cfg->DqPinsInterleaved = 1;
|
||||||
|
mem_cfg->CaVrefConfig = 2;
|
||||||
get_spd_smbus(&blk);
|
get_spd_smbus(&blk);
|
||||||
mem_cfg->MemorySpdDataLen = blk.len;
|
mem_cfg->MemorySpdDataLen = blk.len;
|
||||||
mem_cfg->MemorySpdPtr00 = (uintptr_t)blk.spd_array[0];
|
mem_cfg->MemorySpdPtr00 = (uintptr_t)blk.spd_array[0];
|
||||||
|
|
|
@ -37,6 +37,7 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
|
||||||
sizeof(memory_params->RcompTarget));
|
sizeof(memory_params->RcompTarget));
|
||||||
|
|
||||||
memory_params->DqPinsInterleaved = true;
|
memory_params->DqPinsInterleaved = true;
|
||||||
|
memory_params->CaVrefConfig = 2;
|
||||||
|
|
||||||
const uint8_t ht = get_uint_option("hyper_threading", memory_params->HyperThreading);
|
const uint8_t ht = get_uint_option("hyper_threading", memory_params->HyperThreading);
|
||||||
memory_params->HyperThreading = ht;
|
memory_params->HyperThreading = ht;
|
||||||
|
|
|
@ -29,6 +29,7 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
|
||||||
memcpy(mem_cfg->RcompTarget, rcomp_targets, sizeof(mem_cfg->RcompTarget));
|
memcpy(mem_cfg->RcompTarget, rcomp_targets, sizeof(mem_cfg->RcompTarget));
|
||||||
|
|
||||||
mem_cfg->DqPinsInterleaved = TRUE;
|
mem_cfg->DqPinsInterleaved = TRUE;
|
||||||
|
mem_cfg->CaVrefConfig = 2;
|
||||||
mem_cfg->MemorySpdDataLen = blk.len;
|
mem_cfg->MemorySpdDataLen = blk.len;
|
||||||
mem_cfg->MemorySpdPtr00 = (uintptr_t) blk.spd_array[0];
|
mem_cfg->MemorySpdPtr00 = (uintptr_t) blk.spd_array[0];
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
|
||||||
};
|
};
|
||||||
|
|
||||||
mem_cfg->DqPinsInterleaved = 1;
|
mem_cfg->DqPinsInterleaved = 1;
|
||||||
|
mem_cfg->CaVrefConfig = 2;
|
||||||
get_spd_smbus(&blk);
|
get_spd_smbus(&blk);
|
||||||
mem_cfg->MemorySpdDataLen = blk.len;
|
mem_cfg->MemorySpdDataLen = blk.len;
|
||||||
mem_cfg->MemorySpdPtr00 = (uintptr_t)blk.spd_array[0];
|
mem_cfg->MemorySpdPtr00 = (uintptr_t)blk.spd_array[0];
|
||||||
|
|
Loading…
Reference in New Issue