1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <baseboard/variants.h>
4 #include <console/console.h>
8 #include <variant/gpio.h>
9 #include <amdblocks/dimm_spd.h>
11 uint8_t __weak
variant_memory_sku(void)
20 return gpio_base2_value(pads
, ARRAY_SIZE(pads
));
23 int __weak
variant_mainboard_read_spd(uint8_t spdAddress
,
24 char *buf
, size_t len
)
26 u8 spd_index
= variant_memory_sku();
28 printk(BIOS_INFO
, "%s SPD index %d\n", __func__
, spd_index
);
30 void *spd
= (void *)spd_cbfs_map(spd_index
);
32 printk(BIOS_ERR
, "spd.bin not found\n");
36 if (len
!= CONFIG_DIMM_SPD_SIZE
) {
37 printk(BIOS_ERR
, "spd.bin is not the correct size\n");
41 memcpy(buf
, spd
, len
);