coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
smbuslib.c File Reference
#include <console/console.h>
#include <spd_bin.h>
#include <device/smbus_def.h>
#include <device/smbus_host.h>
#include "smbuslib.h"
Include dependency graph for smbuslib.c:

Go to the source code of this file.

Functions

static void update_spd_len (struct spd_block *blk)
 
static void smbus_read_spd (u8 *spd, u8 addr)
 
static int get_spd (u8 *spd, u8 addr)
 
void get_spd_smbus (struct spd_block *blk)
 
enum cb_err get_spd_sn (u8 addr, u32 *sn)
 

Variables

static u8 spd_data [CONFIG_DIMM_MAX *CONFIG_DIMM_SPD_SIZE]
 

Function Documentation

◆ get_spd()

static int get_spd ( u8 spd,
u8  addr 
)
static

Definition at line 41 of file smbuslib.c.

References addr, BIOS_INFO, printk, smbus_read_byte(), smbus_read_spd(), smbus_write_byte(), SPD_DRAM_DDR4, SPD_DRAM_TYPE, SPD_PAGE_0, SPD_PAGE_1, and SPD_PAGE_LEN.

Referenced by get_spd_smbus().

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:

◆ smbus_read_spd()

static void smbus_read_spd ( u8 spd,
u8  addr 
)
static

Definition at line 23 of file smbuslib.c.

References addr, CONFIG, smbus_read_byte(), and SPD_PAGE_LEN.

Referenced by get_spd().

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

◆ update_spd_len()

static void update_spd_len ( struct spd_block blk)
static

Definition at line 9 of file smbuslib.c.

References spd_block::len, NULL, spd_block::spd_array, SPD_DRAM_DDR4, SPD_DRAM_TYPE, SPD_PAGE_LEN, and SPD_PAGE_LEN_DDR4.

Referenced by get_spd_smbus().

Here is the caller graph for this function:

Variable Documentation

◆ spd_data

u8 spd_data[CONFIG_DIMM_MAX *CONFIG_DIMM_SPD_SIZE]
static