Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/73253 )
Change subject: soc/amd/common/fsp/dmi.c: Add dmi_type16 ECC to memory struct ......................................................................
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 --- M src/soc/amd/common/fsp/dmi.c 1 file changed, 26 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Matt DeVillier: Looks good to me, approved
diff --git a/src/soc/amd/common/fsp/dmi.c b/src/soc/amd/common/fsp/dmi.c index fd2a8e4..9c89792 100644 --- a/src/soc/amd/common/fsp/dmi.c +++ b/src/soc/amd/common/fsp/dmi.c @@ -172,7 +172,7 @@ /** * 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 @@ } } 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);