coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
meminit.c File Reference
#include <assert.h>
#include <console/console.h>
#include <intelblocks/meminit.h>
#include <commonlib/region.h>
#include <spd_bin.h>
#include <spd_cache.h>
#include <string.h>
#include <types.h>
Include dependency graph for meminit.c:

Go to the source code of this file.

Macros

#define CH_DIMM_OFFSET(ch, dimm)   ((ch) * CONFIG_DIMMS_PER_CHANNEL + (dimm))
 

Functions

 _Static_assert (CONFIG_MRC_CHANNEL_WIDTH > 0, "MRC channel width must be >0!")
 
 _Static_assert (CONFIG_DATA_BUS_WIDTH > 0, "Data bus width must be >0!")
 
 _Static_assert (CONFIG_DIMMS_PER_CHANNEL > 0, "DIMMS per channel must be >0!")
 
static enum channel_population populated_mask_to_flag (uint32_t pop_mask, size_t max_channels)
 
static void read_spd_md (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)
 
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)
 
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)
 

Macro Definition Documentation

◆ CH_DIMM_OFFSET

#define CH_DIMM_OFFSET (   ch,
  dimm 
)    ((ch) * CONFIG_DIMMS_PER_CHANNEL + (dimm))

Definition at line 96 of file meminit.c.

Function Documentation

◆ _Static_assert() [1/3]

_Static_assert ( CONFIG_DATA_BUS_WIDTH  ,
,
"Data bus width must  be,
0!"   
)

◆ _Static_assert() [2/3]

_Static_assert ( CONFIG_DIMMS_PER_CHANNEL  ,
,
"DIMMS per channel must  be,
0!"   
)

◆ _Static_assert() [3/3]

_Static_assert ( CONFIG_MRC_CHANNEL_WIDTH  ,
,
"MRC channel width must  be,
0!"   
)

Referenced by mem_init_dq_upds(), mem_init_dqs_upds(), and read_spd_md().

Here is the caller graph for this function:

◆ mem_populate_channel_data()

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 
)

Definition at line 187 of file meminit.c.

References mem_channel_data::ch_population_flags, die(), MEM_TOPO_DIMM_MODULE, MEM_TOPO_MEMORY_DOWN, memset(), NO_CHANNEL_POPULATED, read_spd_dimm(), read_spd_md(), and mem_channel_data::spd_len.

Referenced by memcfg_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ populated_mask_to_flag()

static enum channel_population populated_mask_to_flag ( uint32_t  pop_mask,
size_t  max_channels 
)
static

Definition at line 14 of file meminit.c.

Referenced by read_spd_dimm(), and read_spd_md().

Here is the caller graph for this function:

◆ read_spd_dimm()

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 
)
static

◆ read_spd_md()

static void read_spd_md ( 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 
)
static