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>
This commit is contained in:
@@ -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
|
* 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 DMI_INFO *dmi_table;
|
||||||
const TYPE17_DMI_INFO *type17_dmi_info;
|
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->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. */
|
/* 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);
|
||||||
|
Reference in New Issue
Block a user