From b8b40964fc1dae62ab237c1a839b66ec105ad860 Mon Sep 17 00:00:00 2001 From: Zhuohao Lee Date: Thu, 20 Jan 2022 23:36:37 +0800 Subject: mb, soc: Add the SPD_CACHE_ENABLE In order to cache the spd data which reads from the memory module, we add SPD_CACHE_ENABLE option to enable the cache for the spd data. If this option is enabled, the RW_SPD_CACHE region needs to be added to the flash layout for caching the data. Since the user may remove the memory module after the bios caching the data, we need to add the invalidate flag to invalidate the mrc cache. Otherwise, the bios will use the mrc cache and can make the device malfunction. BUG=b:200243989 BRANCH=firmware-brya-14505.B TEST=build pass and enable this feature to the brask the device could speed up around 150ms with this feature. Change-Id: If7625a00c865dc268e2a22efd71b34b40c40877b Signed-off-by: Zhuohao Lee Reviewed-on: https://review.coreboot.org/c/coreboot/+/62294 Reviewed-by: EricR Lai Tested-by: build bot (Jenkins) --- src/mainboard/prodrive/atlas/romstage_fsp_params.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mainboard/prodrive') diff --git a/src/mainboard/prodrive/atlas/romstage_fsp_params.c b/src/mainboard/prodrive/atlas/romstage_fsp_params.c index 837a528422..9728a99a4f 100644 --- a/src/mainboard/prodrive/atlas/romstage_fsp_params.c +++ b/src/mainboard/prodrive/atlas/romstage_fsp_params.c @@ -32,6 +32,7 @@ void mainboard_memory_init_params(FSPM_UPD *memupd) FSP_M_CONFIG *m_cfg = &memupd->FspmConfig; const struct mb_cfg *mem_config = &ddr5_mem_config; const bool half_populated = false; + bool dimms_changed = false; const struct mem_spd dimm_module_spd_info = { .topo = MEM_TOPO_DIMM_MODULE, @@ -47,5 +48,5 @@ void mainboard_memory_init_params(FSPM_UPD *memupd) }, }; - memcfg_init(m_cfg, mem_config, &dimm_module_spd_info, half_populated); + memcfg_init(m_cfg, mem_config, &dimm_module_spd_info, half_populated, &dimms_changed); } -- cgit v1.2.3