From 869e90a3d481951c61024be042f3bf06d2887b89 Mon Sep 17 00:00:00 2001 From: Jingle Hsu Date: Thu, 9 Sep 2021 14:24:25 +0800 Subject: [PATCH] arch/x86/smbios: Add support for large memory capacity in type 16 Avoid SMBIOS type 16 Maximum Capacity showing incorrect information when value of maximum capacity exceeds 32 bits by extending the type. Handle 0x0009, DMI type 16, 23 bytes Physical Memory Array Location: System Board Or Motherboard Use: System Memory Error Correction Type: Single-bit ECC Maximum Capacity: 4 TB Error Information Handle: Not Provided Number Of Devices: 6 Tested=On OCP Crater Lake, the SMBIOS type 16 shows expected Maximum Capacity. Signed-off-by: Jingle Hsu Change-Id: Iaa79cc587808f1eab0a48e2ce1dab089e84e9721 Reviewed-on: https://review.coreboot.org/c/coreboot/+/57520 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak Reviewed-by: Daocheng Bu --- src/include/smbios.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/smbios.h b/src/include/smbios.h index a98023b375..0f1386a963 100644 --- a/src/include/smbios.h +++ b/src/include/smbios.h @@ -825,7 +825,7 @@ enum { SMBIOS_EVENTLOG_STATUS_FULL = 2, /* Bit 1 */ }; -#define SMBIOS_USE_EXTENDED_MAX_CAPACITY (1 << 31) +#define SMBIOS_USE_EXTENDED_MAX_CAPACITY (1ULL << 31) struct smbios_type16 { struct smbios_header header;