1 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <console/console.h>
8 /* Get SPD data for on-board memory */
9 uint8_t *mainboard_find_spd_data()
18 spd_file
= cbfs_map("spd.bin", &spd_file_len
);
20 die("SPD data not found.");
22 if (spd_file_len
< ((spd_index
+ 1) * SPD_LEN
)) {
24 "SPD index override to 0 due to incorrect SPD index.\n");
28 if (spd_file_len
< SPD_LEN
)
29 die("Missing SPD data.");
31 /* Assume same memory in both channels */
33 spd_data
= (uint8_t *)(spd_file
+ spd_index
);
35 /* Make sure a valid SPD was found */
37 die("Invalid SPD data.");