Changeset 5554
- Timestamp:
- 12/11/08 14:15:59 (4 years ago)
- Files:
-
- 1 modified
-
i2c-tools/trunk/eeprom/decode-dimms (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
i2c-tools/trunk/eeprom/decode-dimms
r5553 r5554 1279 1279 && ($week & 0xf0) <= 0x90 && ($week & 0x0f) <= 0x09) { 1280 1280 # Note that this heuristic will break in year 2080 1281 return sprintf("%d%02X-W%02X \n",1281 return sprintf("%d%02X-W%02X", 1282 1282 $year >= 0x80 ? 19 : 20, $year, $week); 1283 1283 } else { 1284 return sprintf("0x%02X%02X \n", $year, $week);1284 return sprintf("0x%02X%02X", $year, $week); 1285 1285 } 1286 1286 } … … 1302 1302 { 1303 1303 return unless spd_written(@_); 1304 printl("Assembly Serial Number", sprintf("0x%02X%02X%02X%02X \n", @_));1304 printl("Assembly Serial Number", sprintf("0x%02X%02X%02X%02X", @_)); 1305 1305 } 1306 1306 … … 1309 1309 { 1310 1310 my $bytes = shift; 1311 my ($l, $temp); 1312 1313 prints "Manufacturer Data"; 1314 1315 printl "Module Manufacturer", 1316 manufacturer_ddr3($bytes->[117], $bytes->[118]); 1311 1312 prints("Manufacturer Data"); 1313 1314 printl("Module Manufacturer", 1315 manufacturer_ddr3($bytes->[117], $bytes->[118])); 1317 1316 1318 1317 if (spd_written(@{$bytes}[148..149])) { 1319 printl "DRAM Manufacturer",1320 manufacturer_ddr3($bytes->[148], $bytes->[149]);1318 printl("DRAM Manufacturer", 1319 manufacturer_ddr3($bytes->[148], $bytes->[149])); 1321 1320 } 1322 1321 … … 1324 1323 1325 1324 if (spd_written(@{$bytes}[120..121])) { 1326 $l = "Manufacturing Date";1327 printl $l, manufacture_date($bytes->[120], $bytes->[121]);1325 printl("Manufacturing Date", 1326 manufacture_date($bytes->[120], $bytes->[121])); 1328 1327 } 1329 1328 1330 1329 printl_mfg_assembly_serial(@{$bytes}[122..125]); 1331 1330 1332 $l = "Part Number"; 1333 $temp = part_number(@{$bytes}[128..145]); 1334 printl $l, $temp; 1331 printl("Part Number", part_number(@{$bytes}[128..145])); 1335 1332 1336 1333 if (spd_written(@{$bytes}[146..147])) { 1337 $l = "Revision Code"; 1338 $temp = sprintf("0x%02X%02X\n", $bytes->[146], $bytes->[147]); 1339 printl $l, $temp; 1334 printl("Revision Code", 1335 sprintf("0x%02X%02X", $bytes->[146], $bytes->[147])); 1340 1336 } 1341 1337 } … … 1345 1341 { 1346 1342 my $bytes = shift; 1347 my ($l, $temp, $extra); 1348 1349 prints "Manufacturing Information"; 1350 1351 $l = "Manufacturer"; 1343 my ($temp, $extra); 1344 1345 prints("Manufacturing Information"); 1346 1352 1347 # $extra is a reference to an array containing up to 1353 1348 # 7 extra bytes from the Manufacturer field. Sometimes 1354 1349 # these bytes are filled with interesting data. 1355 1350 ($temp, $extra) = manufacturer(@{$bytes}[64..71]); 1356 printl $l, $temp; 1357 $l = "Custom Manufacturer Data"; 1351 printl("Manufacturer", $temp); 1358 1352 $temp = manufacturer_data(@{$extra}); 1359 printl $l, $tempif defined $temp;1353 printl("Custom Manufacturer Data", $temp) if defined $temp; 1360 1354 1361 1355 printl_mfg_location_code($bytes->[72]); 1362 1356 1363 $l = "Part Number"; 1364 $temp = part_number(@{$bytes}[73..90]); 1365 printl $l, $temp; 1357 printl("Part Number", part_number(@{$bytes}[73..90])); 1366 1358 1367 1359 if (spd_written(@{$bytes}[91..92])) { 1368 $l = "Revision Code"; 1369 $temp = sprintf("0x%02X%02X\n", @{$bytes}[91..92]); 1370 printl $l, $temp; 1360 printl("Revision Code", 1361 sprintf("0x%02X%02X", @{$bytes}[91..92])); 1371 1362 } 1372 1363 1373 1364 if (spd_written(@{$bytes}[93..94])) { 1374 $l = "Manufacturing Date";1375 printl $l, manufacture_date($bytes->[93], $bytes->[94]);1365 printl("Manufacturing Date", 1366 manufacture_date($bytes->[93], $bytes->[94])); 1376 1367 } 1377 1368
