Skip to content

Commit

Permalink
src/include/spd_bin.h: introduce SPD_LEN_DDR5
Browse files Browse the repository at this point in the history
DDR5 SPD page length is 1024 bytes.

Signed-off-by: Michał Kopeć <[email protected]>
  • Loading branch information
mkopec committed Sep 26, 2024
1 parent 5ee9aa0 commit bd6336a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/include/spd_bin.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#define SPD_PAGE_LEN 256
#define SPD_PAGE_LEN_DDR4 512
#define SPD_LEN_DDR5 1024
#define SPD_PAGE_0 (0x6C >> 1)
#define SPD_PAGE_1 (0x6E >> 1)
#define SPD_DRAM_TYPE 2
Expand Down
2 changes: 1 addition & 1 deletion src/lib/spd_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,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_DDR5)
blk->len = CONFIG_DIMM_SPD_SIZE;
blk->len = SPD_LEN_DDR5;
else if (dram_type == SPD_DRAM_DDR4)
blk->len = SPD_PAGE_LEN_DDR4;
else
Expand Down
2 changes: 1 addition & 1 deletion src/soc/intel/common/block/smbus/smbuslib.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ static void update_spd_len(struct spd_block *blk)

/* If spd used is DDR5, then its length is 1024 byte. */
if (j == SPD_DRAM_DDR5)
blk->len = CONFIG_DIMM_SPD_SIZE;
blk->len = SPD_LEN_DDR5;
/* If spd used is DDR4, then its length is 512 byte. */
else if (j == SPD_DRAM_DDR4)
blk->len = SPD_PAGE_LEN_DDR4;
Expand Down

0 comments on commit bd6336a

Please sign in to comment.