Fix DDR5 SPD length

Change-Id: Id587c63a4abafc3f47176471447f79c0f57729f2
This commit is contained in:
Jeremy Soller
2023-05-16 15:27:30 -06:00
parent 116fcc0f1d
commit ac8331d5c2
2 changed files with 2 additions and 2 deletions

View File

@@ -209,7 +209,7 @@ enum cb_err spd_fill_from_cache(uint8_t *spd_cache, struct spd_block *blk)
dram_type = *(spd_cache + SC_SPD_OFFSET(i) + SPD_DRAM_TYPE);
if (dram_type == SPD_DRAM_DDR4)
if (dram_type == SPD_DRAM_DDR4 || dram_type == SPD_DRAM_DDR5)
blk->len = SPD_PAGE_LEN_DDR4;
else
blk->len = SPD_PAGE_LEN;

View File

@@ -25,7 +25,7 @@ static void update_spd_len(struct spd_block *blk)
j |= blk->spd_array[i][SPD_DRAM_TYPE];
/* If spd used is DDR4, then its length is 512 byte. */
if (j == SPD_DRAM_DDR4)
if (j == SPD_DRAM_DDR4 || j == SPD_DRAM_DDR5)
blk->len = SPD_PAGE_LEN_DDR4;
else
blk->len = SPD_PAGE_LEN;