diff options
author | Julien Viard de Galbert <jviarddegalbert@online.net> | 2018-01-24 11:04:46 +0100 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2018-01-26 17:27:51 +0000 |
commit | 9989171401175e9a701782bd08858b87c99183bc (patch) | |
tree | a15c9f5d1e8568fc8b38d98a50efd81a76b1092f /src/arch/x86 | |
parent | efea957ed68b1e3f345b1bc8d1dc4cac30824325 (diff) |
smbios: handle DIMM of 32G or more
According to SMBIOS Reference Specification (1)
section 7.18.5 Memory Device — Extended Size
When the size cannot be represented in the size field, it must be set to
0x7fff and the real size stored in the extended_size field.
1: https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.1.1.pdf
Change-Id: Idc559454c16ccd685aaaed0d60f1af69b634ea2e
Signed-off-by: Julien Viard de Galbert <jviarddegalbert@online.net>
Reviewed-on: https://review.coreboot.org/23396
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/smbios.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 89951a10ab..548e6ed741 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -207,7 +207,12 @@ static int create_smbios_type17_for_dimm(struct dimm_info *dimm, t->clock_speed = dimm->ddr_frequency; t->speed = dimm->ddr_frequency; t->type = SMBIOS_MEMORY_DEVICE; - t->size = dimm->dimm_size; + if (dimm->dimm_size < 0x7fff) { + t->size = dimm->dimm_size; + } else { + t->size = 0x7fff; + t->extended_size = dimm->dimm_size & 0x7fffffff; + } t->data_width = 8 * (1 << (dimm->bus_width & 0x7)); t->total_width = t->data_width + 8 * ((dimm->bus_width & 0x18) >> 3); |