![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <console/console.h>
#include <cbmem.h>
#include <device/device.h>
#include <device/dram/ddr4.h>
#include <string.h>
#include <memory_info.h>
#include <smbios.h>
#include <types.h>
Go to the source code of this file.
Data Structures | |
struct | ddr4_speed_attr |
struct | spd_block |
Enumerations | |
enum | ddr4_speed_grade { DDR4_1600 , DDR4_1866 , DDR4_2133 , DDR4_2400 , DDR4_2666 , DDR4_2933 , DDR4_3200 } |
enum | spd_block_type { BLOCK_0 , BLOCK_1 , BLOCK_1_L , BLOCK_1_H , BLOCK_2 , BLOCK_2_L , BLOCK_2_H , BLOCK_3 } |
Functions | |
static bool | verify_block (const spd_block *block, spd_raw_data spd) |
static bool | block_exists (spd_block_type type, u8 dimm_type) |
uint16_t | ddr4_speed_mhz_to_reported_mts (uint16_t speed_mhz) |
Converts DDR4 clock speed in MHz to the standard reported speed in MT/s. More... | |
int | spd_decode_ddr4 (struct dimm_attr_ddr4_st *dimm, spd_raw_data spd) |
Decode the raw SPD data. More... | |
enum cb_err | spd_add_smbios17_ddr4 (const u8 channel, const u8 slot, const u16 selected_freq, const struct dimm_attr_ddr4_st *info) |
Variables | |
static const struct ddr4_speed_attr | ddr4_speeds [] |
DDR4 speed attributes derived from JEDEC 79-4C tables 169 & 170. More... | |
const spd_block | spd_blocks [] |
enum ddr4_speed_grade |
enum spd_block_type |
|
static |
Converts DDR4 clock speed in MHz to the standard reported speed in MT/s.
Definition at line 137 of file ddr4.c.
References ARRAY_SIZE, BIOS_ERR, ddr4_speeds, ddr4_speed_attr::max_clock_mhz, ddr4_speed_attr::min_clock_mhz, printk, and ddr4_speed_attr::reported_mts.
Referenced by ddr_speed_mhz_to_reported_mts().
enum cb_err spd_add_smbios17_ddr4 | ( | const u8 | channel, |
const u8 | slot, | ||
const u16 | selected_freq, | ||
const struct dimm_attr_ddr4_st * | info | ||
) |
Definition at line 166 of file ddr4.c.
References ARRAY_SIZE, BIOS_ERR, BIOS_WARNING, block_exists(), dimm_attr_ddr4_st::bus_width, dimm_attr_ddr4_st::cap_per_die_mbit, dimm_attr_ddr4_st::dimm_type, dimm_attr_ddr4_st::dram_type, dimm_attr_ddr4_st::manufacturer_id, memcpy(), dimm_attr_ddr4_st::part_number, printk, dimm_attr_ddr4_st::ranks, dimm_attr_ddr4_st::sdram_width, dimm_attr_ddr4_st::serial_number, dimm_attr_ddr4_st::size_mb, spd_blocks, SPD_DDR4_PART_LEN, SPD_MEMORY_TYPE_DDR4_SDRAM, SPD_MEMORY_TYPE_UNDEFINED, SPD_STATUS_CRC_ERROR, SPD_STATUS_INVALID, SPD_STATUS_OK, type, dimm_attr_ddr4_st::vdd_voltage, and verify_block().
int spd_decode_ddr4 | ( | struct dimm_attr_ddr4_st * | dimm, |
spd_raw_data | spd | ||
) |
Decode the raw SPD data.
Decodes a raw SPD data from a DDR4 DIMM, and organizes it into a dimm_attr structure. The SPD data must first be read in a contiguous array, and passed to this function.
dimm | pointer to dimm_attr structure where the decoded data is to be stored |
spd | array of raw data previously read from the SPD. |
|
static |
Definition at line 100 of file ddr4.c.
References spd_block::crc_start, ddr_crc16(), spd_block::len, and spd_block::start.
Referenced by spd_add_smbios17_ddr4().
|
static |
DDR4 speed attributes derived from JEDEC 79-4C tables 169 & 170.
min_clock_mhz = 1000/max_tCk_avg(ns) + 1 Adding 1 to make minimum inclusive max_clock_mhz = 1000/min_tCk_avg(ns) reported_mts = Standard reported DDR4 speed in MT/s May be 1 less than the actual max MT/s
Definition at line 1 of file ddr4.c.
Referenced by ddr4_speed_mhz_to_reported_mts().
const spd_block spd_blocks[] |
Definition at line 94 of file ddr4.c.
Referenced by spd_add_smbios17_ddr4().