diff options
Diffstat (limited to 'src/mainboard/intel/harcuvar/spd/spd.c')
-rw-r--r-- | src/mainboard/intel/harcuvar/spd/spd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mainboard/intel/harcuvar/spd/spd.c b/src/mainboard/intel/harcuvar/spd/spd.c index e3912ec91e..d3cefa6b20 100644 --- a/src/mainboard/intel/harcuvar/spd/spd.c +++ b/src/mainboard/intel/harcuvar/spd/spd.c @@ -2,6 +2,8 @@ #include <cbfs.h> #include <console/console.h> +#include <device/dram/ddr4.h> +#include <spd.h> #include "spd.h" @@ -19,17 +21,17 @@ uint8_t *mainboard_find_spd_data(void) if (!spd_file) die("SPD data not found."); - if (spd_file_len < ((spd_index + 1) * SPD_LEN)) { + if (spd_file_len < ((spd_index + 1) * SPD_SIZE_MAX_DDR4)) { printk(BIOS_ERR, "SPD index override to 0 due to incorrect SPD index.\n"); spd_index = 0; } - if (spd_file_len < SPD_LEN) + if (spd_file_len < SPD_SIZE_MAX_DDR4) die("Missing SPD data."); /* Assume same memory in both channels */ - spd_index *= SPD_LEN; + spd_index *= SPD_SIZE_MAX_DDR4; spd_data = (uint8_t *)(spd_file + spd_index); /* Make sure a valid SPD was found */ |