coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
spd_bin.c File Reference
#include <cbfs.h>
#include <console/console.h>
#include <memory_info.h>
#include <spd_bin.h>
#include <string.h>
#include <device/dram/ddr3.h>
Include dependency graph for spd_bin.c:

Go to the source code of this file.

Functions

void dump_spd_info (struct spd_block *blk)
 
const char *__weak mainboard_get_dram_part_num (void)
 
static bool use_ddr4_params (int dram_type)
 
static const char * spd_get_module_type_string (int dram_type)
 
static int spd_get_banks (const uint8_t spd[], int dram_type)
 
static int spd_get_capmb (const uint8_t spd[])
 
static int spd_get_rows (const uint8_t spd[])
 
static int spd_get_cols (const uint8_t spd[])
 
static int spd_get_ranks (const uint8_t spd[], int dram_type)
 
static int spd_get_devw (const uint8_t spd[], int dram_type)
 
static int spd_get_busw (const uint8_t spd[], int dram_type)
 
static void spd_get_name (const uint8_t spd[], int type, const char **spd_name, size_t *len)
 
void print_spd_info (uint8_t spd[])
 
uintptr_t spd_cbfs_map (u8 spd_index)
 

Function Documentation

◆ dump_spd_info()

void dump_spd_info ( struct spd_block blk)

Definition at line 10 of file spd_bin.c.

References spd_block::addr_map, BIOS_DEBUG, NULL, print_spd_info(), printk, and spd_block::spd_array.

Referenced by mainboard_memory_init_params(), and variant_configure_fspm().

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

◆ mainboard_get_dram_part_num()

const char* __weak mainboard_get_dram_part_num ( void  )

Definition at line 21 of file spd_bin.c.

References NULL.

Referenced by save_dimm_info(), and spd_get_name().

Here is the caller graph for this function:

◆ print_spd_info()

void print_spd_info ( uint8_t  spd[])

Definition at line 183 of file spd_bin.c.

References BIOS_INFO, NULL, printk, SPD_DRAM_TYPE, spd_get_banks(), spd_get_busw(), spd_get_capmb(), spd_get_cols(), spd_get_devw(), spd_get_module_type_string(), spd_get_name(), spd_get_ranks(), spd_get_rows(), and type.

Referenced by dump_spd_info(), memcfg_init(), meminit_cbfs_spd_index(), read_spd_dimm(), and read_spd_md().

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

◆ spd_cbfs_map()

uintptr_t spd_cbfs_map ( u8  spd_index)

Definition at line 217 of file spd_bin.c.

References cbfs_type_map(), CBFS_TYPE_SPD, and spd_index.

Referenced by mainboard_memory_init_params(), meminit_cbfs_spd_index(), read_spd_md(), spd_read_from_cbfs(), and variant_mainboard_read_spd().

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

◆ spd_get_banks()

static int spd_get_banks ( const uint8_t  spd[],
int  dram_type 
)
static

Definition at line 70 of file spd_bin.c.

References ARRAY_SIZE, SPD_DENSITY_BANKS, and use_ddr4_params().

Referenced by print_spd_info().

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

◆ spd_get_busw()

static int spd_get_busw ( const uint8_t  spd[],
int  dram_type 
)
static

Definition at line 137 of file spd_bin.c.

References ARRAY_SIZE, DDR3_BUS_DEV_WIDTH, DDR4_BUS_DEV_WIDTH, and use_ddr4_params().

Referenced by print_spd_info().

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

◆ spd_get_capmb()

static int spd_get_capmb ( const uint8_t  spd[])
static

Definition at line 87 of file spd_bin.c.

References ARRAY_SIZE, and SPD_DENSITY_BANKS.

Referenced by print_spd_info().

Here is the caller graph for this function:

◆ spd_get_cols()

static int spd_get_cols ( const uint8_t  spd[])
static

Definition at line 106 of file spd_bin.c.

References ARRAY_SIZE, and SPD_ADDRESSING.

Referenced by print_spd_info().

Here is the caller graph for this function:

◆ spd_get_devw()

static int spd_get_devw ( const uint8_t  spd[],
int  dram_type 
)
static

Definition at line 126 of file spd_bin.c.

References ARRAY_SIZE, DDR3_ORGANIZATION, DDR4_ORGANIZATION, and use_ddr4_params().

Referenced by print_spd_info().

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

◆ spd_get_module_type_string()

static const char* spd_get_module_type_string ( int  dram_type)
static

Definition at line 48 of file spd_bin.c.

References SPD_DRAM_DDR3, SPD_DRAM_DDR4, SPD_DRAM_DDR5, SPD_DRAM_LPDDR3_INTEL, SPD_DRAM_LPDDR3_JEDEC, SPD_DRAM_LPDDR4, SPD_DRAM_LPDDR4X, and SPD_DRAM_LPDDR5.

Referenced by print_spd_info().

Here is the caller graph for this function:

◆ spd_get_name()

static void spd_get_name ( const uint8_t  spd[],
int  type,
const char **  spd_name,
size_t len 
)
static

◆ spd_get_ranks()

static int spd_get_ranks ( const uint8_t  spd[],
int  dram_type 
)
static

Definition at line 115 of file spd_bin.c.

References ARRAY_SIZE, DDR3_ORGANIZATION, DDR4_ORGANIZATION, and use_ddr4_params().

Referenced by print_spd_info().

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

◆ spd_get_rows()

static int spd_get_rows ( const uint8_t  spd[])
static

Definition at line 97 of file spd_bin.c.

References ARRAY_SIZE, and SPD_ADDRESSING.

Referenced by print_spd_info().

Here is the caller graph for this function:

◆ use_ddr4_params()

static bool use_ddr4_params ( int  dram_type)
static