From 0c094aeb0e214b2abcef9a15ab23b1669a20d80e Mon Sep 17 00:00:00 2001 From: Tim Chu Date: Tue, 12 Jan 2021 01:44:37 -0800 Subject: arch/x86/smbios: Update SMBIOS type 17 type detail Update SMBIOS type 17 type detail. Define this field by module type. Tested=Execute "dmidecode -t 17" to check type detail is correct. Signed-off-by: Tim Chu Change-Id: I6700056edad5db2b86f6da526329b1343b026385 Reviewed-on: https://review.coreboot.org/c/coreboot/+/49347 Tested-by: build bot (Jenkins) Reviewed-by: Christian Walter Reviewed-by: Jonathan Zhang --- src/arch/x86/smbios.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/arch') diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 3856acf0d2..87714c0abe 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -327,8 +327,22 @@ static int create_smbios_type17_for_dimm(struct dimm_info *dimm, t->minimum_voltage = dimm->vdd_voltage; t->maximum_voltage = dimm->vdd_voltage; + /* Fill in type detail */ + switch (dimm->mod_type) { + case SPD_RDIMM: + case SPD_MINI_RDIMM: + t->type_detail = MEMORY_TYPE_DETAIL_REGISTERED; + break; + case SPD_UDIMM: + case SPD_MINI_UDIMM: + t->type_detail = MEMORY_TYPE_DETAIL_UNBUFFERED; + break; + default: + t->type_detail = MEMORY_TYPE_DETAIL_UNKNOWN; + break; + } /* Synchronous = 1 */ - t->type_detail = MEMORY_TYPE_DETAIL_SYNCHRONOUS; + t->type_detail |= MEMORY_TYPE_DETAIL_SYNCHRONOUS; /* no handle for error information */ t->memory_error_information_handle = 0xFFFE; t->attributes = dimm->rank_per_dimm; -- cgit v1.2.3