summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/alderlake/meminit.c4
-rw-r--r--src/soc/intel/common/block/include/intelblocks/meminit.h4
-rw-r--r--src/soc/intel/common/block/memory/meminit.c9
-rw-r--r--src/soc/intel/tigerlake/meminit.c4
4 files changed, 12 insertions, 9 deletions
diff --git a/src/soc/intel/alderlake/meminit.c b/src/soc/intel/alderlake/meminit.c
index 31b3ae1cfa..2c915ef9ee 100644
--- a/src/soc/intel/alderlake/meminit.c
+++ b/src/soc/intel/alderlake/meminit.c
@@ -279,8 +279,8 @@ void memcfg_init(FSPM_UPD *memupd, const struct mb_cfg *mb_cfg,
die("Unsupported memory type(%d)\n", mb_cfg->type);
}
- mem_populate_channel_data(&soc_mem_cfg[mb_cfg->type], spd_info, half_populated, &data,
- dimms_changed);
+ mem_populate_channel_data(memupd, &soc_mem_cfg[mb_cfg->type], spd_info, half_populated,
+ &data, dimms_changed);
mem_init_spd_upds(mem_cfg, &data);
mem_init_dq_upds(mem_cfg, &data, mb_cfg, dq_dqs_auto_detect);
mem_init_dqs_upds(mem_cfg, &data, mb_cfg, dq_dqs_auto_detect);
diff --git a/src/soc/intel/common/block/include/intelblocks/meminit.h b/src/soc/intel/common/block/include/intelblocks/meminit.h
index 130249cf71..6276a7e294 100644
--- a/src/soc/intel/common/block/include/intelblocks/meminit.h
+++ b/src/soc/intel/common/block/include/intelblocks/meminit.h
@@ -3,6 +3,7 @@
#ifndef __SOC_INTEL_COMMON_BLOCK_MEMINIT_H__
#define __SOC_INTEL_COMMON_BLOCK_MEMINIT_H__
+#include <fsp/api.h>
#include <types.h>
/*
@@ -130,13 +131,14 @@ struct mem_channel_data {
/*
* This change populates data regarding memory channels in `struct
* mem_channel_data` using the following inputs from SoC code:
+ * memupd : FSP-M UPD configuration.
* soc_mem_cfg : SoC-specific information about the memory technology used by
* the mainboard.
* spd_info : Information about the memory topology.
* half_populated: Hint from mainboard if channels are half populated.
* dimms_changed: True if the dimms is changed after caching the spd data.
*/
-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,
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)
diff --git a/src/soc/intel/tigerlake/meminit.c b/src/soc/intel/tigerlake/meminit.c
index d5ca9a93d6..10c57a5532 100644
--- a/src/soc/intel/tigerlake/meminit.c
+++ b/src/soc/intel/tigerlake/meminit.c
@@ -157,8 +157,8 @@ void memcfg_init(FSPM_UPD *memupd, const struct mb_cfg *mb_cfg,
if (mb_cfg->type >= ARRAY_SIZE(soc_mem_cfg))
die("Invalid memory type(%x)!\n", mb_cfg->type);
- mem_populate_channel_data(&soc_mem_cfg[mb_cfg->type], spd_info, half_populated, &data,
- &dimms_changed);
+ mem_populate_channel_data(memupd, &soc_mem_cfg[mb_cfg->type], spd_info, half_populated,
+ &data, &dimms_changed);
mem_init_spd_upds(mem_cfg, &data);
mem_init_dq_upds(mem_cfg, &data, mb_cfg);
mem_init_dqs_upds(mem_cfg, &data, mb_cfg);