coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
meminit.h File Reference
#include <fsp/api.h>
#include <types.h>
Include dependency graph for meminit.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mem_spd
 
struct  soc_mem_cfg
 
struct  mem_channel_data
 

Macros

#define CHANNEL_COUNT(ch_width)   (CONFIG_DATA_BUS_WIDTH / (ch_width))
 
#define MRC_CHANNELS   CHANNEL_COUNT(CONFIG_MRC_CHANNEL_WIDTH)
 

Enumerations

enum  mem_topology { MEM_TOPO_MEMORY_DOWN = BIT(0) , MEM_TOPO_DIMM_MODULE = BIT(1) , MEM_TOPO_MIXED = MEM_TOPO_MEMORY_DOWN | MEM_TOPO_DIMM_MODULE }
 
enum  channel_population { NO_CHANNEL_POPULATED = 0 , TOP_HALF_POPULATED = BIT(0) , BOTTOM_HALF_POPULATED = BIT(1) , FULLY_POPULATED = TOP_HALF_POPULATED | BOTTOM_HALF_POPULATED }
 

Functions

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)
 
static bool channel_is_populated (size_t curr_ch, size_t max_ch, enum channel_population flags)
 

Macro Definition Documentation

◆ CHANNEL_COUNT

#define CHANNEL_COUNT (   ch_width)    (CONFIG_DATA_BUS_WIDTH / (ch_width))

Definition at line 13 of file meminit.h.

◆ MRC_CHANNELS

#define MRC_CHANNELS   CHANNEL_COUNT(CONFIG_MRC_CHANNEL_WIDTH)

Definition at line 21 of file meminit.h.

Enumeration Type Documentation

◆ channel_population

Enumerator
NO_CHANNEL_POPULATED 
TOP_HALF_POPULATED 
BOTTOM_HALF_POPULATED 
FULLY_POPULATED 

Definition at line 111 of file meminit.h.

◆ mem_topology

Enumerator
MEM_TOPO_MEMORY_DOWN 
MEM_TOPO_DIMM_MODULE 
MEM_TOPO_MIXED 

Definition at line 24 of file meminit.h.

Function Documentation

◆ channel_is_populated()

static bool channel_is_populated ( size_t  curr_ch,
size_t  max_ch,
enum channel_population  flags 
)
inlinestatic

Definition at line 150 of file meminit.h.

Referenced by mem_init_dq_dqs_upds().

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: