[coreboot-gerrit] New patch to review for coreboot: src/device/dram/ddr3: Parse additional information

Patrick Rudolph (siro@das-labor.org) gerrit at coreboot.org
Mon Feb 29 19:27:55 CET 2016


Patrick Rudolph (siro at das-labor.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13862

-gerrit

commit 52cf1e83ffc9b946dfe73087215a1305b8818c6b
Author: Patrick Rudolph <siro at das-labor.org>
Date:   Mon Feb 29 18:21:00 2016 +0100

    src/device/dram/ddr3: Parse additional information
    
    Parse manufacturer id and ASCII serial.
    Required for SMBIOS type 17 field.
    
    Change-Id: I710de1a6822e4777c359d0bfecc6113cb2a5ed8e
    Signed-off-by: Patrick Rudolph <siro at das-labor.org>
---
 src/device/dram/ddr3.c         | 7 +++++++
 src/include/device/dram/ddr3.h | 4 ++++
 2 files changed, 11 insertions(+)

diff --git a/src/device/dram/ddr3.c b/src/device/dram/ddr3.c
index 6bfaabc..55dbde6 100644
--- a/src/device/dram/ddr3.c
+++ b/src/device/dram/ddr3.c
@@ -23,6 +23,7 @@
 #include <console/console.h>
 #include <device/device.h>
 #include <device/dram/ddr3.h>
+#include <string.h>
 
 /*==============================================================================
  * = DDR3 SPD decoding helpers
@@ -340,6 +341,12 @@ int spd_decode_ddr3(dimm_attr * dimm, spd_raw_data spd)
 	dimm->reference_card = spd[62] & 0x1f;
 	printram("  DIMM Reference card %c\n", 'A' + dimm->reference_card);
 
+	dimm->manufacturer_id =  (spd[118] << 8) | spd[117];
+	printram("  DIMM Manufacturer ID %x\n", dimm->manufacturer_id);
+
+	memcpy(dimm->part_number, &spd[128], 16);
+	printram("  DIMM Part number %s\n", dimm->part_number);
+
 	return ret;
 }
 
diff --git a/src/include/device/dram/ddr3.h b/src/include/device/dram/ddr3.h
index 0520ead..455dc1c 100644
--- a/src/include/device/dram/ddr3.h
+++ b/src/include/device/dram/ddr3.h
@@ -165,6 +165,10 @@ typedef struct dimm_attr_st {
 	u16 voltage;
 	/* XMP: max DIMMs per channel supported (1-4) */
 	u8 dimms_per_channel;
+	/* Manufacturer ID */
+	u16 manufacturer_id;
+	/* ASCII part number - NULL terminated */
+	u8 part_number[17];
 } dimm_attr;
 
 /** Result of the SPD decoding process */



More information about the coreboot-gerrit mailing list