Changeset 5544
- Timestamp:
- 12/09/08 14:26:58 (3 years ago)
- Files:
-
- 1 modified
-
i2c-tools/trunk/eeprom/decode-dimms (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
i2c-tools/trunk/eeprom/decode-dimms
r5543 r5544 1223 1223 1224 1224 # Returns the (total, used) number of bytes in the EEPROM, 1225 # assuming it is a nSPD EEPROM.1225 # assuming it is a non-Rambus SPD EEPROM. 1226 1226 sub spd_sizes($) 1227 1227 { … … 1410 1410 || $use_hexdump) { 1411 1411 my @bytes = readspd(128, $dimm_list[$i]); 1412 my ($spd_size, $spd_used) = spd_sizes(\@bytes);1412 my $is_rambus = $bytes[0] < 4; # Simple heuristic 1413 1413 my ($l, $chk_valid, $chk_spd, $chk_calc); 1414 1414 if ($bytes[2] < 9) { … … 1446 1446 $chk_spd, $chk_calc)); 1447 1447 1448 # Simple heuristic to detect Rambus1449 my $is_rambus = $bytes[0] < 4;1450 1448 my $temp; 1451 1449 if ($is_rambus) { 1452 1450 if ($bytes[0] == 1) { $temp = "0.7"; } 1453 1451 elsif ($bytes[0] == 2) { $temp = "1.0"; } 1454 elsif ($bytes[0] == 0 || $bytes[0] == 255) { $temp = "Invalid"; }1452 elsif ($bytes[0] == 0) { $temp = "Invalid"; } 1455 1453 else { $temp = "Reserved"; } 1456 1454 printl "SPD Revision", $temp; 1457 1455 } else { 1456 my ($spd_size, $spd_used) = spd_sizes(\@bytes); 1458 1457 printl "# of bytes written to SDRAM EEPROM", $spd_used; 1458 printl "Total number of bytes in EEPROM", $spd_size; 1459 1459 } 1460 1461 $l = "Total number of bytes in EEPROM";1462 printl $l, $spd_size;1463 1460 1464 1461 $l = "Fundamental Memory type";
