summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0>2013-04-15 12:27:44 +0000
committerkhali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0>2013-04-15 12:27:44 +0000
commit2c5dd10995a94e84e66aedcb1647d3ee2d284072 (patch)
treea5e7eeb76c5c2b995a6513f6f251d8a0ef49db5f
parent60db9cf0347ea7394431700217973f4f1b6aac4f (diff)
downloadi2c-tools-2c5dd10995a94e84e66aedcb1647d3ee2d284072.tar.gz
DDR3: Fully decode the SDRAM Device Type field.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@6149 7894878c-1315-0410-8ee3-d5d059ff63e0
-rw-r--r--CHANGES1
-rwxr-xr-xeeprom/decode-dimms30
2 files changed, 28 insertions, 3 deletions
diff --git a/CHANGES b/CHANGES
index fd82f9d..515c0ce 100644
--- a/CHANGES
+++ b/CHANGES
@@ -35,6 +35,7 @@ SVN HEAD
Print physical characteristics for all DDR3 module types
Don't print raw SSTE32882 register values
Add support for Load Reduced DIMM (LRDIMM) DDR3 modules
+ Fully decode the DDR3 SDRAM Device Type field
i2cdetect: Do a best effort detection if functionality is missing
Clarify the SMBus commands used for probing by default
i2c-dev.h: Minimize differences with kernel flavor
diff --git a/eeprom/decode-dimms b/eeprom/decode-dimms
index e5a0910..ac423ff 100755
--- a/eeprom/decode-dimms
+++ b/eeprom/decode-dimms
@@ -1377,6 +1377,32 @@ sub ddr3_revision_number($)
return sprintf("%c%d", ord('A') + $h - 0xa, $l);
}
+sub ddr3_device_type($)
+{
+ my $byte = shift;
+ my $type = $byte & 0x80 ? "Non-Standard" : "Standard Monolithic";
+ my $die_count = ($byte >> 4) & 0x07;
+ my $loading = ($byte >> 2) & 0x03;
+
+ if ($die_count == 1) {
+ $type .= "\nSingle die";
+ } elsif ($die_count == 2) {
+ $type .= "\n2 die";
+ } elsif ($die_count == 3) {
+ $type .= "\n4 die";
+ } elsif ($die_count == 4) {
+ $type .= "\n8 die";
+ }
+
+ if ($loading == 1) {
+ $type .= "\nMulti load stack";
+ } elsif ($loading == 2) {
+ $type .= "\nSingle load stack";
+ }
+
+ return $type;
+}
+
use constant DDR3_UNBUFFERED => 1;
use constant DDR3_REGISTERED => 2;
use constant DDR3_CLOCKED => 3;
@@ -1555,9 +1581,7 @@ sub decode_ddr3_sdram($)
($bytes->[31] & 128) ? "Yes" : "No");
printl("Module Thermal Sensor",
($bytes->[32] & 128) ? "Yes" : "No");
- printl("SDRAM Device Type",
- ($bytes->[33] & 128) ? sprintf($bytes->[33] & 127) :
- "Standard Monolithic");
+ printl("SDRAM Device Type", ddr3_device_type($bytes->[33]));
# Following bytes are type-specific, so don't continue if type
# isn't known.