summaryrefslogtreecommitdiffstats
path: root/src/soc/amd/common/fsp
diff options
context:
space:
mode:
authorMartin Roth <gaumless@gmail.com>2023-02-23 15:54:55 -0700
committerFelix Held <felix-coreboot@felixheld.de>2023-02-27 16:39:50 +0000
commit3a5d1953b00c0ac62c9e7397cff49ec88dd95581 (patch)
treee9d38ceaec3522650823ab26dd915377136538de /src/soc/amd/common/fsp
parent15373758dfa10cb78a3a39266e23573ba66d0b4a (diff)
downloadcoreboot-3a5d1953b00c0ac62c9e7397cff49ec88dd95581.tar.gz
coreboot-3a5d1953b00c0ac62c9e7397cff49ec88dd95581.tar.bz2
coreboot-3a5d1953b00c0ac62c9e7397cff49ec88dd95581.zip
soc/amd/common/fsp/dmi.c: Add dmi_type16 ECC to memory struct
The DMI error correction type was not being filled in, so was reporting as "Error Correction Type: <OUT OF SPEC>". This patch fixes that. Since it's now filling in information for both Type 16 & 17, rename the function to reflect that. BUG=None TEST=dmidecode now reports the type correctly. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I6b51612d808c63de1acd2be952cb6c152f8a1be5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/73253 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Diffstat (limited to 'src/soc/amd/common/fsp')
-rw-r--r--src/soc/amd/common/fsp/dmi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/soc/amd/common/fsp/dmi.c b/src/soc/amd/common/fsp/dmi.c
index fd2a8e40645e..9c897921231f 100644
--- a/src/soc/amd/common/fsp/dmi.c
+++ b/src/soc/amd/common/fsp/dmi.c
@@ -172,7 +172,7 @@ static void print_dmi_info(const TYPE17_DMI_INFO *dmi17)
/**
* Marshalls dimm info from AMD_FSP_DMI_HOB into CBMEM_ID_MEMINFO
*/
-static void prepare_dmi_17(void *unused)
+static void prepare_dmi_16_17(void *unused)
{
const DMI_INFO *dmi_table;
const TYPE17_DMI_INFO *type17_dmi_info;
@@ -240,7 +240,9 @@ static void prepare_dmi_17(void *unused)
}
}
mem_info->dimm_cnt = dimm_cnt;
+
+ mem_info->ecc_type = dmi_table->T16.MemoryErrorCorrection;
}
/* AMD_FSP_DMI_HOB is initialized very late, so check it just in time for writing tables. */
-BOOT_STATE_INIT_ENTRY(BS_WRITE_TABLES, BS_ON_ENTRY, prepare_dmi_17, NULL);
+BOOT_STATE_INIT_ENTRY(BS_WRITE_TABLES, BS_ON_ENTRY, prepare_dmi_16_17, NULL);