| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
print "Xeon Processor Information ROM Decoder\n"; |
|---|
| 35 |
print "Written by Philip Edelbrock and Mark Studebaker. Copyright 1998, 1999.\n"; |
|---|
| 36 |
print "Version 2.6.3\n\n"; |
|---|
| 37 |
|
|---|
| 38 |
$dimm_count=0; |
|---|
| 39 |
$_=`ls /proc/sys/dev/sensors/`; |
|---|
| 40 |
@dimm_list=split(); |
|---|
| 41 |
|
|---|
| 42 |
for $i ( 0 .. $#dimm_list ) { |
|---|
| 43 |
$_=$dimm_list[$i]; |
|---|
| 44 |
if ((/^eeprom-/) && (/-51$/ || /-53$/ || /-55$/ || /-57$/)) { |
|---|
| 45 |
$dimm_count=$dimm_count + 1; |
|---|
| 46 |
|
|---|
| 47 |
print "\nDecoding Xeon ROM: /proc/sys/dev/sensors/$dimm_list[$i]\n"; |
|---|
| 48 |
if (/^[^-]+-[^-]+-[^-]+-([^-]+)$/) { |
|---|
| 49 |
$dimm_num=($1 - 49) / 2; |
|---|
| 50 |
print "Guessing Xeon is number $dimm_num\n"; |
|---|
| 51 |
} |
|---|
| 52 |
|
|---|
| 53 |
print "\t\t----=== Xeon ROM Header Data ===----\n"; |
|---|
| 54 |
|
|---|
| 55 |
$_=`cat /proc/sys/dev/sensors/$dimm_list[$i]/00`; |
|---|
| 56 |
@bytes=split(" "); |
|---|
| 57 |
|
|---|
| 58 |
printf("\tData Format Revision: \t\t\t\t0x%.4X\n", $bytes[0]); |
|---|
| 59 |
|
|---|
| 60 |
print "\tTotal number of bytes in EEPROM:\t\t"; |
|---|
| 61 |
print ($bytes[1] << 4) + $bytes[2]; |
|---|
| 62 |
print "\n"; |
|---|
| 63 |
|
|---|
| 64 |
printf("\tProcessor Data Address:\t\t\t\t0x%.2X\n", $bytes[3]); |
|---|
| 65 |
printf("\tProcessor Core Data Address:\t\t\t0x%.2X\n", $bytes[4]); |
|---|
| 66 |
printf("\tL2 Cache Data Address:\t\t\t\t0x%.2X\n", $bytes[5]); |
|---|
| 67 |
printf("\tSEC Cartridge Data Address:\t\t\t0x%.2X\n", $bytes[6]); |
|---|
| 68 |
printf("\tPart Number Data Address:\t\t\t0x%.2X\n", $bytes[7]); |
|---|
| 69 |
printf("\tThermal Reference Data Address:\t\t\t0x%.2X\n", $bytes[8]); |
|---|
| 70 |
printf("\tFeature Data Address:\t\t\t\t0x%.2X\n", $bytes[9]); |
|---|
| 71 |
printf("\tOther Data Address:\t\t\t\t0x%.2X\n", $bytes[10]); |
|---|
| 72 |
|
|---|
| 73 |
print "\t\t----=== Xeon ROM Processor Data ===----\n"; |
|---|
| 74 |
|
|---|
| 75 |
|
|---|
| 76 |
$_=`cat /proc/sys/dev/sensors/$dimm_list[$i]/10`; |
|---|
| 77 |
@bbytes=split(" "); |
|---|
| 78 |
print "\tS-spec/QDF Number:\t\t\t\t\""; |
|---|
| 79 |
print pack("cccccc",$bytes[14],$bytes[15],$bbytes[0], |
|---|
| 80 |
$bbytes[1],$bbytes[2],$bbytes[3]); |
|---|
| 81 |
print "\"\n"; |
|---|
| 82 |
$tmp = $bbytes[4] & 0xC0 >> 6; |
|---|
| 83 |
printf("\tSample / Production:\t\t\t\t0x%.2X", $tmp); |
|---|
| 84 |
if($tmp) { |
|---|
| 85 |
print " (Production)\n"; |
|---|
| 86 |
} else { |
|---|
| 87 |
print " (Sample)\n"; |
|---|
| 88 |
} |
|---|
| 89 |
|
|---|
| 90 |
print "\t\t----=== Xeon ROM Core Data ===----\n"; |
|---|
| 91 |
|
|---|
| 92 |
printf("\tProcessor Core Type:\t\t\t\t0x%.2X\n", |
|---|
| 93 |
($bbytes[6] & 0xC0) >> 6); |
|---|
| 94 |
printf("\tProcessor Core Family:\t\t\t\t0x%.2X\n", |
|---|
| 95 |
($bbytes[6] & 0x3C) >> 2); |
|---|
| 96 |
printf("\tProcessor Core Model:\t\t\t\t0x%.2X\n", |
|---|
| 97 |
(($bbytes[6] & 0x03) << 2) + (($bbytes[7] & 0xC0) >> 6)); |
|---|
| 98 |
printf("\tProcessor Core Stepping:\t\t\t0x%.2X\n", |
|---|
| 99 |
($bbytes[7] & 0x30) >> 4); |
|---|
| 100 |
print "\tMaximum Core Frequency (Mhz):\t\t\t"; |
|---|
| 101 |
print ($bbytes[13] << 4) + $bbytes[14]; |
|---|
| 102 |
print "\n"; |
|---|
| 103 |
|
|---|
| 104 |
|
|---|
| 105 |
$_=`cat /proc/sys/dev/sensors/$dimm_list[$i]/20`; |
|---|
| 106 |
@bytes=split(" "); |
|---|
| 107 |
print "\tCore Voltage ID (mV):\t\t\t\t"; |
|---|
| 108 |
print ($bbytes[15] << 4) + $bytes[0]; |
|---|
| 109 |
print "\n"; |
|---|
| 110 |
print "\tCore Voltage Tolerance, High (mV):\t\t"; |
|---|
| 111 |
print $bytes[1]; |
|---|
| 112 |
print "\n"; |
|---|
| 113 |
print "\tCore Voltage Tolerance, Low (mV):\t\t"; |
|---|
| 114 |
print $bytes[2]; |
|---|
| 115 |
print "\n"; |
|---|
| 116 |
|
|---|
| 117 |
print "\t\t----=== Xeon ROM L2 Cache Data ===----\n"; |
|---|
| 118 |
|
|---|
| 119 |
print "\tL2 Cache Size (KB):\t\t\t\t"; |
|---|
| 120 |
print ($bytes[9] << 4) + $bytes[10]; |
|---|
| 121 |
print "\n"; |
|---|
| 122 |
printf("\tNumber of SRAM Components:\t\t\t%d\n", |
|---|
| 123 |
($bytes[11] & 0xF0) >> 4); |
|---|
| 124 |
print "\tL2 Cache Voltage ID (mV):\t\t\t"; |
|---|
| 125 |
print ($bytes[12] << 4) + $bytes[13]; |
|---|
| 126 |
print "\n"; |
|---|
| 127 |
print "\tL2 Cache Voltage Tolerance, High (mV):\t\t"; |
|---|
| 128 |
print $bytes[14]; |
|---|
| 129 |
print "\n"; |
|---|
| 130 |
print "\tL2 Cache Voltage Tolerance, Low (mV):\t\t"; |
|---|
| 131 |
print $bytes[15]; |
|---|
| 132 |
print "\n"; |
|---|
| 133 |
|
|---|
| 134 |
|
|---|
| 135 |
$_=`cat /proc/sys/dev/sensors/$dimm_list[$i]/30`; |
|---|
| 136 |
@bytes=split(" "); |
|---|
| 137 |
|
|---|
| 138 |
printf("\tCache/Tag Stepping ID:\t\t\t\t0x%.2X\n", |
|---|
| 139 |
($bytes[0] & 0xF0) >> 4); |
|---|
| 140 |
|
|---|
| 141 |
print "\t\t----=== Xeon ROM Cartridge Data ===----\n"; |
|---|
| 142 |
|
|---|
| 143 |
print "\tCartridge Revision:\t\t\t\t\""; |
|---|
| 144 |
print pack("cccc",$bytes[2],$bytes[3],$bytes[4],$bytes[5]); |
|---|
| 145 |
print "\"\n"; |
|---|
| 146 |
printf("\tSubstrate Rev. Software ID:\t\t\t0x%.2X\n", |
|---|
| 147 |
($bbytes[6] & 0xC0) >> 6); |
|---|
| 148 |
|
|---|
| 149 |
print "\t\t----=== Xeon ROM Part Number Data ===----\n"; |
|---|
| 150 |
|
|---|
| 151 |
print "\tProcessor Part Number:\t\t\t\t\""; |
|---|
| 152 |
print pack("ccccccc",$bytes[8],$bytes[9],$bytes[10], |
|---|
| 153 |
$bytes[11],$bytes[12],$bytes[13],$bytes[14]); |
|---|
| 154 |
print "\"\n"; |
|---|
| 155 |
$byte15=$byte[15]; |
|---|
| 156 |
|
|---|
| 157 |
|
|---|
| 158 |
$_=`cat /proc/sys/dev/sensors/$dimm_list[$i]/40`; |
|---|
| 159 |
@bytes=split(" "); |
|---|
| 160 |
|
|---|
| 161 |
print "\tProcessor BOM ID:\t\t\t\t\""; |
|---|
| 162 |
print pack("cccccccccccccc",$byte15,$bytes[0],$bytes[1], |
|---|
| 163 |
$bytes[2],$bytes[3],$bytes[4],$bytes[5],$bytes[6], |
|---|
| 164 |
$bytes[7],$bytes[8],$bytes[9],$bytes[10],$bytes[11], |
|---|
| 165 |
$bytes[12]); |
|---|
| 166 |
print "\"\n"; |
|---|
| 167 |
|
|---|
| 168 |
|
|---|
| 169 |
$_=`cat /proc/sys/dev/sensors/$dimm_list[$i]/50`; |
|---|
| 170 |
@bbytes=split(" "); |
|---|
| 171 |
printf("\tProcessor Electronic Signature: \t\t0x%.2X%.2X%.2X%.2X%.2X%.2X%.2X%.2X\n", |
|---|
| 172 |
$bytes[13],$bytes[14],$bytes[15],$bbytes[0], |
|---|
| 173 |
$bbytes[1],$bbytes[2],$bbytes[3],$bbytes[4]); |
|---|
| 174 |
|
|---|
| 175 |
|
|---|
| 176 |
|
|---|
| 177 |
|
|---|
| 178 |
|
|---|
| 179 |
$_=`cat /proc/sys/dev/sensors/$dimm_list[$i]/70`; |
|---|
| 180 |
@bytes=split(" "); |
|---|
| 181 |
|
|---|
| 182 |
print "\t\t----=== Xeon Thermal Reference Data ===----\n"; |
|---|
| 183 |
|
|---|
| 184 |
printf("\tThermal Reference Byte: \t\t\t0x%.2X\n", $bytes[0]); |
|---|
| 185 |
|
|---|
| 186 |
print "\t\t----=== Xeon ROM Feature Data ===----\n"; |
|---|
| 187 |
|
|---|
| 188 |
printf("\tProcessor Core Feature Flags: \t\t\t0x%.2X%.2X%.2X%.2X\n", |
|---|
| 189 |
$bytes[4],$bytes[5],$bytes[6],$bytes[7]); |
|---|
| 190 |
printf("\tCartridge Feature Flags: \t\t\t0x%.2X%.2X%.2X%.2X\n", |
|---|
| 191 |
$bytes[8],$bytes[9],$bytes[10],$bytes[11]); |
|---|
| 192 |
printf("\tNumber of Devices in TAP Chain:\t\t\t%d\n", |
|---|
| 193 |
($bytes[12] & 0xF0) >> 4); |
|---|
| 194 |
|
|---|
| 195 |
} |
|---|
| 196 |
} |
|---|
| 197 |
print "\n\nNumber of Xeon ROMs detected and decoded: $dimm_count\n"; |
|---|