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 <fsp/util.h>
#include <soc/meminit.h>
#include <string.h>
Include dependency graph for meminit.c:

Go to the source code of this file.

Macros

#define LP4X_CH_WIDTH   16
 
#define LP4X_CHANNELS   CHANNEL_COUNT(LP4X_CH_WIDTH)
 
#define DDR4_CH_WIDTH   64
 
#define DDR4_CHANNELS   CHANNEL_COUNT(DDR4_CH_WIDTH)
 

Functions

static void mem_init_spd_upds (FSP_M_CONFIG *mem_cfg, const struct mem_channel_data *data)
 
static void mem_init_dq_dqs_upds (void *upds[MRC_CHANNELS], const void *map, size_t upd_size, const struct mem_channel_data *data)
 
static void mem_init_dq_upds (FSP_M_CONFIG *mem_cfg, const struct mem_channel_data *data, const struct mb_cfg *mb_cfg)
 
static void mem_init_dqs_upds (FSP_M_CONFIG *mem_cfg, const struct mem_channel_data *data, const struct mb_cfg *mb_cfg)
 
void memcfg_init (FSPM_UPD *memupd, const struct mb_cfg *mb_cfg, const struct mem_spd *spd_info, bool half_populated)
 

Variables

static const struct soc_mem_cfg soc_mem_cfg []
 

Macro Definition Documentation

◆ DDR4_CH_WIDTH

#define DDR4_CH_WIDTH   64

Definition at line 12 of file meminit.c.

◆ DDR4_CHANNELS

#define DDR4_CHANNELS   CHANNEL_COUNT(DDR4_CH_WIDTH)

Definition at line 13 of file meminit.c.

◆ LP4X_CH_WIDTH

#define LP4X_CH_WIDTH   16

Definition at line 9 of file meminit.c.

◆ LP4X_CHANNELS

#define LP4X_CHANNELS   CHANNEL_COUNT(LP4X_CH_WIDTH)

Definition at line 10 of file meminit.c.

Function Documentation

◆ mem_init_dq_dqs_upds()

static void mem_init_dq_dqs_upds ( void upds[MRC_CHANNELS],
const void map,
size_t  upd_size,
const struct mem_channel_data data 
)
static

Definition at line 95 of file meminit.c.

References mem_channel_data::ch_population_flags, channel_is_populated(), memcpy(), memset(), and MRC_CHANNELS.

Referenced by mem_init_dq_upds(), and mem_init_dqs_upds().

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

◆ mem_init_dq_upds()

static void mem_init_dq_upds ( FSP_M_CONFIG mem_cfg,
const struct mem_channel_data data,
const struct mb_cfg mb_cfg 
)
static

Definition at line 108 of file meminit.c.

References _Static_assert(), mb_cfg::dq_map, mem_init_dq_dqs_upds(), and MRC_CHANNELS.

Referenced by memcfg_init().

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

◆ mem_init_dqs_upds()

static void mem_init_dqs_upds ( FSP_M_CONFIG mem_cfg,
const struct mem_channel_data data,
const struct mb_cfg mb_cfg 
)
static

Definition at line 129 of file meminit.c.

References _Static_assert(), mb_cfg::dqs_map, mem_init_dq_dqs_upds(), and MRC_CHANNELS.

Referenced by memcfg_init().

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

◆ mem_init_spd_upds()

static void mem_init_spd_upds ( FSP_M_CONFIG mem_cfg,
const struct mem_channel_data data 
)
static

Definition at line 55 of file meminit.c.

References BIT, ch, MRC_CHANNELS, mem_channel_data::spd, and mem_channel_data::spd_len.

Referenced by memcfg_init().

Here is the caller graph for this function:

◆ memcfg_init()

Variable Documentation

◆ soc_mem_cfg

const struct soc_mem_cfg soc_mem_cfg[]
static

Definition at line 1 of file meminit.c.