summaryrefslogtreecommitdiff
path: root/src/soc/intel/common/block/memory
diff options
context:
space:
mode:
authorSubrata Banik <subratabanik@google.com>2022-03-10 17:21:33 +0530
committerSubrata Banik <subratabanik@google.com>2022-03-15 10:17:38 +0000
commit47b836af96186af3cf207b0a2bc4d99ac832680d (patch)
treef712300781ab5adb4ab8a849b0362b7b55cd17d7 /src/soc/intel/common/block/memory
parent2eb51aace5489b2f2d20e510f19a1e3b17bf1d60 (diff)
soc/intel/common: Pass `FSPM_UPD *` argument for spd functions
This patch adds `FSPM_UPD *` as argument for mem_populate_channel_data() and read_spd_dimm(). This change will help to update the architectural FSP-M UPDs in read_spd_dimm(). BUG=b:200243989 BRANCH=firmware-brya-14505.B TEST=Able to build and boot redrix without any visible failure/errors. Signed-off-by: Subrata Banik <subratabanik@google.com> Change-Id: I770cfd05194c33e11f98f95c5b93157b0ead70c1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62737 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Reviewed-by: Zhuohao Lee <zhuohao@google.com>
Diffstat (limited to 'src/soc/intel/common/block/memory')
-rw-r--r--src/soc/intel/common/block/memory/meminit.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/soc/intel/common/block/memory/meminit.c b/src/soc/intel/common/block/memory/meminit.c
index 89cd4e323e..272e6a1503 100644
--- a/src/soc/intel/common/block/memory/meminit.c
+++ b/src/soc/intel/common/block/memory/meminit.c
@@ -95,8 +95,9 @@ static void read_spd_md(const struct soc_mem_cfg *soc_mem_cfg, const struct mem_
#define CH_DIMM_OFFSET(ch, dimm) ((ch) * CONFIG_DIMMS_PER_CHANNEL + (dimm))
-static bool read_spd_dimm(const struct soc_mem_cfg *soc_mem_cfg, const struct mem_spd *info,
- bool half_populated, struct mem_channel_data *channel_data,
+static bool read_spd_dimm(FSPM_UPD *memupd, const struct soc_mem_cfg *soc_mem_cfg,
+ const struct mem_spd *info, bool half_populated,
+ struct mem_channel_data *channel_data,
size_t *spd_len, bool *dimms_changed)
{
size_t ch, dimm;
@@ -183,7 +184,7 @@ static bool read_spd_dimm(const struct soc_mem_cfg *soc_mem_cfg, const struct me
return pop_mask != 0;
}
-void mem_populate_channel_data(const struct soc_mem_cfg *soc_mem_cfg,
+void mem_populate_channel_data(FSPM_UPD *memupd, const struct soc_mem_cfg *soc_mem_cfg,
const struct mem_spd *spd_info,
bool half_populated,
struct mem_channel_data *data,
@@ -195,7 +196,7 @@ void mem_populate_channel_data(const struct soc_mem_cfg *soc_mem_cfg,
memset(data, 0, sizeof(*data));
read_spd_md(soc_mem_cfg, spd_info, half_populated, data, &spd_md_len);
- have_dimms = read_spd_dimm(soc_mem_cfg, spd_info, half_populated, data,
+ have_dimms = read_spd_dimm(memupd, soc_mem_cfg, spd_info, half_populated, data,
&spd_dimm_len, dimms_changed);
if (data->ch_population_flags == NO_CHANNEL_POPULATED)