7 #include <soc/romstage.h>
15 const int spd_banks[8] = { 8, 16, 32, 64, -1, -1, -1, -1 };
16 const int spd_capmb[8] = { 1, 2, 4, 8, 16, 32, 64, 0 };
17 const int spd_rows[8] = { 12, 13, 14, 15, 16, -1, -1, -1 };
18 const int spd_cols[8] = { 9, 10, 11, 12, -1, -1, -1, -1 };
19 const int spd_ranks[8] = { 1, 2, 3, 4, -1, -1, -1, -1 };
20 const int spd_devw[8] = { 4, 8, 16, 32, -1, -1, -1, -1 };
21 const int spd_busw[8] = { 8, 16, 32, 64, -1, -1, -1, -1 };
52 "SPD: banks %d, ranks %d, rows %d, columns %d, density %d Mb\n",
53 banks, ranks, rows, cols, capmb);
57 if (capmb > 0 && busw > 0 && devw > 0 && ranks > 0) {
60 capmb / 8 * busw / devw * ranks);
85 spd_file =
cbfs_map(
"spd.bin", &spd_file_len);
87 die(
"SPD data not found.");
91 die(
"Missing SPD data.");
void * memcpy(void *dest, const void *src, size_t n)
static void * cbfs_map(const char *name, size_t *size_out)
#define printk(level,...)
void __noreturn die(const char *fmt,...)
uint32_t gpio_base2_value(const gpio_t gpio[], int num_gpio)
#define BIOS_INFO
BIOS_INFO - Expected events.
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
#define SPD_DENSITY_BANKS
#define SPD_BUS_DEV_WIDTH
#define GPIO_MEM_CONFIG_3
#define GPIO_MEM_CONFIG_0
#define GPIO_MEM_CONFIG_2
#define GPIO_MEM_CONFIG_1
static const int spd_index[32]
uintptr_t mainboard_get_spd_data(void)
int mainboard_get_spd_index(void)
static void mainboard_print_spd_info(uint8_t spd[])