aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2017-12-05 07:45:17 +0100
committerJean Delvare <jdelvare@suse.de>2017-12-05 07:45:17 +0100
commit52cd6c60d6db0e39f00a67f5931c06cccb63e178 (patch)
tree654501c62db69c69e4bf962008a2c097060f1a2f
parent9ae51c4a4f8e1e1836470ac7e5fec9c7f6df8ce6 (diff)
downloadi2c-tools-52cd6c60d6db0e39f00a67f5931c06cccb63e178.tar.gz
decode-dimms: Decode physical characteristics of DDR4
Print the physical characteristics of unbuffered, registered and load-reduced DDR4 SDRAM modules.
-rw-r--r--CHANGES1
-rwxr-xr-xeeprom/decode-dimms22
2 files changed, 22 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index c0d2e2b..8fb666f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,7 @@ master
decode-dimms: Add preliminary DDR4 support
Decode size and timings of DDR4
Decode misc parameters of DDR4
+ Decode physical characteristics of DDR4
4.0 (2017-10-30)
tools: Fix build with recent compilers (gcc 4.6+)
diff --git a/eeprom/decode-dimms b/eeprom/decode-dimms
index 2779ae4..6173192 100755
--- a/eeprom/decode-dimms
+++ b/eeprom/decode-dimms
@@ -1404,6 +1404,7 @@ sub ddr3_mtb_ftb($$$$)
return $byte1 * $mtb + $byte2 * $ftb / 1000;
}
+# Also works for DDR4
sub ddr3_reference_card($$)
{
my ($rrc, $ext) = @_;
@@ -1727,7 +1728,7 @@ use constant DDR4_UNBUFFERED => 1;
use constant DDR4_REGISTERED => 2;
use constant DDR4_LOAD_REDUCED => 4;
-# Parameter: EEPROM bytes 0-383 (using 1-125)
+# Parameter: EEPROM bytes 0-383 (using 1-130)
sub decode_ddr4_sdram($)
{
my $bytes = shift;
@@ -1915,6 +1916,25 @@ sub decode_ddr4_sdram($)
printl("Thermal Sensor",
$bytes->[14] & 0x80 ? "TSE2004 compliant" : "No");
+
+# type-specific settings
+ if ($module_types[$bytes->[3] & 0x0f]->{family} == DDR4_UNBUFFERED ||
+ $module_types[$bytes->[3] & 0x0f]->{family} == DDR4_REGISTERED ||
+ $module_types[$bytes->[3] & 0x0f]->{family} == DDR4_LOAD_REDUCED) {
+ prints("Physical Characteristics");
+
+ my $height = $bytes->[128] & 0x1f;
+ printl("Module Height",
+ $height == 0x00 ? "15 mm or less" :
+ $height == 0x1f ? "more than 45 mm" :
+ sprintf("%u mm", $height + 15));
+ printl("Module Thickness",
+ sprintf("%d mm front, %d mm back",
+ ($bytes->[129] & 0x0f) + 1,
+ (($bytes->[129] >> 4) & 15) + 1));
+ printl("Module Reference Card",
+ ddr3_reference_card($bytes->[130], $bytes->[128]));
+ }
}
# Parameter: EEPROM bytes 0-127 (using 4-5)