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 <jingle_hsu@wiwynn.com>
Change-Id: Iaa79cc587808f1eab0a48e2ce1dab089e84e9721
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57520
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Daocheng Bu <daocheng.bu@intel.com>
This commit is contained in:
Jingle Hsu 2021-09-09 14:24:25 +08:00 committed by Felix Held
parent c1b98a43ae
commit 869e90a3d4
1 changed files with 1 additions and 1 deletions

View File

@ -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;