summaryrefslogtreecommitdiffstats
path: root/src/mainboard/google/brya/romstage.c
diff options
context:
space:
mode:
authorZhuohao Lee <zhuohao@chromium.org>2022-01-20 23:36:37 +0800
committerFelix Held <felix-coreboot@felixheld.de>2022-03-02 13:10:21 +0000
commitb8b40964fc1dae62ab237c1a839b66ec105ad860 (patch)
treedb18cdf31ca47a97e386010e8339407b0641c589 /src/mainboard/google/brya/romstage.c
parent1fcf78cc8eff90881d5d03e38408d584f66a5035 (diff)
downloadcoreboot-b8b40964fc1dae62ab237c1a839b66ec105ad860.tar.gz
coreboot-b8b40964fc1dae62ab237c1a839b66ec105ad860.tar.bz2
coreboot-b8b40964fc1dae62ab237c1a839b66ec105ad860.zip
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 <zhuohao@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/62294 Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/brya/romstage.c')
-rw-r--r--src/mainboard/google/brya/romstage.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mainboard/google/brya/romstage.c b/src/mainboard/google/brya/romstage.c
index ae47167ec1c2..a00cf32a839a 100644
--- a/src/mainboard/google/brya/romstage.c
+++ b/src/mainboard/google/brya/romstage.c
@@ -13,6 +13,7 @@ void mainboard_memory_init_params(FSPM_UPD *memupd)
const struct mb_cfg *mem_config = variant_memory_params();
bool half_populated = variant_is_half_populated();
struct mem_spd spd_info;
+ bool dimms_changed = false;
memset(&spd_info, 0, sizeof(spd_info));
variant_get_spd_info(&spd_info);
@@ -20,7 +21,11 @@ void mainboard_memory_init_params(FSPM_UPD *memupd)
const struct pad_config *pads;
size_t pads_num;
- memcfg_init(m_cfg, mem_config, &spd_info, half_populated);
+ memcfg_init(m_cfg, mem_config, &spd_info, half_populated, &dimms_changed);
+ if (dimms_changed) {
+ memupd->FspmArchUpd.NvsBufferPtr = 0;
+ memupd->FspmArchUpd.BootMode = FSP_BOOT_WITH_FULL_CONFIGURATION;
+ }
pads = variant_romstage_gpio_table(&pads_num);
gpio_configure_pads(pads, pads_num);