[coreboot-gerrit] Change in coreboot[master]: smbios: handle DIMM of 32G or more

Julien Viard de Galbert (Code Review) gerrit at coreboot.org
Tue Jan 23 15:50:30 CET 2018


Julien Viard de Galbert has uploaded this change for review. ( https://review.coreboot.org/23396


Change subject: smbios: handle DIMM of 32G or more
......................................................................

smbios: handle DIMM of 32G or more

According to SMBIOS Reference Specification (1)
section 7.18.4 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_2.7.1.pdf

Change-Id: Idc559454c16ccd685aaaed0d60f1af69b634ea2e
Signed-off-by: Julien Viard de Galbert <jviarddegalbert at online.net>
---
M src/arch/x86/smbios.c
1 file changed, 6 insertions(+), 1 deletion(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/96/23396/1

diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c
index 89951a1..b6bafa7 100644
--- a/src/arch/x86/smbios.c
+++ b/src/arch/x86/smbios.c
@@ -207,7 +207,12 @@
 	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;
+	}
 	t->data_width = 8 * (1 << (dimm->bus_width & 0x7));
 	t->total_width = t->data_width + 8 * ((dimm->bus_width & 0x18) >> 3);
 

-- 
To view, visit https://review.coreboot.org/23396
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc559454c16ccd685aaaed0d60f1af69b634ea2e
Gerrit-Change-Number: 23396
Gerrit-PatchSet: 1
Gerrit-Owner: Julien Viard de Galbert <jviarddegalbert at online.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180123/387cd46a/attachment.html>


More information about the coreboot-gerrit mailing list