Changeset 5553
- Timestamp:
- 12/11/08 14:06:51 (5 years ago)
- Files:
-
- 1 modified
-
i2c-tools/trunk/eeprom/decode-dimms (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
i2c-tools/trunk/eeprom/decode-dimms
r5552 r5553 1286 1286 } 1287 1287 1288 sub printl_mfg_location_code($) 1289 { 1290 my $code = shift; 1291 my $letter = chr($code); 1292 1293 return unless spd_written($code); 1294 # Try the location code as ASCII first, as earlier specifications 1295 # suggested this. As newer specifications don't mention it anymore, 1296 # we still fall back to binary. 1297 printl("Manufacturing Location Code", 1298 $letter =~ m/^[\w\d]$/ ? $letter : sprintf("0x%.2X", $code)); 1299 } 1300 1301 sub printl_mfg_assembly_serial(@) 1302 { 1303 return unless spd_written(@_); 1304 printl("Assembly Serial Number", sprintf("0x%02X%02X%02X%02X\n", @_)); 1305 } 1306 1288 1307 # Parameter: EEPROM bytes 0-175 (using 117-149) 1289 1308 sub decode_ddr3_mfg_data($) … … 1302 1321 } 1303 1322 1304 if (spd_written($bytes->[119])) { 1305 $l = "Manufacturing Location Code"; 1306 my $temp = (chr($bytes->[119]) =~ m/^[\w\d]$/) ? chr($bytes->[119]) 1307 : sprintf("0x%.2X", $bytes->[119]); 1308 printl $l, $temp; 1309 } 1323 printl_mfg_location_code($bytes->[119]); 1310 1324 1311 1325 if (spd_written(@{$bytes}[120..121])) { … … 1314 1328 } 1315 1329 1316 if (spd_written(@{$bytes}[122..125])) { 1317 $l = "Assembly Serial Number"; 1318 $temp = sprintf("0x%02X%02X%02X%02X\n", $bytes->[122], $bytes->[123], 1319 $bytes->[124], $bytes->[125]); 1320 printl $l, $temp; 1321 } 1330 printl_mfg_assembly_serial(@{$bytes}[122..125]); 1322 1331 1323 1332 $l = "Part Number"; 1324 $temp = ""; 1325 for (my $i = 128; $i <= 145; $i++) { 1326 $temp .= chr($bytes->[$i]); 1327 }; 1333 $temp = part_number(@{$bytes}[128..145]); 1328 1334 printl $l, $temp; 1329 1335 … … 1353 1359 printl $l, $temp if defined $temp; 1354 1360 1355 if (spd_written($bytes->[72])) { 1356 # Try the location code as ASCII first, as earlier specifications 1357 # suggested this. As newer specifications don't mention it anymore, 1358 # we still fall back to binary. 1359 $l = "Manufacturing Location Code"; 1360 $temp = (chr($bytes->[72]) =~ m/^[\w\d]$/) ? chr($bytes->[72]) 1361 : sprintf("0x%.2X", $bytes->[72]); 1362 printl $l, $temp; 1363 } 1361 printl_mfg_location_code($bytes->[72]); 1364 1362 1365 1363 $l = "Part Number"; … … 1378 1376 } 1379 1377 1380 if (spd_written(@{$bytes}[95..98])) { 1381 $l = "Assembly Serial Number"; 1382 $temp = sprintf("0x%02X%02X%02X%02X\n", 1383 @{$bytes}[95..98]); 1384 printl $l, $temp; 1385 } 1378 printl_mfg_assembly_serial(@{$bytes}[95..98]); 1386 1379 } 1387 1380
