Changeset 5153
- Timestamp:
- 03/21/08 19:13:45 (5 years ago)
- Files:
-
- 1 modified
-
i2c-tools/trunk/eeprom/decode-dimms.pl (modified) (19 diffs)
Legend:
- Unmodified
- Added
- Removed
-
i2c-tools/trunk/eeprom/decode-dimms.pl
r5152 r5153 33 33 # -h, --help display this usage summary 34 34 # 35 # References: 36 # PC SDRAM Serial Presence 37 # Detect (SPD) Specification, Intel, 35 # References: 36 # PC SDRAM Serial Presence 37 # Detect (SPD) Specification, Intel, 38 38 # 1997,1999, Rev 1.2B 39 39 # … … 232 232 "Enuclia Semiconductor, Inc.", "Virtium Technology Inc.", "Solid State System Co., Ltd.", "Kian Tech LLC", 233 233 "Artimi", "Power Quotient International", "Avago Technologies", "ADTechnology", "Sigma Designs", 234 "SiCortex, Inc.", "Ventura Technology Group", "eASIC", "M.H.S. SAS", "Micro Star International", 235 "Rapport Inc.", "Makway International", "Broad Reach Engineering Co.", 236 "Semiconductor Mfg Intl Corp", "SiConnect", "FCI USA Inc.", "Validity Sensors", 234 "SiCortex, Inc.", "Ventura Technology Group", "eASIC", "M.H.S. SAS", "Micro Star International", 235 "Rapport Inc.", "Makway International", "Broad Reach Engineering Co.", 236 "Semiconductor Mfg Intl Corp", "SiConnect", "FCI USA Inc.", "Validity Sensors", 237 237 "Coney Technology Co. Ltd.", "Spans Logic", "Neterion Inc.", "Qimonda", 238 238 "New Japan Radio Co. Ltd.", "Velogix", "Montalvo Systems", "iVivity Inc.", "Walton Chaintech", … … 263 263 my $all_00 = 1; 264 264 my $all_ff = 1; 265 265 266 266 foreach my $b (@_) { 267 267 $all_00 = 0 unless $b == 0x00; … … 293 293 294 294 return ("Undefined", []) unless spd_written(@bytes); 295 295 296 296 while (defined($first = shift(@bytes)) && $first == 0x7F) { 297 297 $ai++; … … 427 427 my $k=0; 428 428 my $ii=0; 429 429 430 430 $ii = ($bytes->[3] & 0x0f) + ($bytes->[4] & 0x0f) - 17; 431 431 if (($bytes->[5] <= 8) && ($bytes->[17] <= 8)) { 432 432 $k = $bytes->[5] * $bytes->[17]; 433 433 } 434 435 if ($ii > 0 && $ii <= 12 && $k > 0) {436 printl "Size", ((1 << $ii) * $k) . " MB"; }437 else {434 435 if ($ii > 0 && $ii <= 12 && $k > 0) { 436 printl "Size", ((1 << $ii) * $k) . " MB"; 437 } else { 438 438 printl "INVALID SIZE", $bytes->[3] . "," . $bytes->[4] . "," . 439 439 $bytes->[5] . "," . $bytes->[17]; … … 723 723 my $k=0; 724 724 my $ii=0; 725 725 726 726 $ii = ($bytes->[3] & 0x0f) + ($bytes->[4] & 0x0f) - 17; 727 727 if (($bytes->[5] <= 8) && ($bytes->[17] <= 8)) { 728 728 $k = $bytes->[5] * $bytes->[17]; 729 729 } 730 731 if ($ii > 0 && $ii <= 12 && $k > 0) {732 printl "Size", ((1 << $ii) * $k) . " MB"; }733 else {730 731 if ($ii > 0 && $ii <= 12 && $k > 0) { 732 printl "Size", ((1 << $ii) * $k) . " MB"; 733 } else { 734 734 printl "INVALID SIZE", $bytes->[3] . ", " . $bytes->[4] . ", " . 735 735 $bytes->[5] . ", " . $bytes->[17]; … … 819 819 my $byte = shift; 820 820 my $ctime; 821 821 822 822 $ctime = $byte >> 4; 823 823 if (($byte & 0xf) <= 9) { $ctime += ($byte & 0xf) * 0.1; } … … 834 834 my $byte = shift; 835 835 my $atime; 836 836 837 837 $atime = ($byte >> 4) * 0.1 + ($byte & 0xf) * 0.01; 838 838 … … 908 908 $ii = ($bytes->[3] & 0x0f) + ($bytes->[4] & 0x0f) - 17; 909 909 $k = (($bytes->[5] & 0x7) + 1) * $bytes->[17]; 910 910 911 911 if($ii > 0 && $ii <= 12 && $k > 0) { 912 printl "Size", ((1 << $ii) * $k) . " MB"; 912 printl "Size", ((1 << $ii) * $k) . " MB"; 913 913 } else { 914 914 printl "INVALID SIZE", $bytes->[3] . "," . $bytes->[4] . "," . … … 954 954 my $trp; 955 955 my $tras; 956 956 957 957 $trcd =($bytes->[29] >> 2)+(($bytes->[29] & 3)*0.25); 958 958 $trp =($bytes->[27] >> 2)+(($bytes->[27] & 3)*0.25); … … 1033 1033 1034 1034 $ii = ($bytes->[4] & 0x0f) + ($bytes->[4] >> 4) + ($bytes->[5] & 0x07) - 13; 1035 1035 1036 1036 if ($ii > 0 && $ii < 16) { 1037 1037 printl "Size", (1 << $ii) . " MB"; … … 1051 1051 1052 1052 my $ii; 1053 1053 1054 1054 $ii = ($bytes->[3] & 0x0f) + ($bytes->[3] >> 4) + ($bytes->[5] & 0x07) - 13; 1055 1055 1056 1056 if ($ii > 0 && $ii < 16) { 1057 1057 printl "Size", (1 << $ii) . " MB"; … … 1218 1218 printl $l, 2**$bytes[1]; 1219 1219 } elsif ($bytes[1] == 0) { 1220 printl $l, "RFU"; 1220 printl $l, "RFU"; 1221 1221 } else { printl $l, "ERROR!"; } 1222 1222 … … 1246 1246 1247 1247 @bytes = readspd64(64, $dimm_list[$i]); 1248 1248 1249 1249 $l = "Manufacturer"; 1250 1250 # $extra is a reference to an array containing up to … … 1256 1256 $temp = manufacturer_data(@{$extra}); 1257 1257 printl $l, $temp if defined $temp; 1258 1258 1259 1259 if (spd_written($bytes[8])) { 1260 1260 # Try the location code as ASCII first, as earlier specifications … … 1266 1266 printl $l, $temp; 1267 1267 } 1268 1268 1269 1269 $l = "Part Number"; 1270 1270 $temp = part_number(@bytes[9..26]); 1271 1271 printl $l, $temp; 1272 1272 1273 1273 if (spd_written(@bytes[27..28])) { 1274 1274 $l = "Revision Code"; … … 1276 1276 printl $l, $temp; 1277 1277 } 1278 1278 1279 1279 if (spd_written(@bytes[29..30])) { 1280 1280 $l = "Manufacturing Date"; … … 1295 1295 printl $l, $temp; 1296 1296 } 1297 1297 1298 1298 if (spd_written(@bytes[31..34])) { 1299 1299 $l = "Assembly Serial Number"; … … 1309 1309 decode_intel_spec_freq(\@bytes); 1310 1310 } 1311 1311 1312 1312 print "</table>\n" if $opt_html; 1313 1313 }
