Tim Chu has uploaded this change for review.

View Change

arch/x86/smbios: Update SMBIOS type 16 Extended Maximum Capacity

Update Extended Maximum Capacity field in SMBIOS type 16 so that
maximum dimm size can over 2TB.

Tested=Execute "dmidecode -t 16" to check maximum capacity can over 2TB.

Signed-off-by: Tim Chu <Tim.Chu@quantatw.com>
Change-Id: I61901c815f9d0daae102e5077a116c0de87240ef
---
M src/arch/x86/smbios.c
M src/include/smbios.h
2 files changed, 8 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/28/49828/1
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c
index aaf989d..9bae0c3 100644
--- a/src/arch/x86/smbios.c
+++ b/src/arch/x86/smbios.c
@@ -1045,7 +1045,12 @@

/* no error information handle available */
t->memory_error_information_handle = 0xFFFE;
- t->maximum_capacity = meminfo->max_capacity_mib * (MiB / KiB);
+ if (meminfo->max_capacity_mib < SMBIOS_USE_EXTENDED_MAX_CAPACITY)
+ t->maximum_capacity = meminfo->max_capacity_mib * (MiB / KiB);
+ else {
+ t->maximum_capacity = SMBIOS_USE_EXTENDED_MAX_CAPACITY;
+ t->extended_maximum_capacity = meminfo->max_capacity_mib * MiB;
+ }
t->number_of_memory_devices = meminfo->number_of_devices;

len += smbios_string_table_len(t->eos);
diff --git a/src/include/smbios.h b/src/include/smbios.h
index e451d17..fd9d1a8 100644
--- a/src/include/smbios.h
+++ b/src/include/smbios.h
@@ -826,6 +826,8 @@
SMBIOS_EVENTLOG_STATUS_FULL = 2, /* Bit 1 */
};

+#define SMBIOS_USE_EXTENDED_MAX_CAPACITY (1 << 31)
+
struct smbios_type16 {
u8 type;
u8 length;

To view, visit change 49828. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I61901c815f9d0daae102e5077a116c0de87240ef
Gerrit-Change-Number: 49828
Gerrit-PatchSet: 1
Gerrit-Owner: Tim Chu <Tim.Chu@quantatw.com>
Gerrit-MessageType: newchange