summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrystian Hebel <krystian.hebel@3mdeb.com>2021-02-23 16:37:59 +0100
committerFelix Held <felix-coreboot@felixheld.de>2022-08-31 16:45:04 +0000
commited9f562ca8f6bda651f159db6e155dfea80257b4 (patch)
treef6764c0bfb5f02c432154a7d0340457e42f08ca1
parentaf4bad167d4ab07ba2d44666c878a0871d7f91cd (diff)
device/dram/ddr4.c: fill missing ECC info from SPD
Change-Id: I80fccfa6d108b68d6f33a3d47766205b423a41ff Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/67058 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
-rw-r--r--src/device/dram/ddr4.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/device/dram/ddr4.c b/src/device/dram/ddr4.c
index a66ee86fd1..53b3d25b07 100644
--- a/src/device/dram/ddr4.c
+++ b/src/device/dram/ddr4.c
@@ -250,6 +250,8 @@ int spd_decode_ddr4(struct dimm_attr_ddr4_st *dimm, spd_raw_data spd)
/* calculate size */
dimm->size_mb = cap_per_die_mbit / 8 * bus_width / sdram_width * dimm->ranks;
+ dimm->ecc_extension = spd[SPD_PRIMARY_SDRAM_WIDTH] & SPD_ECC_8BIT;
+
/* make sure we have the manufacturing information block */
if (spd_bytes_used > 320) {
dimm->manufacturer_id = (spd[351] << 8) | spd[350];