Changeset 5541 for i2c-tools/trunk
- Timestamp:
- 12/08/08 18:42:11 (3 years ago)
- Files:
-
- 1 modified
-
i2c-tools/trunk/eeprom/decode-dimms (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
i2c-tools/trunk/eeprom/decode-dimms
r5540 r5541 1067 1067 ); 1068 1068 1069 # Parameter: bytes 64-1271069 # Parameter: EEPROM bytes 0-127 (using 64-98) 1070 1070 sub decode_manufacturing_information($) 1071 1071 { … … 1079 1079 # 7 extra bytes from the Manufacturer field. Sometimes 1080 1080 # these bytes are filled with interesting data. 1081 ($temp, $extra) = manufacturer(@{$bytes}[ 0..7]);1081 ($temp, $extra) = manufacturer(@{$bytes}[64..71]); 1082 1082 printl $l, $temp; 1083 1083 $l = "Custom Manufacturer Data"; … … 1085 1085 printl $l, $temp if defined $temp; 1086 1086 1087 if (spd_written($bytes->[ 8])) {1087 if (spd_written($bytes->[72])) { 1088 1088 # Try the location code as ASCII first, as earlier specifications 1089 1089 # suggested this. As newer specifications don't mention it anymore, 1090 1090 # we still fall back to binary. 1091 1091 $l = "Manufacturing Location Code"; 1092 $temp = (chr($bytes->[ 8]) =~ m/^[\w\d]$/) ? chr($bytes->[8])1093 : sprintf("0x%.2X", $bytes->[ 8]);1092 $temp = (chr($bytes->[72]) =~ m/^[\w\d]$/) ? chr($bytes->[72]) 1093 : sprintf("0x%.2X", $bytes->[72]); 1094 1094 printl $l, $temp; 1095 1095 } 1096 1096 1097 1097 $l = "Part Number"; 1098 $temp = part_number(@{$bytes}[ 9..26]);1098 $temp = part_number(@{$bytes}[73..90]); 1099 1099 printl $l, $temp; 1100 1100 1101 if (spd_written(@{$bytes}[ 27..28])) {1101 if (spd_written(@{$bytes}[91..92])) { 1102 1102 $l = "Revision Code"; 1103 $temp = sprintf("0x%02X%02X\n", @{$bytes}[ 27..28]);1103 $temp = sprintf("0x%02X%02X\n", @{$bytes}[91..92]); 1104 1104 printl $l, $temp; 1105 1105 } 1106 1106 1107 if (spd_written(@{$bytes}[ 29..30])) {1107 if (spd_written(@{$bytes}[93..94])) { 1108 1108 $l = "Manufacturing Date"; 1109 1109 # In theory the year and week are in BCD format, but 1110 1110 # this is not always true in practice :( 1111 if (($bytes->[ 29] & 0xf0) <= 0x901112 && ($bytes->[ 29] & 0x0f) <= 0x091113 && ($bytes->[ 30] & 0xf0) <= 0x901114 && ($bytes->[ 30] & 0x0f) <= 0x09) {1111 if (($bytes->[93] & 0xf0) <= 0x90 1112 && ($bytes->[93] & 0x0f) <= 0x09 1113 && ($bytes->[94] & 0xf0) <= 0x90 1114 && ($bytes->[94] & 0x0f) <= 0x09) { 1115 1115 # Note that this heuristic will break in year 2080 1116 1116 $temp = sprintf("%d%02X-W%02X\n", 1117 $bytes->[ 29] >= 0x80 ? 19 : 20,1118 @{$bytes}[ 29..30]);1117 $bytes->[93] >= 0x80 ? 19 : 20, 1118 @{$bytes}[93..94]); 1119 1119 } else { 1120 1120 $temp = sprintf("0x%02X%02X\n", 1121 @{$bytes}[ 29..30]);1121 @{$bytes}[93..94]); 1122 1122 } 1123 1123 printl $l, $temp; 1124 1124 } 1125 1125 1126 if (spd_written(@{$bytes}[ 31..34])) {1126 if (spd_written(@{$bytes}[95..98])) { 1127 1127 $l = "Assembly Serial Number"; 1128 1128 $temp = sprintf("0x%02X%02X%02X%02X\n", 1129 @{$bytes}[ 31..34]);1129 @{$bytes}[95..98]); 1130 1130 printl $l, $temp; 1131 1131 } 1132 1132 } 1133 1133 1134 # Parameter: bytes 64-1271134 # Parameter: EEPROM bytes 0-127 (using 126-127) 1135 1135 sub decode_intel_spec_freq($) 1136 1136 { … … 1141 1141 1142 1142 $l = "Frequency"; 1143 if ($bytes->[ 62] == 0x66) { $temp = "66MHz\n"; }1144 elsif ($bytes->[ 62] == 100) { $temp = "100MHz or 133MHz\n"; }1145 elsif ($bytes->[ 62] == 133) { $temp = "133MHz\n"; }1143 if ($bytes->[126] == 0x66) { $temp = "66MHz\n"; } 1144 elsif ($bytes->[126] == 100) { $temp = "100MHz or 133MHz\n"; } 1145 elsif ($bytes->[126] == 133) { $temp = "133MHz\n"; } 1146 1146 else { $temp = "Undefined!\n"; } 1147 1147 printl $l, $temp; … … 1149 1149 $l = "Details for 100MHz Support"; 1150 1150 $temp = ""; 1151 if ($bytes->[ 63] & 1) { $temp .= "Intel Concurrent Auto-precharge\n"; }1152 if ($bytes->[ 63] & 2) { $temp .= "CAS Latency = 2\n"; }1153 if ($bytes->[ 63] & 4) { $temp .= "CAS Latency = 3\n"; }1154 if ($bytes->[ 63] & 8) { $temp .= "Junction Temp A (100 degrees C)\n"; }1151 if ($bytes->[127] & 1) { $temp .= "Intel Concurrent Auto-precharge\n"; } 1152 if ($bytes->[127] & 2) { $temp .= "CAS Latency = 2\n"; } 1153 if ($bytes->[127] & 4) { $temp .= "CAS Latency = 3\n"; } 1154 if ($bytes->[127] & 8) { $temp .= "Junction Temp A (100 degrees C)\n"; } 1155 1155 else { $temp .= "Junction Temp B (90 degrees C)\n"; } 1156 if ($bytes->[ 63] & 16) { $temp .= "CLK 3 Connected\n"; }1157 if ($bytes->[ 63] & 32) { $temp .= "CLK 2 Connected\n"; }1158 if ($bytes->[ 63] & 64) { $temp .= "CLK 1 Connected\n"; }1159 if ($bytes->[ 63] & 128) { $temp .= "CLK 0 Connected\n"; }1160 if (($bytes->[ 63] & 192) == 192) { $temp .= "Double-sided DIMM\n"; }1161 elsif (($bytes->[ 63] & 192) != 0) { $temp .= "Single-sided DIMM\n"; }1156 if ($bytes->[127] & 16) { $temp .= "CLK 3 Connected\n"; } 1157 if ($bytes->[127] & 32) { $temp .= "CLK 2 Connected\n"; } 1158 if ($bytes->[127] & 64) { $temp .= "CLK 1 Connected\n"; } 1159 if ($bytes->[127] & 128) { $temp .= "CLK 0 Connected\n"; } 1160 if (($bytes->[127] & 192) == 192) { $temp .= "Double-sided DIMM\n"; } 1161 elsif (($bytes->[127] & 192) != 0) { $temp .= "Single-sided DIMM\n"; } 1162 1162 printl $l, $temp; 1163 1163 } … … 1408 1408 1409 1409 # Decode next 35 bytes (64-98, common to all memory types) 1410 splice(@bytes, 0, 64);1411 1410 decode_manufacturing_information(\@bytes); 1412 1411
