From 3a5d1953b00c0ac62c9e7397cff49ec88dd95581 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Thu, 23 Feb 2023 15:54:55 -0700 Subject: 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: ". 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 Change-Id: I6b51612d808c63de1acd2be952cb6c152f8a1be5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/73253 Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier --- src/soc/amd/common/fsp/dmi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/soc') diff --git a/src/soc/amd/common/fsp/dmi.c b/src/soc/amd/common/fsp/dmi.c index fd2a8e4064..9c89792123 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); -- cgit v1.2.3