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

Go to the source code of this file.

Data Structures

struct  spd_block
 

Macros

#define SPD_PAGE_LEN   256
 
#define SPD_PAGE_LEN_DDR4   512
 
#define SPD_PAGE_0   (0x6C >> 1)
 
#define SPD_PAGE_1   (0x6E >> 1)
 
#define SPD_DRAM_TYPE   2
 
#define SPD_DRAM_DDR3   0x0B
 
#define SPD_DRAM_LPDDR3_INTEL   0xF1
 
#define SPD_DRAM_LPDDR3_JEDEC   0x0F
 
#define SPD_DRAM_DDR4   0x0C
 
#define SPD_DRAM_LPDDR4   0x10
 
#define SPD_DRAM_LPDDR4X   0x11
 
#define SPD_DRAM_DDR5   0x12
 
#define SPD_DRAM_LPDDR5   0x13
 
#define SPD_DENSITY_BANKS   4
 
#define SPD_ADDRESSING   5
 
#define SPD_SN_LEN   4
 
#define DDR3_ORGANIZATION   7
 
#define DDR3_BUS_DEV_WIDTH   8
 
#define DDR4_ORGANIZATION   12
 
#define DDR4_BUS_DEV_WIDTH   13
 
#define DDR3_SPD_PART_OFF   128
 
#define DDR3_SPD_PART_LEN   18
 
#define DDR3_SPD_SN_OFF   122
 
#define LPDDR3_SPD_PART_OFF   128
 
#define LPDDR3_SPD_PART_LEN   18
 
#define DDR4_SPD_PART_OFF   329
 
#define DDR4_SPD_PART_LEN   20
 
#define DDR4_SPD_SN_OFF   325
 

Functions

void print_spd_info (uint8_t spd[])
 
uintptr_t spd_cbfs_map (u8 spd_index)
 
void dump_spd_info (struct spd_block *blk)
 
void get_spd_smbus (struct spd_block *blk)
 
enum cb_err get_spd_sn (u8 addr, u32 *sn)
 
int read_ddr3_spd_from_cbfs (u8 *buf, int idx)
 

Macro Definition Documentation

◆ DDR3_BUS_DEV_WIDTH

#define DDR3_BUS_DEV_WIDTH   8

Definition at line 26 of file spd_bin.h.

◆ DDR3_ORGANIZATION

#define DDR3_ORGANIZATION   7

Definition at line 25 of file spd_bin.h.

◆ DDR3_SPD_PART_LEN

#define DDR3_SPD_PART_LEN   18

Definition at line 30 of file spd_bin.h.

◆ DDR3_SPD_PART_OFF

#define DDR3_SPD_PART_OFF   128

Definition at line 29 of file spd_bin.h.

◆ DDR3_SPD_SN_OFF

#define DDR3_SPD_SN_OFF   122

Definition at line 31 of file spd_bin.h.

◆ DDR4_BUS_DEV_WIDTH

#define DDR4_BUS_DEV_WIDTH   13

Definition at line 28 of file spd_bin.h.

◆ DDR4_ORGANIZATION

#define DDR4_ORGANIZATION   12

Definition at line 27 of file spd_bin.h.

◆ DDR4_SPD_PART_LEN

#define DDR4_SPD_PART_LEN   20

Definition at line 35 of file spd_bin.h.

◆ DDR4_SPD_PART_OFF

#define DDR4_SPD_PART_OFF   329

Definition at line 34 of file spd_bin.h.

◆ DDR4_SPD_SN_OFF

#define DDR4_SPD_SN_OFF   325

Definition at line 36 of file spd_bin.h.

◆ LPDDR3_SPD_PART_LEN

#define LPDDR3_SPD_PART_LEN   18

Definition at line 33 of file spd_bin.h.

◆ LPDDR3_SPD_PART_OFF

#define LPDDR3_SPD_PART_OFF   128

Definition at line 32 of file spd_bin.h.

◆ SPD_ADDRESSING

#define SPD_ADDRESSING   5

Definition at line 23 of file spd_bin.h.

◆ SPD_DENSITY_BANKS

#define SPD_DENSITY_BANKS   4

Definition at line 22 of file spd_bin.h.

◆ SPD_DRAM_DDR3

#define SPD_DRAM_DDR3   0x0B

Definition at line 14 of file spd_bin.h.

◆ SPD_DRAM_DDR4

#define SPD_DRAM_DDR4   0x0C

Definition at line 17 of file spd_bin.h.

◆ SPD_DRAM_DDR5

#define SPD_DRAM_DDR5   0x12

Definition at line 20 of file spd_bin.h.

◆ SPD_DRAM_LPDDR3_INTEL

#define SPD_DRAM_LPDDR3_INTEL   0xF1

Definition at line 15 of file spd_bin.h.

◆ SPD_DRAM_LPDDR3_JEDEC

#define SPD_DRAM_LPDDR3_JEDEC   0x0F

Definition at line 16 of file spd_bin.h.

◆ SPD_DRAM_LPDDR4

#define SPD_DRAM_LPDDR4   0x10

Definition at line 18 of file spd_bin.h.

◆ SPD_DRAM_LPDDR4X

#define SPD_DRAM_LPDDR4X   0x11

Definition at line 19 of file spd_bin.h.

◆ SPD_DRAM_LPDDR5

#define SPD_DRAM_LPDDR5   0x13

Definition at line 21 of file spd_bin.h.

◆ SPD_DRAM_TYPE

#define SPD_DRAM_TYPE   2

Definition at line 13 of file spd_bin.h.

◆ SPD_PAGE_0

#define SPD_PAGE_0   (0x6C >> 1)

Definition at line 11 of file spd_bin.h.

◆ SPD_PAGE_1

#define SPD_PAGE_1   (0x6E >> 1)

Definition at line 12 of file spd_bin.h.

◆ SPD_PAGE_LEN

#define SPD_PAGE_LEN   256

Definition at line 9 of file spd_bin.h.

◆ SPD_PAGE_LEN_DDR4

#define SPD_PAGE_LEN_DDR4   512

Definition at line 10 of file spd_bin.h.

◆ SPD_SN_LEN

#define SPD_SN_LEN   4

Definition at line 24 of file spd_bin.h.

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:

◆ get_spd_smbus()

void get_spd_smbus ( struct spd_block blk)

Definition at line 72 of file smbuslib.c.

References spd_block::addr_map, get_spd(), NULL, spd_block::spd_array, spd_data, and update_spd_len().

Referenced by mainboard_memory_init_params(), read_spd_dimm(), and variant_configure_fspm().

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

◆ get_spd_sn()

enum cb_err get_spd_sn ( u8  addr,
u32 sn 
)

Definition at line 72 of file smbuslib.c.

Referenced by check_if_dimm_changed().

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:

◆ read_ddr3_spd_from_cbfs()

int read_ddr3_spd_from_cbfs ( u8 buf,
int  idx 
)

Referenced by agesa_ReadSpd_from_cbfs(), and board_ReadSpd_from_cbfs().

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: