Merge lp:~lulu-masse/ocsinventory-unix-agent/Solaris into lp:ocsinventory-unix-agent
- Solaris
- Merge into trunk
Proposed by
luluM
Status: | Needs review |
---|---|
Proposed branch: | lp:~lulu-masse/ocsinventory-unix-agent/Solaris |
Merge into: | lp:ocsinventory-unix-agent |
Diff against target: |
14067 lines (+13559/-175) 13 files modified
contrib/install.sh (+198/-0) contrib/memconf (+8244/-0) contrib/sneep (+4162/-0) contrib/update_info.sh (+56/-0) lib/Ocsinventory/Agent/Backend/OS/HPUX/Networks.pm (+79/-16) lib/Ocsinventory/Agent/Backend/OS/Solaris/Bios.pm (+76/-52) lib/Ocsinventory/Agent/Backend/OS/Solaris/CPU.pm (+159/-31) lib/Ocsinventory/Agent/Backend/OS/Solaris/Mem.pm (+4/-2) lib/Ocsinventory/Agent/Backend/OS/Solaris/Memory.pm (+81/-15) lib/Ocsinventory/Agent/Backend/OS/Solaris/Networks.pm (+440/-52) lib/Ocsinventory/Agent/Backend/OS/Solaris/Packages.pm (+25/-0) lib/Ocsinventory/Agent/Backend/OS/Solaris/Slots.pm (+23/-2) lib/Ocsinventory/Agent/XML/Inventory.pm (+12/-5) |
To merge this branch: | bzr merge lp:~lulu-masse/ocsinventory-unix-agent/Solaris |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OCS Inventory Dev Team | Pending | ||
Review via email: mp+26419@code.launchpad.net |
Commit message
Description of the change
Changement Solaris
To post a comment you must log in.
Unmerged revisions
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file 'contrib/install.sh' | |||
2 | --- contrib/install.sh 1970-01-01 00:00:00 +0000 | |||
3 | +++ contrib/install.sh 2010-06-21 09:39:28 +0000 | |||
4 | @@ -0,0 +1,198 @@ | |||
5 | 1 | #!/bin/ksh | ||
6 | 2 | set -x | ||
7 | 3 | REP_BASE=/opt | ||
8 | 4 | REP_OCS=/opt/ocsinventory-agent/ | ||
9 | 5 | REP_PERL_SUN=/net/SUNOS/opt/perl/bin/perl | ||
10 | 6 | REP_PERL_HP=/opt/perl-5.10 | ||
11 | 7 | REP_LIB_PERL_SUN=/net/SUNOS/opt/perl/lib:/opt/ocsinventory-agent/lib/ | ||
12 | 8 | REP_LIB_PERL_HP=$REP_PERL_HP/lib:/opt/ocsinventory-agent/lib/ | ||
13 | 9 | REP_LIB_OCS=/var/lib/ocsinventory-agent/ | ||
14 | 10 | REP_ETC_OCS=/etc/ocsinventory/ | ||
15 | 11 | REP_SIS=/var/sis/ | ||
16 | 12 | |||
17 | 13 | #SERVEUR_OCS=xxx.xxx.xxx.xxx | ||
18 | 14 | SERVEUR_OCS=xxx.xxx.xxx.xxx | ||
19 | 15 | SERVEUR_NFS=xxx.xxx.xxx.xxx | ||
20 | 16 | PARTAGE_NFS=/net/SUNOS/partage/ocs/ | ||
21 | 17 | LOG_FILE=${REP_OCS}install_ocs.log | ||
22 | 18 | MYHOSTNAME=`/bin/hostname` | ||
23 | 19 | MYPERL=`which perl` | ||
24 | 20 | MYCRONTAB=`which crontab` | ||
25 | 21 | PWD=`/bin/pwd` | ||
26 | 22 | LOG=/tmp/ocsinventory-agent.log | ||
27 | 23 | OSTYPE=`/sbin/uname` | ||
28 | 24 | OSLEVEL=`/sbin/uname -r` | ||
29 | 25 | export PATH=$PATH:$REP_OCS | ||
30 | 26 | echo_message() | ||
31 | 27 | { | ||
32 | 28 | #if [ $1 -ne 0 -a $1 -ne 3 ] | ||
33 | 29 | if [ $1 -ne 0 ] | ||
34 | 30 | then | ||
35 | 31 | echo $2 : $3 | ||
36 | 32 | else | ||
37 | 33 | echo $2 | ||
38 | 34 | fi | ||
39 | 35 | } | ||
40 | 36 | |||
41 | 37 | case "$OSTYPE" in | ||
42 | 38 | "SunOS") | ||
43 | 39 | case "$OSLEVEL" in | ||
44 | 40 | "5.8") | ||
45 | 41 | PERL_BIN=$REP_PERL_SUN;PERL5LIB=$PERL5LIB:$REP_LIB_PERL_SUN;LIBRARY_PATH=$LIBRARY_PATH:$REP_LIB_PERL_SUN;LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$REP_LIB_PERL_SUN;PATH=$PATH:$REP_OCS;; | ||
46 | 42 | "5.10") | ||
47 | 43 | PERL_BIN=$REP_PERL_SUN;PERL5LIB=$PERL5LIB:$REP_LIB_PERL_SUN;LIBRARY_PATH=$LIBRARY_PATH:$REP_LIB_PERL_SUN;LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$REP_LIB_PERL_SUN;PATH=$PATH:$REP_OCS;; | ||
48 | 44 | esac;; | ||
49 | 45 | "HP-UX") | ||
50 | 46 | PERL_BIN=$REP_PERL_HP;PERL5LIB=$PERL5LIB:$REP_LIB_PERL_HP;LIBRARY_PATH=$LIBRARY_PATH:$REP_LIB_PERL_HP;LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$REP_LIB_PERL_HP;PATH=$PATH:$REP_OCS;; | ||
51 | 47 | "Linux") | ||
52 | 48 | PERL_BIN=$MYPERL;; | ||
53 | 49 | esac | ||
54 | 50 | |||
55 | 51 | #case "$OSTYPE" in | ||
56 | 52 | #"SunOS") | ||
57 | 53 | # case "$OSLEVEL" in | ||
58 | 54 | # "5.8") | ||
59 | 55 | # PERL_BIN=$REP_PERL;PERL5LIB=$PERL5LIB:$REP_LIB_PERL;LIBRARY_PATH=$LIBRARY_PATH:$REP_LIB_PERL;LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$REP_LIB_PERL;; | ||
60 | 56 | # "5.10") | ||
61 | 57 | # PERL_BIN=$REP_PERL;PERL5LIB=$PERL5LIB:/opt/ocsinventory-agent/lib;LIBRARY_PATH=$LIBRARY_PATH:/opt/ocsinventory-agent/lib;LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ocsinventory-agent/lib;; | ||
62 | 58 | # esac;; | ||
63 | 59 | #"HP-UX") | ||
64 | 60 | #PERL_BIN=/usr/contrib/bin/perl ;; | ||
65 | 61 | #"Linux") | ||
66 | 62 | # PERL_BIN=$MYPERL;; | ||
67 | 63 | #esac | ||
68 | 64 | |||
69 | 65 | |||
70 | 66 | export PERL5LIB | ||
71 | 67 | export LIBRARY_PATH | ||
72 | 68 | export LD_LIBRARY_PATH | ||
73 | 69 | export PATH | ||
74 | 70 | |||
75 | 71 | echo "Execution d OCS ... " | ||
76 | 72 | if [ -d $REP_BASE ] | ||
77 | 73 | then | ||
78 | 74 | echo_message $? "Pas de repertoire $REP_BASE a creer\n " | ||
79 | 75 | else | ||
80 | 76 | /bin/mkdir $REP_BASE > $LOG 2>&1 | ||
81 | 77 | echo_message $? "Creation du repertoire $REP_BASE" "ERREUR" | ||
82 | 78 | fi | ||
83 | 79 | |||
84 | 80 | |||
85 | 81 | if [ -d $REP_OCS ] | ||
86 | 82 | then | ||
87 | 83 | echo_message $? "Pas de repertoire $REP_OCS a creer\n " | ||
88 | 84 | /bin/rm /opt/ocsinventory-agent | ||
89 | 85 | /bin/rm -R $REP_OCS | ||
90 | 86 | /bin/mkdir ${REP_OCS} | ||
91 | 87 | else | ||
92 | 88 | /bin/mkdir $REP_OCS > $LOG 2>&1 | ||
93 | 89 | echo_message $? "Creation du repertoire $REP_OCS" "ERREUR" | ||
94 | 90 | fi | ||
95 | 91 | |||
96 | 92 | if [ -d /var/lib ] | ||
97 | 93 | then | ||
98 | 94 | echo_message $? "Pas de repertoire /var/lib a creer \n " | ||
99 | 95 | else | ||
100 | 96 | /bin/mkdir /var/lib > $LOG 2>&1 | ||
101 | 97 | echo_message $? "Creation du repertoire /var/lib" "ERREUR" | ||
102 | 98 | fi | ||
103 | 99 | |||
104 | 100 | if [ -d $REP_LIB_OCS ] | ||
105 | 101 | then | ||
106 | 102 | echo_message $? "Pas de repertoire $REP_LIB_OCS a creer " | ||
107 | 103 | else | ||
108 | 104 | /bin/mkdir $REP_LIB_OCS > $LOG 2>&1 | ||
109 | 105 | echo_message $? "Creation du repertoire $REP_LIB_OCS" "ERREUR" | ||
110 | 106 | fi | ||
111 | 107 | |||
112 | 108 | if [ -d $REP_ETC_OCS ] | ||
113 | 109 | then | ||
114 | 110 | echo_message $? "le repertoire $REP_ETC_OCS existe déja...\n " | ||
115 | 111 | else | ||
116 | 112 | /bin/mkdir $REP_ETC_OCS > $LOG 2>&1 | ||
117 | 113 | echo_message $? "Creation du repertoire $REP_ETC_OCS ...\n " | ||
118 | 114 | fi | ||
119 | 115 | |||
120 | 116 | /bin/cp -R ocsinventory-agent lib memconf update_info.sh sneep $REP_OCS | ||
121 | 117 | /bin/chmod +x ${REP_OCS}ocsinventory-agent | ||
122 | 118 | /bin/chmod +x ${REP_OCS}memconf | ||
123 | 119 | /bin/chmod +x ${REP_OCS}update_info.sh | ||
124 | 120 | /bin/chmod +x ${REP_OCS}sneep | ||
125 | 121 | |||
126 | 122 | #if [ -d $REP_SIS ] | ||
127 | 123 | #then | ||
128 | 124 | # echo_message $? "le repertoire $REP_SIS existe déja...\n " | ||
129 | 125 | #else | ||
130 | 126 | /bin/mkdir $REP_SIS > $LOG 2>&1 | ||
131 | 127 | echo_message $? "Creation du repertoire $REP_SIS ...\n " | ||
132 | 128 | echo "Recherche des fichiers de signature" | ||
133 | 129 | /bin/find /opt -name "*.SIS" -exec cp {} $REP_SIS \; | grep -v /zones | ||
134 | 130 | if [ -d /oracle ] | ||
135 | 131 | then | ||
136 | 132 | touch $PARTAGE_NFS$MYHOSTNAME.ORACLE | ||
137 | 133 | /bin/find /oracle -name "*.SIS" -exec cp {} $REP_SIS \; | grep -v /zones >> $PARTAGE_NFS$MYHOSTNAME.ORACLE | ||
138 | 134 | /bin/find /oracle -name "*.SIS" -exec echo {} \; >> $PARTAGE_NFS$MYHOSTNAME.ORACLE | ||
139 | 135 | /bin/ls -ltr /oracle/product >> $PARTAGE_NFS$MYHOSTNAME.ORACLE | ||
140 | 136 | fi | ||
141 | 137 | if [ -d /sybase ] | ||
142 | 138 | then | ||
143 | 139 | touch $PARTAGE_NFSMYHOSTNAME.SYBASE | ||
144 | 140 | /bin/find /sybase -name "*.SIS" -exec cp {} $REP_SIS \; | grep -v /zones >> $PARTAGE_NFS$MYHOSTNAME.SYBASE | ||
145 | 141 | /bin/find /sybase -name "*.SIS" -exec echo {} \; >> $PARTAGE_NFS$MYHOSTNAME.SYBASE | ||
146 | 142 | /bin/ls -ltr /sybase >> $PARTAGE_NFS$MYHOSTNAME.SYBASE | ||
147 | 143 | fi | ||
148 | 144 | #fi | ||
149 | 145 | |||
150 | 146 | |||
151 | 147 | |||
152 | 148 | echo "Mise a jour du cron" | ||
153 | 149 | #INFOCRONTAB=`$MYCRONTAB -l | grep ocsinventory-agent` | ||
154 | 150 | INFOCRONTAB= | ||
155 | 151 | if [ "1${INFOCRONTAB}" = "1" ] | ||
156 | 152 | then | ||
157 | 153 | echo_message $? "MAJ du cron" | ||
158 | 154 | $MYCRONTAB -l > ${REP_OCS}ocscrontab.bak | ||
159 | 155 | $MYCRONTAB -l > ${REP_OCS}ocscrontab | ||
160 | 156 | vi - ${REP_OCS}/ocscrontab << FILE | ||
161 | 157 | :/ocsinventory-agent/d | ||
162 | 158 | :wq! | ||
163 | 159 | FILE | ||
164 | 160 | |||
165 | 161 | heure=$(($RANDOM % 24)) | ||
166 | 162 | |||
167 | 163 | if [ ${#heure} = "1" ] | ||
168 | 164 | then | ||
169 | 165 | heure="0$heure"; | ||
170 | 166 | fi | ||
171 | 167 | min1=$(($RANDOM % 6 )) | ||
172 | 168 | min2=$(($RANDOM % 10 )) | ||
173 | 169 | echo "$min1$min2 $heure * * 1 cd ${REP_OCS};./update_info.sh > /dev/null 2>&1" >> $REP_OCS/ocscrontab | ||
174 | 170 | $MYCRONTAB $REP_OCS/ocscrontab | ||
175 | 171 | |||
176 | 172 | else | ||
177 | 173 | |||
178 | 174 | echo_message $? "Pas de MAJ du cron" | ||
179 | 175 | |||
180 | 176 | fi | ||
181 | 177 | |||
182 | 178 | |||
183 | 179 | #cp $REP_OCS/etc/ocsinventory-agent.cfg $REP_ETC_OCS | ||
184 | 180 | #cp $REP_OCS/etc/modules.conf $REP_ETC_OCS | ||
185 | 181 | |||
186 | 182 | |||
187 | 183 | echo "Info OCS " | ||
188 | 184 | $PERL_BIN -I ${REP_OCS}lib/ -MXML::SAX -e "XML::SAX->add_parser('XML::SAX::PurePerl')->save_parsers()" | ||
189 | 185 | echo "Recuperation des infos ... $PERL_BIN $REP_OCS/ocsinventory-agent --devlib ./lib --server http://$SERVEUR_OCS/ocsinventory -f -i -debug --force " | ||
190 | 186 | #$PERL_BIN ${REP_OCS}ocsinventory-agent --devlib ./lib -l /opt/ocsinventory-agent -i --debug --force | ||
191 | 187 | echo "Changement de repertoire : $REP_OCS " | ||
192 | 188 | #cd $REP_OCS | ||
193 | 189 | #$PERL_BIN $REP_OCS/ocsinventory-agent --devlib ./lib --server http://$SERVEUR_OCS/ocsinventory --debug --force | ||
194 | 190 | $PERL_BIN ${REP_OCS}ocsinventory-agent --devlib ./lib --server http://$SERVEUR_OCS/ocsinventory --debug --force | ||
195 | 191 | #perl ocsinventory-agent --devlib ./lib --debug --force | ||
196 | 192 | |||
197 | 193 | |||
198 | 194 | |||
199 | 195 | echo "Backup des infos\n" | ||
200 | 196 | #/usr/bin/cp $REP_OCS/*.ocs $PARTAGE_NFS | ||
201 | 197 | |||
202 | 198 | |||
203 | 0 | 199 | ||
204 | === added file 'contrib/memconf' | |||
205 | --- contrib/memconf 1970-01-01 00:00:00 +0000 | |||
206 | +++ contrib/memconf 2010-06-21 09:39:28 +0000 | |||
207 | @@ -0,0 +1,8244 @@ | |||
208 | 1 | #!/usr/bin/env perl | ||
209 | 2 | # | ||
210 | 3 | # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
211 | 4 | # MODIFY THE LOCATION OF PERL ABOVE IF NECESSARY | ||
212 | 5 | # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
213 | 6 | # | ||
214 | 7 | # @(#) memconf - Identify sizes of memory modules installed on a | ||
215 | 8 | # @(#) Solaris, Linux, FreeBSD or HP-UX workstation or server. | ||
216 | 9 | # @(#) Micron Technology, Inc. - Tom Schmidt 29-Sep-2009 V2.11 | ||
217 | 10 | # | ||
218 | 11 | # Maintained by Tom Schmidt (tschmidt@micron.com) | ||
219 | 12 | # | ||
220 | 13 | # Check my website at http://www.4schmidts.com/unix.html to get the latest | ||
221 | 14 | # version of memconf. | ||
222 | 15 | # | ||
223 | 16 | # If memconf does not recognize a system, then please run 'memconf -D' to | ||
224 | 17 | # have it automatically E-mail me the information I need to enhanced to | ||
225 | 18 | # recognize it. If the unrecognized system is a Sun clone, please also send | ||
226 | 19 | # any hardware documentation on the memory layout that you may have. | ||
227 | 20 | # | ||
228 | 21 | # Usage: memconf [ -v | -D | -h ] [explorer_dir] | ||
229 | 22 | # -v verbose mode | ||
230 | 23 | # -D E-mail results to memconf maintainer | ||
231 | 24 | # -h print help | ||
232 | 25 | # explorer_dir Sun Explorer output directory | ||
233 | 26 | # | ||
234 | 27 | # memconf reports the size of each SIMM/DIMM memory module installed in a | ||
235 | 28 | # system. It also reports the system type and any empty memory sockets. | ||
236 | 29 | # In verbose mode, it also reports the following information if available: | ||
237 | 30 | # - banner name, model and CPU/system frequencies | ||
238 | 31 | # - address range and bank numbers for each module | ||
239 | 32 | # | ||
240 | 33 | # memconf is Y2K compliant. There are no date calls in the program. Your | ||
241 | 34 | # Operating System or Perl version may not be Y2K compliant. | ||
242 | 35 | # | ||
243 | 36 | # memconf is free software; you can redistribute it and/or modify it under | ||
244 | 37 | # the terms of the GNU General Public License as published by the Free | ||
245 | 38 | # Software Foundation; either version 2 of the License, or (at your option) | ||
246 | 39 | # any later version. | ||
247 | 40 | # | ||
248 | 41 | # Original version based on SunManagers SUMMARY by Howard Modell | ||
249 | 42 | # (h.modell@ieee.org) on 29-Jan-1997. | ||
250 | 43 | # | ||
251 | 44 | # Tested to work on: | ||
252 | 45 | # - Solaris 10 6/06 or later on x86 with /usr/platform/i86pc/sbin/prtdiag | ||
253 | 46 | # - Linux on SPARC with sparc-utils and /dev/openprom | ||
254 | 47 | # - Linux/FreeBSD on x86 with kernel-utils or pmtools for /usr/sbin/dmidecode | ||
255 | 48 | # - most HP-UX systems with Support Tools Manager (cstm) | ||
256 | 49 | # - Solaris (SunOS 4.X or 5.X) on the following SPARC systems | ||
257 | 50 | # - sun4c Sun SS1, SS2, IPC, IPX, ELC with Open Boot PROM V2.X | ||
258 | 51 | # - sun4m Sun 4/6x0, SS4, SS5, SS10, SS20, LX/ZX, Classic, Voyager, JavaEngine1 | ||
259 | 52 | # - sun4d Sun SPARCserver-1000, 1000E, SPARCcenter-2000, 2000E | ||
260 | 53 | # - sun4u Sun Ultra 1, 2, 5, 10, 30, 60, 450 | ||
261 | 54 | # - sun4u Sun Ultra 80, Ultra Enterprise 420R, and Netra t1400/1405. | ||
262 | 55 | # - sun4u Sun Ultra Enterprise 220R, 250, 450 | ||
263 | 56 | # - sun4u Sun Ultra Enterprise 3000, 3500, 4000/5000, 4500/5500, 6000, 6500 | ||
264 | 57 | # - sun4u1 Sun Ultra Enterprise 10000 | ||
265 | 58 | # - sun4u Sun StorEdge N8400 and N8600 Filer | ||
266 | 59 | # - sun4u Sun SPARCengine Ultra AX, AXi, AXmp, AXmp+, AXe | ||
267 | 60 | # - sun4u Sun SPARCengine CP 1400, CP 1500, CP2140 | ||
268 | 61 | # - sun4u Sun Netra t1 100/105, t1120/1125, ft1800, X1, T1 200, AX1105-500, 120 | ||
269 | 62 | # - sun4u Sun Netra 20 (Netra T4) | ||
270 | 63 | # - sun4u Sun Netra ct800 | ||
271 | 64 | # - sun4u Sun Blade 100, 150, 1000, 1500, 2000, 2500 | ||
272 | 65 | # - sun4u Sun Fire 280R | ||
273 | 66 | # - sun4u Sun Fire 3800, 4800, 4810, 6800 | ||
274 | 67 | # - sun4u Sun Fire V100, V120, V210, V240, V250, V440 | ||
275 | 68 | # - sun4u Sun Netra 210, 240, 440 | ||
276 | 69 | # - sun4u Sun Fire V125, V215, V245, V445 | ||
277 | 70 | # - sun4u Sun Fire V480, V490, V880, V880z, V890 | ||
278 | 71 | # - sun4u Sun Fire 12000, 15000, E20K, E25K | ||
279 | 72 | # - sun4u Sun Fire V1280, Netra 1280 (Netra T12) | ||
280 | 73 | # - sun4u Sun Fire E2900, E4900, E6900 | ||
281 | 74 | # - sun4u Sun Fire B100s Blade Server | ||
282 | 75 | # - sun4u Sun Ultra 25 Workstation | ||
283 | 76 | # - sun4u Sun Ultra 45 Workstation | ||
284 | 77 | # - sun4u Sun/Fujitsu Siemens SPARC Enterprise M3000, M4000, M5000, M8000 Server | ||
285 | 78 | # - sun4v Sun Fire T2000, T1000, Netra T2000 | ||
286 | 79 | # - sun4v Sun Blade T6300, T6320 | ||
287 | 80 | # - sun4v Sun SPARC Enterprise T2000, T1000 Server | ||
288 | 81 | # - sun4v Sun SPARC Enterprise T5120, T5140, T5220, T5240 Server, Netra T5220 | ||
289 | 82 | # - sun4v Sun SPARC Enterprise T5440 Server | ||
290 | 83 | # - sun4m Tatung COMPstation 5, 10, 20AL, 20S and 20SL clones | ||
291 | 84 | # - sun4m transtec SPARCstation 20I clone | ||
292 | 85 | # - sun4m Rave Axil-255 SPARCstation 5 clone | ||
293 | 86 | # - sun4m Rave Axil-245, 311 and 320 clones (no verbose output) | ||
294 | 87 | # - sun4u AXUS Ultra 250 | ||
295 | 88 | # - sun4u Tatung COMPstation U2, U60 and U80D clones | ||
296 | 89 | # - Force Computers SPARC clones (no verbose output) | ||
297 | 90 | # - Tadpole SPARCbook 3 and RDI PowerLite-170 (no verbose output) | ||
298 | 91 | # - Tadpole VoyagerIIi | ||
299 | 92 | # - Tadpole (Cycle) 3200 CycleQUAD Ultra 2 upgrade motherboard | ||
300 | 93 | # - Tadpole (Cycle) UP-520-IIi SPARCstation 5/20 upgrade motherboard | ||
301 | 94 | # - Tadpole SPARCle | ||
302 | 95 | # - Auspex 7000/650 (no verbose output) | ||
303 | 96 | # - Fujitsu S-4/10H, S-4/20L and S-4/20H clones (no verbose output) | ||
304 | 97 | # - Fujitsu GP7000, GP7000F | ||
305 | 98 | # - Fujitsu Siemens PrimePower 200, 400, 600, 800, 1000, 2000 | ||
306 | 99 | # - Fujitsu Siemens PrimePower 250, 450, 650, 850 | ||
307 | 100 | # - Fujitsu Siemens PrimePower 900, 1500, 2500, HPC2500 | ||
308 | 101 | # - Twinhead TWINstation 5G, 20G | ||
309 | 102 | # - Detects VSIMMs for SX graphics on SS10SX/SS20 (1st VSIMM only) | ||
310 | 103 | # - Detects Prestoserve NVSIMMs on SS10/SS20/SS1000/SC2000 | ||
311 | 104 | # | ||
312 | 105 | # Untested systems that should work: | ||
313 | 106 | # - sun4c Sun SS1+ with Open Boot PROM V2.X | ||
314 | 107 | # - sun4m Tatung COMPstation 20A clone | ||
315 | 108 | # - sun4u Sun Netra ct400, ct410, ct810 | ||
316 | 109 | # - sun4u Sun SPARCengine CP2040, CP2060, CP2080, CP2160 | ||
317 | 110 | # - sun4u Sun/Fujitsu Siemens SPARC Enterprise M9000 Server | ||
318 | 111 | # - May not work properly on Sun clones | ||
319 | 112 | # | ||
320 | 113 | # Won't work on: | ||
321 | 114 | # - SPARC systems without /dev/openprom | ||
322 | 115 | # - sun4c Sun SS1, SS1+, SLC, IPC with Open Boot PROM V1.X (no 'memory' lines | ||
323 | 116 | # in devinfo/prtconf output) | ||
324 | 117 | # - sun4 kernel architecture, and sun3 and older systems | ||
325 | 118 | # - Perl 5.001 is known to have problems with hex number conversions | ||
326 | 119 | # - Does not detect unused VSIMMs (another FB installed) or second VSIMM | ||
327 | 120 | # | ||
328 | 121 | # To Do list and Revision History can be found on the maintainers web site at | ||
329 | 122 | # http://www.4schmidts.com/unix.html | ||
330 | 123 | |||
331 | 124 | # Uncomment for debugging (perl 5 only) | ||
332 | 125 | #use diagnostics; | ||
333 | 126 | $^W=1; # Enables -w warning switch, put here for SunOS4 compatibility. | ||
334 | 127 | |||
335 | 128 | $version="V2.11"; | ||
336 | 129 | $version_date="29-Sep-2009"; | ||
337 | 130 | $URL="http://www.4schmidts.com/unix.html"; | ||
338 | 131 | |||
339 | 132 | $newpath="/usr/sbin:/bin:/usr/bin:/usr/ucb:/usr/local/bin:/var/local/bin"; | ||
340 | 133 | $ENV{PATH}=(defined($ENV{PATH})) ? "$newpath:$ENV{PATH}" : $newpath; | ||
341 | 134 | # Force C locale so that output is in English | ||
342 | 135 | $ENV{LC_ALL}="C"; | ||
343 | 136 | $_=$]; | ||
344 | 137 | ($PERL_VERSION_MAJOR)=/(\d).*/; | ||
345 | 138 | if ($PERL_VERSION_MAJOR < 5) { | ||
346 | 139 | ($PERL_VERS)=/(\d\.\d)/; | ||
347 | 140 | ($PERL_PATCH)=/(\d*)$/; | ||
348 | 141 | $PERL_PATCH="0$PERL_PATCH" if ($PERL_PATCH < 10); | ||
349 | 142 | $PERL_VERSION="$PERL_VERS$PERL_PATCH"; | ||
350 | 143 | } else { | ||
351 | 144 | ($PERL_VERSION)=/(\d\.\d{3}).*/; | ||
352 | 145 | } | ||
353 | 146 | |||
354 | 147 | $uname="/usr/bin/uname"; | ||
355 | 148 | $uname="/bin/uname" if (-x '/bin/uname'); | ||
356 | 149 | if (-x $uname) { | ||
357 | 150 | $hostname=&mychomp(`$uname -n`); | ||
358 | 151 | $machine=&mychomp(`$uname -m`); | ||
359 | 152 | $os=&mychomp(`$uname`); | ||
360 | 153 | $os="Linux" if ("$os" eq "FreeBSD"); | ||
361 | 154 | $osrel=&mychomp(`$uname -r`); | ||
362 | 155 | $kernver=&mychomp(`$uname -v`); | ||
363 | 156 | $platform=$machine; | ||
364 | 157 | } else { | ||
365 | 158 | $hostname=""; | ||
366 | 159 | $machine=""; | ||
367 | 160 | $os="this unsupported"; | ||
368 | 161 | $osrel=""; | ||
369 | 162 | $kernver=""; | ||
370 | 163 | } | ||
371 | 164 | $osrelease=""; | ||
372 | 165 | $prtdiag_cmd=""; | ||
373 | 166 | $prtdiag_exec=""; | ||
374 | 167 | $have_prtdiag_data=0; | ||
375 | 168 | $prtdiag_checked=0; | ||
376 | 169 | $prtfru_cmd=""; | ||
377 | 170 | $have_prtfru_data=0; | ||
378 | 171 | $prtpicl_cmd=""; | ||
379 | 172 | $have_prtpicl_data=0; | ||
380 | 173 | $psrinfo_cmd=""; | ||
381 | 174 | $have_psrinfo_data=0; | ||
382 | 175 | $use_psrinfo_data=1; | ||
383 | 176 | $psrinfo_checked=0; | ||
384 | 177 | $cfgadm_cmd=""; | ||
385 | 178 | $have_cfgadm_data=0; | ||
386 | 179 | $ipmitool_cmd=""; | ||
387 | 180 | $have_ipmitool_data=0; | ||
388 | 181 | $ipmi_cpu_cnt=0; | ||
389 | 182 | $ipmi_cputype=""; | ||
390 | 183 | @ipmi_mem=(""); | ||
391 | 184 | $smbios_cmd=""; | ||
392 | 185 | $have_smbios_data=0; | ||
393 | 186 | @smbios_mem=(""); | ||
394 | 187 | $ldm_cmd=""; | ||
395 | 188 | $have_ldm_data=0; | ||
396 | 189 | $ldm_memory=0; | ||
397 | 190 | $free_cmd=""; | ||
398 | 191 | $have_free_data=0; | ||
399 | 192 | $have_x86_devname=0; | ||
400 | 193 | if (-d '/usr/platform') { | ||
401 | 194 | $platform=&mychomp(`$uname -i`); | ||
402 | 195 | if (-x "/usr/platform/$platform/sbin/prtdiag") { | ||
403 | 196 | $prtdiag_cmd="/usr/platform/$platform/sbin/prtdiag"; | ||
404 | 197 | } elsif (-x "/usr/platform/$machine/sbin/prtdiag") { | ||
405 | 198 | $prtdiag_cmd="/usr/platform/$machine/sbin/prtdiag"; | ||
406 | 199 | } elsif (-x "/usr/sbin/prtdiag") { | ||
407 | 200 | $prtdiag_cmd="/usr/sbin/prtdiag"; | ||
408 | 201 | } | ||
409 | 202 | } elsif (-x '/usr/kvm/prtdiag') { | ||
410 | 203 | $platform=$machine; | ||
411 | 204 | $prtdiag_cmd='/usr/kvm/prtdiag'; | ||
412 | 205 | } elsif (-x "/usr/sbin/prtdiag") { | ||
413 | 206 | $platform=$machine; | ||
414 | 207 | $prtdiag_cmd="/usr/sbin/prtdiag"; | ||
415 | 208 | } | ||
416 | 209 | if ($prtdiag_cmd ne "") { | ||
417 | 210 | if (-x $prtdiag_cmd) { | ||
418 | 211 | $prtdiag_exec="$prtdiag_cmd"; | ||
419 | 212 | } | ||
420 | 213 | } | ||
421 | 214 | $buffer=""; | ||
422 | 215 | $filename=""; | ||
423 | 216 | $installed_memory=0; | ||
424 | 217 | $failed_memory=0; | ||
425 | 218 | $spare_memory=0; | ||
426 | 219 | $failing_memory=0; | ||
427 | 220 | $failed_fru=""; | ||
428 | 221 | $ultra=0; | ||
429 | 222 | $simmbanks=0; | ||
430 | 223 | $simmspergroup=1; | ||
431 | 224 | $bankcnt=0; | ||
432 | 225 | $slot0=0; | ||
433 | 226 | $smallestsimm=16777216; | ||
434 | 227 | $largestsimm=0; | ||
435 | 228 | $found8mb=0; | ||
436 | 229 | $found16mb=0; | ||
437 | 230 | $found32mb=0; | ||
438 | 231 | $found10bit=0; | ||
439 | 232 | $found11bit=0; | ||
440 | 233 | $foundbank1or3=0; | ||
441 | 234 | $sxmem=0; | ||
442 | 235 | $nvmem=0; | ||
443 | 236 | $nvmem1=0; | ||
444 | 237 | $nvmem2=0; | ||
445 | 238 | $memtype="SIMM"; | ||
446 | 239 | $sockettype="socket"; | ||
447 | 240 | $verbose=0; | ||
448 | 241 | $DEBUG=0; | ||
449 | 242 | $starttime=time; | ||
450 | 243 | $recognized=1; | ||
451 | 244 | $untested=1; | ||
452 | 245 | $untested_type=""; | ||
453 | 246 | $perlhexbug=0; | ||
454 | 247 | $exitstatus=0; | ||
455 | 248 | $meg=1048576; | ||
456 | 249 | @socketstr=(""); | ||
457 | 250 | @socketlabelstr=(""); | ||
458 | 251 | @orderstr=(""); | ||
459 | 252 | @groupstr=(""); | ||
460 | 253 | @bankstr=(""); | ||
461 | 254 | @banksstr=(""); | ||
462 | 255 | $bankname="banks"; | ||
463 | 256 | @bytestr=(""); | ||
464 | 257 | @slotstr=(""); | ||
465 | 258 | $simmrangex=0; | ||
466 | 259 | $simmrange=1; | ||
467 | 260 | $showrange=1; | ||
468 | 261 | $start1x=""; | ||
469 | 262 | $stop1x=""; | ||
470 | 263 | @simmsizes=(0,16777216); | ||
471 | 264 | @simmsizesfound=(); | ||
472 | 265 | @memorylines=(""); | ||
473 | 266 | $socket=""; | ||
474 | 267 | $socketlabel=""; | ||
475 | 268 | $order=""; | ||
476 | 269 | $group=""; | ||
477 | 270 | $slotnum=""; | ||
478 | 271 | $bank=""; | ||
479 | 272 | $dualbank=0; | ||
480 | 273 | $byte=""; | ||
481 | 274 | $gotmemory=""; | ||
482 | 275 | $gotmodule=""; | ||
483 | 276 | $gotmodulenames=""; | ||
484 | 277 | $gotcpunames=""; | ||
485 | 278 | $gotcpuboards=""; | ||
486 | 279 | $slotname0=""; | ||
487 | 280 | @boards_cpu=""; | ||
488 | 281 | @boards_mem=""; | ||
489 | 282 | $empty_banks=""; | ||
490 | 283 | $banks_used=""; | ||
491 | 284 | $nvsimm_banks=""; | ||
492 | 285 | $boardslot_cpu=" "; | ||
493 | 286 | $boardslot_cpus=" "; | ||
494 | 287 | @boardslot_cpus=(); | ||
495 | 288 | $boardslot_mem=" "; | ||
496 | 289 | $boardslot_mems=" "; | ||
497 | 290 | @boardslot_mems=(); | ||
498 | 291 | $boardfound_cpu=0; | ||
499 | 292 | $boardfound_mem=0; | ||
500 | 293 | $prtdiag_has_mem=0; | ||
501 | 294 | $prtdiag_banktable_has_dimms=0; | ||
502 | 295 | $prtdiag_failed=0; | ||
503 | 296 | $prtconf_warn=""; | ||
504 | 297 | $flag_cpu=0; | ||
505 | 298 | $flag_mem=0; | ||
506 | 299 | $flag_rewrite_prtdiag_mem=0; | ||
507 | 300 | $format_cpu=0; | ||
508 | 301 | $format_mem=0; | ||
509 | 302 | $foundname=0; | ||
510 | 303 | $sockets_used=""; | ||
511 | 304 | $sockets_empty=""; | ||
512 | 305 | $sortslots=1; | ||
513 | 306 | $devtype=""; | ||
514 | 307 | $interleave=0; | ||
515 | 308 | $stacked=0; | ||
516 | 309 | $freq=0; | ||
517 | 310 | $sysfreq=0; | ||
518 | 311 | $cpufreq=0; | ||
519 | 312 | $cputype=""; | ||
520 | 313 | $cputype_prtconf=""; | ||
521 | 314 | $cputype_psrinfo=""; | ||
522 | 315 | @cpucnt=(); | ||
523 | 316 | $cpucntfrom=""; | ||
524 | 317 | $cpucntflag=0; | ||
525 | 318 | @diagcpucnt=(); | ||
526 | 319 | $diagthreadcnt=0; | ||
527 | 320 | $psrcpucnt=0; | ||
528 | 321 | $foundpsrinfocpu=0; | ||
529 | 322 | $ncpu=0; # remains 0 if using prtdiag output only | ||
530 | 323 | $ndcpu=0; | ||
531 | 324 | $npcpu=0; | ||
532 | 325 | $nvcpu=0; | ||
533 | 326 | $threadcnt=0; | ||
534 | 327 | $corecnt=1; | ||
535 | 328 | $hyperthread=0; | ||
536 | 329 | $header_shown=0; | ||
537 | 330 | $romver=""; | ||
538 | 331 | $romvernum=""; | ||
539 | 332 | $SUNWexplo=0; | ||
540 | 333 | $banner=""; | ||
541 | 334 | $bannermore=""; | ||
542 | 335 | $cpubanner=""; | ||
543 | 336 | $diagbanner=""; | ||
544 | 337 | $model=""; | ||
545 | 338 | $modelmore=""; | ||
546 | 339 | $model_checked=0; | ||
547 | 340 | $BSD=0; # Initially assume SunOS 5.X | ||
548 | 341 | $config_cmd="/usr/sbin/prtconf -vp"; | ||
549 | 342 | $config_command="prtconf"; | ||
550 | 343 | $config_permission=0; | ||
551 | 344 | $permission_error=""; | ||
552 | 345 | $dmidecode_error=""; | ||
553 | 346 | $freephys=0; | ||
554 | 347 | $isX86=0; | ||
555 | 348 | $HPUX=0; | ||
556 | 349 | $devname=""; # Sun internal development code name | ||
557 | 350 | $familypn=""; # Sun family part number (system code) | ||
558 | 351 | $clone=0; | ||
559 | 352 | $totmem=0; | ||
560 | 353 | $LnxDMI=0; | ||
561 | 354 | $latest_dmidecode_ver="2.10"; | ||
562 | 355 | $dmidecode_ver="0"; | ||
563 | 356 | $dmidecodeURL="http://www.nongnu.org/dmidecode/"; | ||
564 | 357 | $cpuarr=-1; | ||
565 | 358 | $memarr=-1; | ||
566 | 359 | $release=""; | ||
567 | 360 | $waitshown=0; | ||
568 | 361 | $helpers_defined=0; | ||
569 | 362 | $picl_foundmemory=0; | ||
570 | 363 | @picl_mem_pn=(); | ||
571 | 364 | @picl_mem_bank=(); | ||
572 | 365 | @picl_mem_dimm=(); | ||
573 | 366 | $linebreak="----------------------------------------------------\n"; | ||
574 | 367 | $uid=&mychomp(`id`); | ||
575 | 368 | $uid=~s/uid=//; | ||
576 | 369 | $uid=~s/\(.*//; | ||
577 | 370 | |||
578 | 371 | # | ||
579 | 372 | # Parse options | ||
580 | 373 | # | ||
581 | 374 | foreach $name (@ARGV) { | ||
582 | 375 | if ($name eq "-v") { | ||
583 | 376 | # verbose mode | ||
584 | 377 | $verbose=1; | ||
585 | 378 | } elsif ($name eq "-d") { | ||
586 | 379 | # more verbose debug mode | ||
587 | 380 | $verbose=2; | ||
588 | 381 | } elsif ($name eq "-debug") { | ||
589 | 382 | # most verbose debug mode | ||
590 | 383 | $DEBUG=1; | ||
591 | 384 | } elsif ($name eq "-D") { | ||
592 | 385 | # E-mail information of system to maintainer | ||
593 | 386 | $verbose=3; | ||
594 | 387 | open(MAILFILE, ">/tmp/memconf.output") || die "can't open /tmp/memconf.output: $!"; | ||
595 | 388 | print MAILFILE "Output from 'memconf -d' on $hostname\n"; | ||
596 | 389 | print MAILFILE "$linebreak"; | ||
597 | 390 | close(MAILFILE); | ||
598 | 391 | open(STDOUT, "| tee -a /tmp/memconf.output") || die "can't open /tmp/memconf.output: $!"; | ||
599 | 392 | print "Gathering memconf data to E-mail to maintainer. This may take a few minutes.\nPlease wait...\n"; | ||
600 | 393 | } elsif (-f "$name/sysconfig/prtconf-vp.out") { | ||
601 | 394 | # Sun Explorer output | ||
602 | 395 | $SUNWexplo=1; | ||
603 | 396 | # Special case for regression testing Sun Explorer data | ||
604 | 397 | $os="SunOS"; | ||
605 | 398 | open(FILE, "<$name/sysconfig/prtconf-vp.out"); | ||
606 | 399 | @config=<FILE>; | ||
607 | 400 | close(FILE); | ||
608 | 401 | if (-f "$name/sysconfig/prtdiag-v.out") { | ||
609 | 402 | open(FILE, "<$name/sysconfig/prtdiag-v.out"); | ||
610 | 403 | @prtdiag=<FILE>; | ||
611 | 404 | $have_prtdiag_data=1; | ||
612 | 405 | $prtdiag_cmd="/usr/platform/$platform/sbin/prtdiag"; | ||
613 | 406 | $prtdiag_exec="$prtdiag_cmd"; | ||
614 | 407 | close(FILE); | ||
615 | 408 | } | ||
616 | 409 | if (-f "$name/fru/prtfru_-x.out") { | ||
617 | 410 | open(FILE, "<$name/fru/prtfru_-x.out"); | ||
618 | 411 | @prtfru=<FILE>; | ||
619 | 412 | $have_prtfru_data=1; | ||
620 | 413 | $prtfru_cmd='/usr/sbin/prtfru'; | ||
621 | 414 | close(FILE); | ||
622 | 415 | } | ||
623 | 416 | if (-f "$name/sysconfig/prtpicl-v.out") { | ||
624 | 417 | open(FILE, "<$name/sysconfig/prtpicl-v.out"); | ||
625 | 418 | @prtpicl=<FILE>; | ||
626 | 419 | $have_prtpicl_data=1; | ||
627 | 420 | $prtpicl_cmd='/usr/sbin/prtpicl'; | ||
628 | 421 | close(FILE); | ||
629 | 422 | } | ||
630 | 423 | if (-f "$name/sysconfig/psrinfo-v.out") { | ||
631 | 424 | open(FILE, "<$name/sysconfig/psrinfo-v.out"); | ||
632 | 425 | @psrinfo=<FILE>; | ||
633 | 426 | $have_psrinfo_data=1; | ||
634 | 427 | $psrinfo_cmd='/usr/sbin/psrinfo'; | ||
635 | 428 | close(FILE); | ||
636 | 429 | } | ||
637 | 430 | # Sun Explorer does not include "psrinfo -p" or | ||
638 | 431 | # "psrinfo -p -v" data yet. | ||
639 | 432 | if (-f "$name/sysconfig/cfgadm-alv.out") { | ||
640 | 433 | open(FILE, "<$name/sysconfig/cfgadm-alv.out"); | ||
641 | 434 | @cfgadm=<FILE>; | ||
642 | 435 | $have_cfgadm_data=1; | ||
643 | 436 | $cfgadm_cmd='/usr/sbin/cfgadm'; | ||
644 | 437 | close(FILE); | ||
645 | 438 | } | ||
646 | 439 | if (-f "$name/sysconfig/uname-a.out") { | ||
647 | 440 | open(FILE, "<$name/sysconfig/uname-a.out"); | ||
648 | 441 | $uname=&mychomp(<FILE>); | ||
649 | 442 | close(FILE); | ||
650 | 443 | @unamearr=split(/\s/, $uname); | ||
651 | 444 | $hostname=$unamearr[1]; | ||
652 | 445 | $machine=$unamearr[4]; | ||
653 | 446 | $osrel=$unamearr[2]; | ||
654 | 447 | $platform=$unamearr[6]; | ||
655 | 448 | $prtdiag_cmd="/usr/platform/$platform/sbin/prtdiag"; | ||
656 | 449 | $prtdiag_exec="$prtdiag_cmd"; | ||
657 | 450 | } else { | ||
658 | 451 | if ($config[0] =~ /System Configuration:/) { | ||
659 | 452 | @machinearr=split(/\s+/, $config[0]); | ||
660 | 453 | $machine=$machinearr[4]; | ||
661 | 454 | } | ||
662 | 455 | $osrel=""; | ||
663 | 456 | $hostname=""; | ||
664 | 457 | } | ||
665 | 458 | if (-f "$name/sysconfig/prtconf-V.out") { | ||
666 | 459 | open(FILE, "<$name/sysconfig/prtconf-V.out"); | ||
667 | 460 | $romver=&mychomp(<FILE>); | ||
668 | 461 | close(FILE); | ||
669 | 462 | } | ||
670 | 463 | $filename="$name"; | ||
671 | 464 | } elsif (-f $name) { | ||
672 | 465 | # Regression test file with prtconf/dmidecode output | ||
673 | 466 | open(FILE, "<$name"); | ||
674 | 467 | @config=<FILE>; | ||
675 | 468 | close(FILE); | ||
676 | 469 | # Regression test file may also have prtdiag, etc. | ||
677 | 470 | @prtdiag=@config; | ||
678 | 471 | @prtfru=@config; | ||
679 | 472 | $have_prtfru_data=1; | ||
680 | 473 | @prtpicl=@config; | ||
681 | 474 | $have_prtpicl_data=1; | ||
682 | 475 | @psrinfo=@config; | ||
683 | 476 | $have_psrinfo_data=1; | ||
684 | 477 | @cfgadm=@config; | ||
685 | 478 | $have_cfgadm_data=1; | ||
686 | 479 | @ipmitool=@config; | ||
687 | 480 | $have_ipmitool_data=1; | ||
688 | 481 | @ldm=@config; | ||
689 | 482 | $have_ldm_data=1; | ||
690 | 483 | @free=@config; | ||
691 | 484 | $have_free_data=1; | ||
692 | 485 | @smbios=@config; | ||
693 | 486 | $have_smbios_data=1; | ||
694 | 487 | @machinfo=@config; | ||
695 | 488 | $hostname=""; | ||
696 | 489 | $osrel=""; | ||
697 | 490 | for ($val=0; $val < 10; $val++) { | ||
698 | 491 | if ($config[$val]) { | ||
699 | 492 | if ($config[$val] =~ /System Configuration:/) { | ||
700 | 493 | # Special case for regression testing SunOS prtconf files | ||
701 | 494 | $os="SunOS"; | ||
702 | 495 | @machinearr=split(/\s+/, $config[$val]); | ||
703 | 496 | $machine=$machinearr[4]; | ||
704 | 497 | $machine="" if (! defined($machine)); | ||
705 | 498 | last; | ||
706 | 499 | } elsif ($config[$val] =~ / dmidecode / || $config[$val] =~ /DMI .* present/) { | ||
707 | 500 | # Special case for regression testing Linux dmidecode files | ||
708 | 501 | $os="Linux"; | ||
709 | 502 | $LnxDMI=1; | ||
710 | 503 | if ($config[$val] =~ / dmidecode /) { | ||
711 | 504 | $dmidecode_ver=&mychomp($config[$val]); | ||
712 | 505 | $dmidecode_ver=~s/.* dmidecode //; | ||
713 | 506 | } | ||
714 | 507 | $machine=""; | ||
715 | 508 | $platform=""; | ||
716 | 509 | last; | ||
717 | 510 | } | ||
718 | 511 | } | ||
719 | 512 | } | ||
720 | 513 | # Special case for regression testing SunOS4 files | ||
721 | 514 | if ($name =~ /devinfo\./) { | ||
722 | 515 | $os="SunOS"; | ||
723 | 516 | $BSD=1; | ||
724 | 517 | } | ||
725 | 518 | # Special case for regression testing Linux SPARC files | ||
726 | 519 | $os="Linux" if ($name =~ /prtconf\.Linux/); | ||
727 | 520 | $filename="$name"; | ||
728 | 521 | } else { | ||
729 | 522 | &show_help; | ||
730 | 523 | } | ||
731 | 524 | } | ||
732 | 525 | &linux_dmi if ($LnxDMI); | ||
733 | 526 | if ($filename eq "") { | ||
734 | 527 | if ("$os" eq "HP-UX") { | ||
735 | 528 | $HPUX=1; | ||
736 | 529 | if (-x '/usr/sbin/cstm') { | ||
737 | 530 | &hpux_cstm; | ||
738 | 531 | } else { | ||
739 | 532 | &show_header; | ||
740 | 533 | &show_supported; | ||
741 | 534 | } | ||
742 | 535 | } elsif ("$os" eq "Linux") { | ||
743 | 536 | &linux_release if ("$release" eq ""); | ||
744 | 537 | &find_helpers; | ||
745 | 538 | &linux_dmi if ($config_cmd =~ /dmidecode/); | ||
746 | 539 | if ("$machine" =~ /.86/ || ! -e '/dev/openprom') { | ||
747 | 540 | &show_header; | ||
748 | 541 | &show_supported; | ||
749 | 542 | } | ||
750 | 543 | } elsif ("$os" ne "SunOS") { | ||
751 | 544 | &show_header; | ||
752 | 545 | &show_supported; | ||
753 | 546 | } | ||
754 | 547 | if (-f '/vmunix') { | ||
755 | 548 | # SunOS 4.X (Solaris 1.X) | ||
756 | 549 | $BSD=1; | ||
757 | 550 | if (! -x '/usr/etc/devinfo') { | ||
758 | 551 | print "ERROR: no 'devinfo' command. Aborting.\n"; | ||
759 | 552 | exit 1; | ||
760 | 553 | } | ||
761 | 554 | $config_cmd="/usr/etc/devinfo -pv"; | ||
762 | 555 | $config_command="devinfo"; | ||
763 | 556 | } else { | ||
764 | 557 | # Solaris 2.X or later | ||
765 | 558 | $BSD=0; | ||
766 | 559 | if (! -x '/usr/sbin/prtconf') { | ||
767 | 560 | print "ERROR: no 'prtconf' command. Aborting.\n"; | ||
768 | 561 | exit 1; | ||
769 | 562 | } | ||
770 | 563 | $config_cmd="/usr/sbin/prtconf -vp"; | ||
771 | 564 | $config_command="prtconf"; | ||
772 | 565 | } | ||
773 | 566 | } | ||
774 | 567 | $kernbit=""; | ||
775 | 568 | $hasprtconfV=0; | ||
776 | 569 | $solaris=""; | ||
777 | 570 | $solaris="1.0" if ($osrel eq "4.1.1"); | ||
778 | 571 | $solaris="1.0.1" if ($osrel eq "4.1.2"); | ||
779 | 572 | $solaris="1.1" if ($osrel =~ /4.1.3/); | ||
780 | 573 | $solaris="1.1.1" if ($osrel eq "4.1.3_U1"); | ||
781 | 574 | $solaris="1.1.2" if ($osrel eq "4.1.4"); | ||
782 | 575 | if ($osrel =~ /^5./) { | ||
783 | 576 | $osminor=$osrel; | ||
784 | 577 | $osminor=~s/5.//; | ||
785 | 578 | if ($SUNWexplo) { | ||
786 | 579 | if (-f "$filename/etc/release") { | ||
787 | 580 | open(FILE, "<$filename/etc/release"); | ||
788 | 581 | $release=<FILE>; | ||
789 | 582 | close(FILE); | ||
790 | 583 | } | ||
791 | 584 | } else { | ||
792 | 585 | if (-f '/etc/release') { | ||
793 | 586 | open(FILE, "</etc/release"); | ||
794 | 587 | $release=<FILE>; | ||
795 | 588 | close(FILE); | ||
796 | 589 | } | ||
797 | 590 | } | ||
798 | 591 | if ($release =~ "Solaris") { | ||
799 | 592 | $release=~s/\s+//; | ||
800 | 593 | $release=&mychomp($release); | ||
801 | 594 | $solaris="$release"; | ||
802 | 595 | } | ||
803 | 596 | if ($osminor =~ /[7-9]|1[0-9]/) { | ||
804 | 597 | $hasprtconfV=1; | ||
805 | 598 | $solaris=$osminor if ($solaris eq ""); | ||
806 | 599 | $kernbit=32; | ||
807 | 600 | if ($SUNWexplo) { | ||
808 | 601 | $cpuarch=""; | ||
809 | 602 | if (-f "$filename/sysconfig/isainfo.out") { | ||
810 | 603 | open(FILE, "<$filename/sysconfig/isainfo.out"); | ||
811 | 604 | $cpuarch=<FILE>; | ||
812 | 605 | close(FILE); | ||
813 | 606 | } elsif (-f "$filename/sysconfig/isainfo-kv.out") { | ||
814 | 607 | open(FILE, "<$filename/sysconfig/isainfo-kv.out"); | ||
815 | 608 | $cpuarch=<FILE>; | ||
816 | 609 | close(FILE); | ||
817 | 610 | } | ||
818 | 611 | $kernbit=64 if ($cpuarch =~ /sparcv9/ || $cpuarch =~ /amd64/); | ||
819 | 612 | } elsif (-x '/bin/isainfo') { | ||
820 | 613 | $kernbit=&mychomp(`/bin/isainfo -b`); | ||
821 | 614 | } | ||
822 | 615 | } elsif ($osminor =~ /[4-6]/) { | ||
823 | 616 | $hasprtconfV=1; | ||
824 | 617 | $solaris="2.$osminor" if ($solaris eq ""); | ||
825 | 618 | } else { | ||
826 | 619 | $solaris="2.$osminor"; | ||
827 | 620 | } | ||
828 | 621 | if ("$machine" eq "i86pc" && $osminor =~ /[0-5]/) { | ||
829 | 622 | # x86 Solaris 2.5.1 and earlier has different syntax than SPARC | ||
830 | 623 | $hasprtconfV=0; | ||
831 | 624 | $config_cmd="/usr/sbin/prtconf -v"; | ||
832 | 625 | } | ||
833 | 626 | } | ||
834 | 627 | if ($filename eq "") { | ||
835 | 628 | @config=&run("$config_cmd"); | ||
836 | 629 | if ($hasprtconfV) { | ||
837 | 630 | # Solaris 2.4 or later | ||
838 | 631 | $romver=&mychomp(`/usr/sbin/prtconf -V 2>&1`); | ||
839 | 632 | if ($romver eq "Cannot open openprom device") { | ||
840 | 633 | $prtconf_warn="ERROR: $romver"; | ||
841 | 634 | $romver=""; | ||
842 | 635 | } else { | ||
843 | 636 | @romverarr=split(/\s/, $romver); | ||
844 | 637 | $romvernum=$romverarr[1]; | ||
845 | 638 | } | ||
846 | 639 | } else { | ||
847 | 640 | # Solaris 2.3 or older | ||
848 | 641 | # Try to use sysinfo if installed to determine the OBP version. | ||
849 | 642 | # sysinfo is available from http://www.MagniComp.com/sysinfo/ | ||
850 | 643 | close(STDERR); | ||
851 | 644 | $romver=`sysinfo -show romver 2>/dev/null | tail -1`; | ||
852 | 645 | open(STDERR); | ||
853 | 646 | if ($romver eq "") { | ||
854 | 647 | # Assume it is old | ||
855 | 648 | $romver="2.X" if ($machine =~ /sun4/); | ||
856 | 649 | } else { | ||
857 | 650 | $romver=&mychomp($romver); | ||
858 | 651 | @romverarr=split(/\s/, $romver); | ||
859 | 652 | $romver=$romverarr[$#romverarr]; | ||
860 | 653 | } | ||
861 | 654 | $romvernum=$romver; | ||
862 | 655 | } | ||
863 | 656 | } | ||
864 | 657 | |||
865 | 658 | sub please_wait { | ||
866 | 659 | return if ($waitshown); | ||
867 | 660 | $waitshown=1; | ||
868 | 661 | print "Gathering data for memconf. This may take over a minute. Please wait...\n"; | ||
869 | 662 | } | ||
870 | 663 | |||
871 | 664 | sub find_helpers { | ||
872 | 665 | return if ($helpers_defined); | ||
873 | 666 | $helpers_defined=1; | ||
874 | 667 | if ("$os" eq "HP-UX") { | ||
875 | 668 | $config_cmd="echo 'selclass qualifier cpu;info;wait;selclass qualifier memory;info;wait;infolog'|/usr/sbin/cstm"; | ||
876 | 669 | } elsif ("$os" eq "Linux") { | ||
877 | 670 | if (defined($ENV{DMIDECODE}) && -x $ENV{DMIDECODE}) { | ||
878 | 671 | # this may be a setuid-root version of dmidecode | ||
879 | 672 | $config_cmd=$ENV{DMIDECODE}; | ||
880 | 673 | } else { | ||
881 | 674 | foreach $bin ('/usr/local/sbin','/usr/local/bin','/usr/sbin','/usr/bin','/bin') { | ||
882 | 675 | if (-x "$bin/dmidecode") { | ||
883 | 676 | $config_cmd="$bin/dmidecode"; | ||
884 | 677 | last; | ||
885 | 678 | } | ||
886 | 679 | } | ||
887 | 680 | } | ||
888 | 681 | } elsif (-x '/usr/sbin/prtconf') { | ||
889 | 682 | # Solaris 2.X or later | ||
890 | 683 | $config_cmd="/usr/sbin/prtconf -vp"; | ||
891 | 684 | $prtfru_cmd='/usr/sbin/prtfru' if (-x '/usr/sbin/prtfru'); | ||
892 | 685 | $prtpicl_cmd='/usr/sbin/prtpicl' if (-x '/usr/sbin/prtpicl'); | ||
893 | 686 | $psrinfo_cmd='/usr/sbin/psrinfo' if (-x '/usr/sbin/psrinfo'); | ||
894 | 687 | $cfgadm_cmd='/usr/sbin/cfgadm' if (-x '/usr/sbin/cfgadm'); | ||
895 | 688 | $smbios_cmd='/usr/sbin/smbios' if (-x '/usr/sbin/smbios'); | ||
896 | 689 | $ldm_cmd='/opt/SUNWldm/bin/ldm' if (-x '/opt/SUNWldm/bin/ldm'); | ||
897 | 690 | } | ||
898 | 691 | if ("$os" eq "Linux") { | ||
899 | 692 | $free_cmd='/usr/bin/free -m'; | ||
900 | 693 | } | ||
901 | 694 | if ("$os" eq "SunOS" || "$os" eq "Linux") { | ||
902 | 695 | if (defined($ENV{IPMITOOL}) && -x $ENV{IPMITOOL}) { | ||
903 | 696 | # this may be a setuid-root version of ipmitool | ||
904 | 697 | $ipmitool_cmd=$ENV{IPMITOOL}; | ||
905 | 698 | } else { | ||
906 | 699 | foreach $bin ('/usr/sfw/bin','/usr/local/sbin','/usr/local/bin','/usr/sbin','/usr/bin','/bin') { | ||
907 | 700 | if (-x "$bin/ipmitool") { | ||
908 | 701 | $ipmitool_cmd="$bin/ipmitool"; | ||
909 | 702 | last; | ||
910 | 703 | } | ||
911 | 704 | } | ||
912 | 705 | } | ||
913 | 706 | } | ||
914 | 707 | } | ||
915 | 708 | |||
916 | 709 | sub show_helpers { | ||
917 | 710 | $s=shift; | ||
918 | 711 | print "$s$config_cmd\n"; | ||
919 | 712 | if ("$os" eq "SunOS") { | ||
920 | 713 | print "$s$prtdiag_cmd -v\n" if ($prtdiag_exec ne ""); | ||
921 | 714 | print "$s$prtfru_cmd -x\n" if ($prtfru_cmd ne ""); | ||
922 | 715 | print "$s$prtpicl_cmd -v\n" if ($prtpicl_cmd ne ""); | ||
923 | 716 | if ($psrinfo_cmd ne "") { | ||
924 | 717 | print "$s$psrinfo_cmd -v\n"; | ||
925 | 718 | $tmp=&mychomp(`$psrinfo_cmd -p 2>/dev/null`); | ||
926 | 719 | if ($tmp ne "") { | ||
927 | 720 | print "$s$psrinfo_cmd -p\n"; | ||
928 | 721 | print "$s$psrinfo_cmd -p -v\n"; | ||
929 | 722 | } | ||
930 | 723 | } | ||
931 | 724 | print "$s$cfgadm_cmd -al\n" if ($cfgadm_cmd ne ""); | ||
932 | 725 | print "$s$smbios_cmd\n" if ($smbios_cmd ne ""); | ||
933 | 726 | print "$s$ldm_cmd list-devices -a -p\n" if ($ldm_cmd ne ""); | ||
934 | 727 | } | ||
935 | 728 | if ("$os" eq "Linux") { | ||
936 | 729 | print "$s$free_cmd\n" if ($free_cmd ne ""); | ||
937 | 730 | } | ||
938 | 731 | if ("$os" eq "SunOS" || "$os" eq "Linux") { | ||
939 | 732 | print "$s$ipmitool_cmd fru\n" if ($ipmitool_cmd ne ""); | ||
940 | 733 | } | ||
941 | 734 | if ("$os" eq "HP-UX") { | ||
942 | 735 | print "$s/usr/contrib/bin/machinfo\n" if (-x '/usr/contrib/bin/machinfo'); | ||
943 | 736 | } | ||
944 | 737 | } | ||
945 | 738 | |||
946 | 739 | sub show_help { | ||
947 | 740 | &find_helpers; | ||
948 | 741 | $config_cmd="dmidecode" if ("$os" eq "Linux" && $config_cmd =~ /prtconf/); | ||
949 | 742 | print "Usage: memconf [ -v | -D | -h ] [explorer_dir]\n"; | ||
950 | 743 | print " -v verbose mode\n"; | ||
951 | 744 | print " -D E-mail results to memconf maintainer\n"; | ||
952 | 745 | print " -h print help\n"; | ||
953 | 746 | print " explorer_dir Sun Explorer output directory\n"; | ||
954 | 747 | print "\nThis is memconf, $version $version_date\n\nCheck my website "; | ||
955 | 748 | print "at $URL to get the latest\nversion of memconf.\n\n"; | ||
956 | 749 | &show_supported if ("$os" ne "SunOS" && "$os" ne "HP-UX" && "$os" ne "Linux"); | ||
957 | 750 | print "Please send bug reports and enhancement requests along with "; | ||
958 | 751 | print "the output of the\nfollowing commands to tschmidt\@micron.com "; | ||
959 | 752 | print "as E-mail attachments so that memconf\nmay be enhanced. "; | ||
960 | 753 | print "You can do this using the 'memconf -D' command if this system\n"; | ||
961 | 754 | print "can E-mail to the Internet.\n"; | ||
962 | 755 | &show_helpers(" "); | ||
963 | 756 | exit; | ||
964 | 757 | } | ||
965 | 758 | |||
966 | 759 | sub cpubanner { | ||
967 | 760 | print &runtime . "in cpubanner, corecnt=$corecnt, npcpu=$npcpu, nvcpu=$nvcpu, cputype=$cputype\n" if ($DEBUG); | ||
968 | 761 | if ($modelmore =~ /(Solaris x86 machine)/ && $cpubanner eq "" && $cputype ne "x86") { | ||
969 | 762 | $modelmore=""; | ||
970 | 763 | while (($cf,$cnt)=each(%cpucnt)) { | ||
971 | 764 | $cf=~/^(.*) (\d+)$/; | ||
972 | 765 | $cputype=$1; | ||
973 | 766 | $cpufreq=$2; | ||
974 | 767 | } | ||
975 | 768 | &x86multicorecnt($cputype); | ||
976 | 769 | $ncpu=$cpucnt{"$cputype $cpufreq"}; | ||
977 | 770 | if ($cpucntflag == 0 && $npcpu == 0) { | ||
978 | 771 | for $tmp (2,3,4,6,8,12) { | ||
979 | 772 | $ncpu /= $tmp if ($corecnt == $tmp && $ncpu % $tmp == 0); | ||
980 | 773 | } | ||
981 | 774 | } | ||
982 | 775 | $ncpu=$npcpu if ($npcpu != 0); | ||
983 | 776 | $cpubanner .= "$ncpu X " if ($ncpu > 1); | ||
984 | 777 | $cpubanner .= "Dual Core " if ($corecnt == 2 && $cputype !~ /Dual.Core/i); | ||
985 | 778 | $cpubanner .= "Triple Core " if ($corecnt == 3 && $cputype !~ /Triple.Core/i); | ||
986 | 779 | $cpubanner .= "Quad Core " if ($corecnt == 4 && $cputype !~ /Quad.Core/i); | ||
987 | 780 | $cpubanner .= "Hex Core " if ($corecnt == 6 && $cputype !~ /Hex.Core/i); | ||
988 | 781 | $cpubanner .= "Octal Core " if ($corecnt == 8 && $cputype !~ /Octal.Core/i); | ||
989 | 782 | $cpubanner .= "Twelve Core " if ($corecnt == 12 && $cputype !~ /Twelve.Core/i); | ||
990 | 783 | $cpubanner .= "hyperthreaded " if ($hyperthread); | ||
991 | 784 | $cpubanner .= "$cputype"; | ||
992 | 785 | $cpubanner .= " x86" if ($cputype eq "AMD"); | ||
993 | 786 | $cpubanner .= " ${cpufreq}MHz" if ($cpufreq ne "" && $cpufreq ne "0" && $cputype !~ /Hz$/); | ||
994 | 787 | $cpubanner=~s/-Core/ Core/; | ||
995 | 788 | } | ||
996 | 789 | } | ||
997 | 790 | |||
998 | 791 | sub show_header { | ||
999 | 792 | return if ($header_shown); | ||
1000 | 793 | print &runtime . "cpucntfrom=$cpucntfrom\n" if ($DEBUG); | ||
1001 | 794 | &cpubanner; | ||
1002 | 795 | $header_shown=1; | ||
1003 | 796 | undef %saw; | ||
1004 | 797 | @saw{@simmsizesfound}=(); | ||
1005 | 798 | @simmsizesfound=sort numerically keys %saw; | ||
1006 | 799 | print "memconf: $version $version_date $URL\n" if ($verbose); | ||
1007 | 800 | print "hostname: $hostname\n" if ($hostname); | ||
1008 | 801 | if ($filename) { | ||
1009 | 802 | if ($SUNWexplo) { | ||
1010 | 803 | print "Sun Explorer directory: $filename\n"; | ||
1011 | 804 | } else { | ||
1012 | 805 | print "filename: $filename\n"; | ||
1013 | 806 | } | ||
1014 | 807 | } | ||
1015 | 808 | if ($diagthreadcnt && $cpucntfrom eq "prtdiag") { | ||
1016 | 809 | # Replace @cpucnt with @diagcpucnt | ||
1017 | 810 | while (($cf,$tmp)=each(%cpucnt)) { | ||
1018 | 811 | delete $cpucnt{"$cf"}; | ||
1019 | 812 | $cpucnt{"$cf"}=$diagcpucnt{"$cf"}; | ||
1020 | 813 | } | ||
1021 | 814 | } | ||
1022 | 815 | if ($banner) { | ||
1023 | 816 | # See if banner includes CPU information | ||
1024 | 817 | if ($banner !~ /\(.*SPARC/ && $banner !~ /MHz/) { | ||
1025 | 818 | @cputypecnt=keys(%cpucnt); | ||
1026 | 819 | $x=0; | ||
1027 | 820 | while (($cf,$cnt)=each(%cpucnt)) { | ||
1028 | 821 | $x++; | ||
1029 | 822 | $cf=~/^(.*) (\d*)$/; | ||
1030 | 823 | $ctype=$1; | ||
1031 | 824 | $cfreq=$2; | ||
1032 | 825 | &multicore_cpu_cnt(""); | ||
1033 | 826 | $cpubanner .= "$cnt X " if ($cnt > 1); | ||
1034 | 827 | if ($ctype =~ /390Z5/) { | ||
1035 | 828 | $cpubanner .= "SuperSPARC"; | ||
1036 | 829 | $cpubanner .= "-II" if ($cfreq > 70); | ||
1037 | 830 | } elsif ($ctype =~ /MB86907/) { | ||
1038 | 831 | $cpubanner .= "TurboSPARC-II"; | ||
1039 | 832 | } elsif ($ctype =~ /MB86904/ || $ctype =~ /390S10/) { | ||
1040 | 833 | $cpubanner .= "microSPARC"; | ||
1041 | 834 | $cpubanner .= "-II" if ($cfreq > 70); | ||
1042 | 835 | } elsif ($ctype =~ /L2A0925/) { | ||
1043 | 836 | $cpubanner .= "microSPARC-IIep"; | ||
1044 | 837 | } elsif ($ctype =~ /,RT62[56]/) { | ||
1045 | 838 | $cpubanner .= "hyperSPARC"; | ||
1046 | 839 | } else { | ||
1047 | 840 | $cpubanner .= "$ctype"; | ||
1048 | 841 | } | ||
1049 | 842 | $cpubanner .= " ${cfreq}MHz" if ($cfreq ne "" && $cpubanner !~ /Hz$/); | ||
1050 | 843 | $cpubanner .= ", " if ($x < scalar(@cputypecnt)); | ||
1051 | 844 | } | ||
1052 | 845 | } elsif ($banner =~ /\(/ && $banner !~ /MHz/) { | ||
1053 | 846 | # CPU listed without speed | ||
1054 | 847 | while (($cf,$cnt)=each(%cpucnt)) { | ||
1055 | 848 | $cf=~/^(.*) (\d*)$/; | ||
1056 | 849 | $cfreq=$2; | ||
1057 | 850 | $banner=~s/\)/ ${cfreq}MHz\)/g if ($cfreq); | ||
1058 | 851 | } | ||
1059 | 852 | } | ||
1060 | 853 | } | ||
1061 | 854 | $modelmore="" if ($modelmore =~ /(Solaris x86 machine)/ && $model ne "i86pc"); | ||
1062 | 855 | if ($verbose) { | ||
1063 | 856 | if ($banner) { | ||
1064 | 857 | print "banner: $banner"; | ||
1065 | 858 | print " $bannermore" if ($bannermore); | ||
1066 | 859 | print " ($cpubanner)" if ($cpubanner); | ||
1067 | 860 | print "\n"; | ||
1068 | 861 | } | ||
1069 | 862 | print "manufacturer: $manufacturer\n" if ($manufacturer); | ||
1070 | 863 | if ($model) { | ||
1071 | 864 | print "model: $model"; | ||
1072 | 865 | print " $modelmore" if ($modelmore); | ||
1073 | 866 | print " $realmodel" if ($realmodel); | ||
1074 | 867 | print " ($cpubanner)" if ($cpubanner ne "" && $banner eq ""); | ||
1075 | 868 | print "\n"; | ||
1076 | 869 | } | ||
1077 | 870 | print "Sun development codename: $devname\n" if ($devname ne "" && ! $clone); | ||
1078 | 871 | print "Sun Family Part Number: $familypn\n" if ($familypn ne "" && ! $clone); | ||
1079 | 872 | if ($filename eq "" || $SUNWexplo) { | ||
1080 | 873 | if ($solaris) { | ||
1081 | 874 | print "Solaris " if ($solaris !~ /Solaris/); | ||
1082 | 875 | print "$solaris, "; | ||
1083 | 876 | print "${kernbit}-bit kernel, " if ($kernbit); | ||
1084 | 877 | } | ||
1085 | 878 | if ("$os" eq "Linux" && "$release" ne "") { | ||
1086 | 879 | print "$release\n"; | ||
1087 | 880 | } else { | ||
1088 | 881 | print "$os $osrel"; | ||
1089 | 882 | print " ($osrelease)" if ($osrelease ne ""); | ||
1090 | 883 | print ", ${kernbit}" if ($kernbit && $HPUX); | ||
1091 | 884 | print "\n"; | ||
1092 | 885 | } | ||
1093 | 886 | } elsif ($HPUX) { | ||
1094 | 887 | print "$os"; | ||
1095 | 888 | print " $osrel" if ($osrel ne ""); | ||
1096 | 889 | print " ($osrelease)" if ($osrelease ne ""); | ||
1097 | 890 | print ", ${kernbit}" if ($kernbit); | ||
1098 | 891 | print "\n"; | ||
1099 | 892 | } elsif ("$os" eq "Linux") { | ||
1100 | 893 | if ("$release" ne "") { | ||
1101 | 894 | print "$release\n"; | ||
1102 | 895 | } elsif ($LnxDMI) { | ||
1103 | 896 | print "Linux x86\n"; | ||
1104 | 897 | } elsif (-e '/dev/openprom' || $filename =~ /prtconf\.Linux/) { | ||
1105 | 898 | print "Linux SPARC\n"; | ||
1106 | 899 | } | ||
1107 | 900 | } elsif ($BSD) { | ||
1108 | 901 | print "Solaris 1.X, SunOS 4.X\n"; | ||
1109 | 902 | } else { | ||
1110 | 903 | print "Solaris 2.X, SunOS 5.X\n"; | ||
1111 | 904 | } | ||
1112 | 905 | $ncpu=1 if ($ncpu == 0); # Assume it has at least 1 CPU | ||
1113 | 906 | if ($cpuarr == -1) { | ||
1114 | 907 | @cputypecnt=keys(%cpucnt); | ||
1115 | 908 | $x=0; | ||
1116 | 909 | while (($cf,$cnt)=each(%cpucnt)) { | ||
1117 | 910 | if ($cpucntflag == 0 && $npcpu == 0 && $cpucntfrom ne "prtdiag") { | ||
1118 | 911 | for $tmp (2,3,4,6,8,12) { | ||
1119 | 912 | $cnt /= $tmp if ($corecnt == $tmp && $cnt % $tmp == 0); | ||
1120 | 913 | } | ||
1121 | 914 | $cpucntflag=1; | ||
1122 | 915 | } | ||
1123 | 916 | if ($npcpu != 0) { | ||
1124 | 917 | $cnt=$npcpu; | ||
1125 | 918 | } else { | ||
1126 | 919 | $cnt=$ndcpu if ($ndcpu != 0); | ||
1127 | 920 | } | ||
1128 | 921 | $x++; | ||
1129 | 922 | $cf=~/^(.*) (\d*)$/; | ||
1130 | 923 | $ctype=$1; | ||
1131 | 924 | $ctype=$cf if (! $ctype); | ||
1132 | 925 | $cfreq=$2; | ||
1133 | 926 | &checkX86; | ||
1134 | 927 | if ($isX86) { | ||
1135 | 928 | $ctype="hyperthreaded $ctype" if ($hyperthread); | ||
1136 | 929 | $ctype="Dual Core $ctype" if ($corecnt == 2 && $ctype !~ /Dual.Core/i); | ||
1137 | 930 | $ctype="Triple Core $ctype" if ($corecnt == 3 && $ctype !~ /Triple.Core/i); | ||
1138 | 931 | $ctype="Quad Core $ctype" if ($corecnt == 4 && $ctype !~ /Quad.Core/i); | ||
1139 | 932 | $ctype="Hex Core $ctype" if ($corecnt == 6 && $ctype !~ /Hex.Core/i); | ||
1140 | 933 | $ctype="Octal Core $ctype" if ($corecnt == 8 && $ctype !~ /Octal.Core/i); | ||
1141 | 934 | $ctype="Twelve Core $ctype" if ($corecnt == 12 && $ctype !~ /Twelve.Core/i); | ||
1142 | 935 | $ctype=~s/-Core/ Core/; | ||
1143 | 936 | } | ||
1144 | 937 | &multicore_cpu_cnt(""); | ||
1145 | 938 | print "$cnt $ctype"; | ||
1146 | 939 | if ($cfreq) { | ||
1147 | 940 | print " ${cfreq}MHz" if ($cfreq > 0 && $ctype !~ /Hz$/); | ||
1148 | 941 | } | ||
1149 | 942 | print " cpu"; | ||
1150 | 943 | print "s" if ($cnt > 1); | ||
1151 | 944 | print ", " if ($x < scalar(@cputypecnt)); | ||
1152 | 945 | } | ||
1153 | 946 | if ($x > 0) { | ||
1154 | 947 | if ($sysfreq) { | ||
1155 | 948 | print ", "; | ||
1156 | 949 | } else { | ||
1157 | 950 | print "\n"; | ||
1158 | 951 | } | ||
1159 | 952 | } | ||
1160 | 953 | } | ||
1161 | 954 | print "system freq: ${sysfreq}MHz\n" if ($sysfreq); | ||
1162 | 955 | } else { | ||
1163 | 956 | $modelbuf=""; | ||
1164 | 957 | if ($manufacturer) { | ||
1165 | 958 | $modelbuf .= "$manufacturer " if ($banner !~ /^$manufacturer/ && $model !~ /^$manufacturer/ && ($banner ne "" || $model ne "")); | ||
1166 | 959 | } | ||
1167 | 960 | if ($banner ne "" && $bannermore ne "") { | ||
1168 | 961 | $modelbuf .= "$banner $bannermore"; | ||
1169 | 962 | } elsif ($modelmore) { | ||
1170 | 963 | $modelbuf .= "$model $modelmore"; | ||
1171 | 964 | } elsif ($banner) { | ||
1172 | 965 | $modelbuf .= "$banner"; | ||
1173 | 966 | } elsif ($diagbanner) { | ||
1174 | 967 | $modelbuf .= "$diagbanner"; | ||
1175 | 968 | } elsif ($model) { | ||
1176 | 969 | $modelbuf .= "$model"; | ||
1177 | 970 | } | ||
1178 | 971 | $modelbuf .= " ($cpubanner)" if ($cpubanner); | ||
1179 | 972 | $modelbuf .= " $realmodel" if ($realmodel); | ||
1180 | 973 | print "$modelbuf\n" if ($modelbuf); | ||
1181 | 974 | } | ||
1182 | 975 | # debug output | ||
1183 | 976 | if ($verbose > 1) { | ||
1184 | 977 | if ($banner) { | ||
1185 | 978 | print "banner = $banner\n"; | ||
1186 | 979 | } else { | ||
1187 | 980 | print "diagbanner = $diagbanner\n" if ($diagbanner); | ||
1188 | 981 | } | ||
1189 | 982 | print "cpubanner = $cpubanner\n" if ($cpubanner); | ||
1190 | 983 | print "bannermore = $bannermore\n" if ($bannermore); | ||
1191 | 984 | print "model = $model\n" if ($model); | ||
1192 | 985 | print "modelmore = $modelmore\n" if ($modelmore); | ||
1193 | 986 | print "machine = $machine\n" if ($machine); | ||
1194 | 987 | print "platform = $platform\n" if ($platform); | ||
1195 | 988 | print "ultra = $ultra\n" if ($ultra); | ||
1196 | 989 | if ($ultra eq "AXi") { | ||
1197 | 990 | print "found10bit = $found10bit\n"; | ||
1198 | 991 | print "found11bit = $found11bit\n"; | ||
1199 | 992 | } | ||
1200 | 993 | print "motherboard = $motherboard\n" if ($motherboard); | ||
1201 | 994 | print "romver = $romver\n" if ($romver); | ||
1202 | 995 | print "freephys = $freephys\n" if ($freephys); | ||
1203 | 996 | print "perl version: " . &mychomp($]) . "\n"; | ||
1204 | 997 | print "memory line: $gotmemory\n" if ($gotmemory); | ||
1205 | 998 | print "module info: $gotmodule\n" if ($gotmodule); | ||
1206 | 999 | print "dmidecode version: $dmidecode_ver\n" if ($dmidecode_ver); | ||
1207 | 1000 | |||
1208 | 1001 | # Fujitsu GP7000F and PrimePower systems | ||
1209 | 1002 | print "cpu name info: $gotcpunames\n" if ($gotcpunames); | ||
1210 | 1003 | print "cpu board info: $gotcpuboards\n" if ($gotcpuboards); | ||
1211 | 1004 | print "module name info: $gotmodulenames\n" if ($gotmodulenames); | ||
1212 | 1005 | |||
1213 | 1006 | print "simmsizes = @simmsizes\n" if ($simmsizes[0] > 0); | ||
1214 | 1007 | print "simmsizesfound = @simmsizesfound\n" if ($simmsizesfound[0]); | ||
1215 | 1008 | } | ||
1216 | 1009 | if (($verbose >= 1) && $boardfound_cpu) { | ||
1217 | 1010 | if ($format_cpu == 1) { | ||
1218 | 1011 | print "CPU Units: Frequency Cache-Size Version\n" if ($model =~ /-Enterprise/ || $ultra eq "e"); | ||
1219 | 1012 | } else { | ||
1220 | 1013 | print "CPU Units:\n" if (! $ldm_memory); | ||
1221 | 1014 | } | ||
1222 | 1015 | if ($model ne "SPARCserver-1000" && $model ne "SPARCcenter-2000") { | ||
1223 | 1016 | print @boards_cpu if (! $ldm_memory); | ||
1224 | 1017 | print "Memory Units:\n"; | ||
1225 | 1018 | } | ||
1226 | 1019 | } | ||
1227 | 1020 | if ($interleave) { | ||
1228 | 1021 | print "Memory Interleave Factor: $interleave"; | ||
1229 | 1022 | print "-way" if ($interleave =~/^\d+$/); | ||
1230 | 1023 | print "\n"; | ||
1231 | 1024 | } | ||
1232 | 1025 | } | ||
1233 | 1026 | |||
1234 | 1027 | sub show_unrecognized { | ||
1235 | 1028 | if ($perlhexbug) { | ||
1236 | 1029 | print " This is most likely because Perl V$PERL_VERSION"; | ||
1237 | 1030 | print " is buggy in hex number\n conversions. Please"; | ||
1238 | 1031 | print " upgrade your perl release to Perl V5.002 or later\n"; | ||
1239 | 1032 | print " for best results.\n"; | ||
1240 | 1033 | } else { | ||
1241 | 1034 | print " This is most likely because memconf $version"; | ||
1242 | 1035 | print " does not completely\n"; | ||
1243 | 1036 | print " recognize this $os $osrel $platform system.\n"; | ||
1244 | 1037 | &show_request if ($untested == 0); | ||
1245 | 1038 | } | ||
1246 | 1039 | } | ||
1247 | 1040 | |||
1248 | 1041 | sub show_untested { | ||
1249 | 1042 | if ($untested_type eq "OS") { | ||
1250 | 1043 | print "WARNING: This is an untested $os $osrel operating"; | ||
1251 | 1044 | } elsif ($untested_type eq "OBP") { | ||
1252 | 1045 | print "ERROR: This is an untested $os $osrel OBP $romvernum"; | ||
1253 | 1046 | } elsif ($untested_type eq "CPU") { | ||
1254 | 1047 | print "ERROR: This is an untested CPU type on this $os $osrel"; | ||
1255 | 1048 | } else { | ||
1256 | 1049 | print "ERROR: This is an untested $os $osrel"; | ||
1257 | 1050 | } | ||
1258 | 1051 | print " system by memconf $version\n"; | ||
1259 | 1052 | print " Please let the author know how it works.\n"; | ||
1260 | 1053 | $exitstatus=1; | ||
1261 | 1054 | &show_request; | ||
1262 | 1055 | } | ||
1263 | 1056 | |||
1264 | 1057 | sub show_request { | ||
1265 | 1058 | print " Check my website at $URL\n"; | ||
1266 | 1059 | print " for a newer version of memconf that may recognize this "; | ||
1267 | 1060 | print "system better.\n"; | ||
1268 | 1061 | print " Please run 'memconf -D' if this system can E-mail to "; | ||
1269 | 1062 | print "the Internet\n or send the output of the following "; | ||
1270 | 1063 | print "commands manually to Tom Schmidt\n (tschmidt\@micron.com)"; | ||
1271 | 1064 | print " so that memconf $version may be enhanced to\n properly "; | ||
1272 | 1065 | print "recognize this system:\n"; | ||
1273 | 1066 | print " memconf -d\n"; | ||
1274 | 1067 | &show_helpers(" "); | ||
1275 | 1068 | if ($untested) { | ||
1276 | 1069 | print " If this system is a Sun clone, "; | ||
1277 | 1070 | print "please also send any hardware\n documentation "; | ||
1278 | 1071 | print "on the memory layout that you may have.\n"; | ||
1279 | 1072 | } | ||
1280 | 1073 | } | ||
1281 | 1074 | |||
1282 | 1075 | sub show_supported { | ||
1283 | 1076 | print "memconf: $version $version_date $URL\n" if (! $verbose); | ||
1284 | 1077 | print "ERROR: memconf $version is not supported on this $os"; | ||
1285 | 1078 | print" $osrel $machine system.\n memconf is supported on:\n"; | ||
1286 | 1079 | print " Solaris (SunOS 4.X or 5.X) on SPARC\n"; | ||
1287 | 1080 | print " Solaris 10 6/06 or later on x86 with /usr/platform/i86pc/sbin/prtdiag\n"; | ||
1288 | 1081 | print " Linux on SPARC with sparc-utils and /dev/openprom\n"; | ||
1289 | 1082 | print " Linux on x86 with kernel-utils or pmtools for /usr/sbin/dmidecode\n"; | ||
1290 | 1083 | print " most HP-UX systems with Support Tools Manager (cstm)\n"; | ||
1291 | 1084 | if ("$os" eq "Linux") { | ||
1292 | 1085 | print "NOTICE: This may be corrected by installing the "; | ||
1293 | 1086 | if ("$machine" =~ /.86/) { | ||
1294 | 1087 | print "kernel-utils or pmtools"; | ||
1295 | 1088 | } else { | ||
1296 | 1089 | print "sparc-utils"; | ||
1297 | 1090 | } | ||
1298 | 1091 | print "\n package if available for this $machine system.\n"; | ||
1299 | 1092 | } | ||
1300 | 1093 | print " memconf may be able to process Sun Explorer data on this"; | ||
1301 | 1094 | print " machine.\n"; | ||
1302 | 1095 | print " Check my website at $URL\n"; | ||
1303 | 1096 | print " for a newer version of memconf that may recognize this "; | ||
1304 | 1097 | print "system better.\n"; | ||
1305 | 1098 | exit 1; | ||
1306 | 1099 | } | ||
1307 | 1100 | |||
1308 | 1101 | sub show_memory { | ||
1309 | 1102 | $mem=shift; | ||
1310 | 1103 | print "${mem}MB"; | ||
1311 | 1104 | print " (", $mem / 1024, "GB)" if ($mem > 1023); | ||
1312 | 1105 | print "\n"; | ||
1313 | 1106 | } | ||
1314 | 1107 | |||
1315 | 1108 | sub show_memory_label { | ||
1316 | 1109 | $mem=shift; | ||
1317 | 1110 | return if (! defined($mem)); | ||
1318 | 1111 | return "$mem" if ($mem =~ /[MG]B/); | ||
1319 | 1112 | return $mem / 1024 . "GB" if ($mem >= 1024); | ||
1320 | 1113 | return "${mem}MB"; | ||
1321 | 1114 | } | ||
1322 | 1115 | |||
1323 | 1116 | sub check_model { | ||
1324 | 1117 | print &runtime . "in check_model, model=$model\n" if ($DEBUG); | ||
1325 | 1118 | &find_helpers; | ||
1326 | 1119 | if ($filename) { | ||
1327 | 1120 | $platform=$model; | ||
1328 | 1121 | $platform="SUNW,Ultra-5_10" if ($diagbanner =~ /Sun Ultra 5\/10/); | ||
1329 | 1122 | $platform="SUNW,Sun-Fire" if ($diagbanner =~ /Sun Fire [346]8[01]0\b/ || $diagbanner =~ /Sun Fire E[246]900\b/); | ||
1330 | 1123 | $platform="SUNW,Sun-Fire-15000" if ($diagbanner =~ /Sun Fire E2[05]K\b/); | ||
1331 | 1124 | $platform=~s/-S$// if ($model =~ /Sun-Blade-[12]500-S\b/); | ||
1332 | 1125 | $prtdiag_cmd="/usr/platform/$platform/sbin/prtdiag" if ($prtdiag_cmd =~ /platform/); | ||
1333 | 1126 | } | ||
1334 | 1127 | $model=~s/.*SUNW,//g; | ||
1335 | 1128 | $model=~s/TWS,//g; | ||
1336 | 1129 | $model=~s/CYCLE,//g; | ||
1337 | 1130 | $model=~s/Tadpole_//g; | ||
1338 | 1131 | $model=~s/ASPX,//g; | ||
1339 | 1132 | $model=~s/PFU,//g; | ||
1340 | 1133 | $model=~s/FJSV,//g; | ||
1341 | 1134 | $model=~s/CompuAdd //g; | ||
1342 | 1135 | $model=~s/RDI,//g; | ||
1343 | 1136 | $model=~s/\s+$//; | ||
1344 | 1137 | $ultra="ultra" if ($ultra eq 0 && ($model =~ /Ultra/ || $model =~ /Blade/ || $model =~ /Fire/)); | ||
1345 | 1138 | if ($model =~ /Fire[- ]X/i || $model =~ /Fire[- ]B[12]00x/i) { | ||
1346 | 1139 | # Sun Fire X??00 Servers, i86pc | ||
1347 | 1140 | # Sun B100x or B200x Blade Servers, i86pc | ||
1348 | 1141 | $ultra=""; | ||
1349 | 1142 | $machine="x86" if ($machine ne "i86pc"); | ||
1350 | 1143 | $untested=1; | ||
1351 | 1144 | &x86_devname; | ||
1352 | 1145 | } | ||
1353 | 1146 | $ultra="sparc64" if ($model =~ /SPARC64/); | ||
1354 | 1147 | $ultra="e" if ($model =~ /-Enterprise/ && $model !~ /SPARC-Enterprise/); | ||
1355 | 1148 | $ultra=1 if ($model =~ /Ultra-1\b/); | ||
1356 | 1149 | $ultra=2 if ($model =~ /Ultra-2\b/); | ||
1357 | 1150 | $ultra=5 if ($model =~ /Ultra-5\b/); | ||
1358 | 1151 | $ultra="5_10" if ($model =~ /Ultra-5_10\b/); | ||
1359 | 1152 | $ultra=30 if ($model =~ /Ultra-30\b/); | ||
1360 | 1153 | $ultra=60 if ($model =~ /Ultra-60\b/); | ||
1361 | 1154 | $ultra=80 if ($model =~ /Ultra-80\b/); | ||
1362 | 1155 | $ultra=250 if ($model =~ /Ultra-250\b/); | ||
1363 | 1156 | $ultra=450 if ($model =~ /Ultra-4\b/); | ||
1364 | 1157 | $ultra="Netra t1" if ($banner =~ /Netra t1\b/); | ||
1365 | 1158 | if ($model =~ /Ultra-4FT\b/) { | ||
1366 | 1159 | $ultra="Netra ft1800"; | ||
1367 | 1160 | $bannermore="(Netra ft1800)"; | ||
1368 | 1161 | $modelmore="(Netra ft1800)"; | ||
1369 | 1162 | } | ||
1370 | 1163 | $ultra="Sun Blade 1000" if ($model =~ /Ultra-100\b/); # prototype | ||
1371 | 1164 | $ultra="Sun Blade 1000" if ($model =~ /Sun-Blade-1000\b/); | ||
1372 | 1165 | $ultra="Sun Blade 2000" if ($model =~ /Sun-Blade-2000\b/); | ||
1373 | 1166 | $ultra="Netra 20" if ($model =~ /Netra-20\b/); | ||
1374 | 1167 | $ultra="Netra 20" if ($model =~ /Netra-T4\b/); | ||
1375 | 1168 | # E2900/E4900 also use Netra-T12 | ||
1376 | 1169 | $ultra="Netra T12" if ($model =~ /Netra-T12\b/ && $ultra !~ /Sun Fire/); | ||
1377 | 1170 | $ultra="Sun Blade 100" if ($model =~ /Grover\b/); # prototype | ||
1378 | 1171 | $ultra="Sun Blade 100" if ($model =~ /Sun-Blade-100\b/); | ||
1379 | 1172 | $ultra="Sun Fire 280R" if ($model =~ /Enterprise-820R\b/); # prototype | ||
1380 | 1173 | $ultra="Sun Fire 280R" if ($model =~ /Sun-Fire-280R\b/); | ||
1381 | 1174 | $ultra="Sun Fire" if ($model =~ /Serengeti\b/); # prototype | ||
1382 | 1175 | $ultra="Sun Fire" if ($model eq "Sun-Fire" || $model =~ /Sun-Fire-[346]8[01]0\b/); | ||
1383 | 1176 | $ultra="Sun Fire V480" if ($model =~ /Sun-Fire-480R\b/); | ||
1384 | 1177 | $ultra="Sun Fire V490" if ($model =~ /Sun-Fire-V490\b/); | ||
1385 | 1178 | $ultra="Sun Fire V880" if ($model =~ /Sun-Fire-880\b/); | ||
1386 | 1179 | $ultra="Sun Fire V890" if ($model =~ /Sun-Fire-V890\b/); | ||
1387 | 1180 | # Sun Fire 12K, E25K, etc. systems identifies itself as Sun Fire 15K | ||
1388 | 1181 | $ultra="Sun Fire 15K" if ($model =~ /Sun-Fire-15000\b/ && $ultra !~ /Sun Fire /); | ||
1389 | 1182 | $ultra="Sun Fire 12K" if ($model =~ /Sun-Fire-12000\b/); | ||
1390 | 1183 | $ultra="Serverblade1" if ($model =~ /Serverblade1\b/); | ||
1391 | 1184 | # UltraSPARC-IIIi (Jalapeno) systems | ||
1392 | 1185 | $ultra="Enchilada" if ($model =~ /Enchilada\b/); # prototype | ||
1393 | 1186 | $ultra="Enchilada" if ($model =~ /Sun-Fire-V210\b/); | ||
1394 | 1187 | $ultra="Enchilada" if ($model =~ /Netra-210\b/); | ||
1395 | 1188 | $ultra="Enchilada" if ($model =~ /Sun-Fire-V240\b/); | ||
1396 | 1189 | $ultra="Enchilada" if ($model =~ /Netra-240\b/); | ||
1397 | 1190 | $ultra="Sun Fire V440" if ($model =~ /Sun-Fire-V440\b/); | ||
1398 | 1191 | $ultra="Netra 440" if ($model =~ /Netra-440\b/); | ||
1399 | 1192 | $ultra="Sun Fire V250" if ($model =~ /Sun-Fire-V250\b/); | ||
1400 | 1193 | $ultra="Sun Blade 1500" if ($model =~ /Sun-Blade-1500\b/); | ||
1401 | 1194 | $ultra="Sun Blade 2500" if ($model =~ /Sun-Blade-2500\b/); | ||
1402 | 1195 | if ($model =~ /Sun-Blade-[12]500-S\b/) { | ||
1403 | 1196 | $model=~s/-S$//; | ||
1404 | 1197 | $modelmore="(Silver)" if ($banner !~ /\(Silver\)/); | ||
1405 | 1198 | } | ||
1406 | 1199 | $ultra="Sun Ultra 45 Workstation" if ($model =~ /Sun-Ultra-45-Workstation\b/ || $model eq "A70"); | ||
1407 | 1200 | $ultra="Sun Ultra 25 Workstation" if ($model =~ /Sun-Ultra-25-Workstation\b/ || $model eq "Ultra-25"); | ||
1408 | 1201 | $ultra="Sun Ultra 45 or Ultra 25 Workstation" if ($model =~ /Sun-Ultra-45-or-Ultra-25-Workstation\b/); | ||
1409 | 1202 | $ultra="Sun Fire V125" if ($model =~ /Sun-Fire-V125\b/); | ||
1410 | 1203 | $ultra="Seattle" if ($model =~ /Sun-Fire-V215\b/); | ||
1411 | 1204 | $ultra="Seattle" if ($model =~ /Sun-Fire-V245\b/); | ||
1412 | 1205 | $ultra="Boston" if ($model =~ /Sun-Fire-V445\b/); | ||
1413 | 1206 | # UltraSPARC-IV (Jaguar) or UltraSPARC-IV+ (Panther) systems | ||
1414 | 1207 | $ultra="Sun Fire E2900" if ($model =~ /Sun-Fire-E2900\b/); | ||
1415 | 1208 | $ultra="Sun Fire E4900" if ($model =~ /Sun-Fire-E4900\b/); | ||
1416 | 1209 | $ultra="Sun Fire E6900" if ($model =~ /Sun-Fire-E6900\b/); | ||
1417 | 1210 | $ultra="Sun Fire E20K" if ($model =~ /Sun-Fire-E20K\b/ || $model =~ /Sun-Fire-Enterprise-20K\b/); | ||
1418 | 1211 | $ultra="Sun Fire E25K" if ($model =~ /Sun-Fire-E25K\b/ || $model =~ /Sun-Fire-Enterprise-25K\b/); | ||
1419 | 1212 | # SPARC64-VI or SPARC64-VII systems | ||
1420 | 1213 | $ultra=$banner if ($banner =~ /SPARC Enterprise M[34589]000 Server/); | ||
1421 | 1214 | # UltraSPARC-T1 (Niagara) systems | ||
1422 | 1215 | if ($model =~ /Sun-Fire-T200\b/) { | ||
1423 | 1216 | $ultra="T2000"; | ||
1424 | 1217 | $modelmore="(Sun Fire T2000)"; | ||
1425 | 1218 | } | ||
1426 | 1219 | $ultra="T2000" if ($model =~ /Sun-Fire-T2000\b/ || $model =~ /SPARC-Enterprise-T2000/ || $banner =~ /SPARC Enterprise T2000/ || $model =~ /Netra-T2000\b/ || $banner =~ /Netra T2000\b/); | ||
1427 | 1220 | $ultra="T1000" if ($model =~ /Sun-Fire-T1000\b/ || $model =~ /SPARC-Enterprise-T1000/ || $banner =~ /SPARC Enterprise T1000/); | ||
1428 | 1221 | $ultra="T6300" if ($model =~ /Sun-Blade-T6300\b/ || $banner =~ /\bT6300\b/); | ||
1429 | 1222 | # UltraSPARC-T2 (Niagara-II) systems | ||
1430 | 1223 | $ultra="T5120" if ($model =~ /SPARC-Enterprise-T5120/ || $banner =~ /\bT5120\b/); | ||
1431 | 1224 | $ultra="T5220" if ($model =~ /SPARC-Enterprise-T5220/ || $model =~ /Netra-T5220/ || $banner =~ /\bT5220\b/); | ||
1432 | 1225 | $ultra="T6320" if ($model =~ /Sun-Blade-T6320\b/ || $banner =~ /\bT6320\b/); | ||
1433 | 1226 | $ultra="T6340" if ($model =~ /Sun-Blade-T6340\b/ || $banner =~ /\bT6340\b/); | ||
1434 | 1227 | # UltraSPARC-T2+ (Victoria Falls) systems | ||
1435 | 1228 | $ultra="T5140" if ($model =~ /SPARC-Enterprise-T5140/ || $banner =~ /\bT5140\b/); | ||
1436 | 1229 | $ultra="T5240" if ($model =~ /SPARC-Enterprise-T5240/ || $banner =~ /\bT5240\b/ || $model =~ /SPARC-USBRDT-5240/); | ||
1437 | 1230 | $ultra="T5440" if ($model =~ /SPARC-Enterprise-T5440/ || $model =~ /Netra-T5440/ || $banner =~ /\bT5440\b/ || $model =~ /SPARC-USBRDT-5440/); | ||
1438 | 1231 | # Older SPARCstations | ||
1439 | 1232 | $modelmore="SPARCstation SLC" if ($model eq "Sun 4/20"); | ||
1440 | 1233 | $modelmore="SPARCstation ELC" if ($model eq "Sun 4/25"); | ||
1441 | 1234 | $modelmore="SPARCstation IPC" if ($model eq "Sun 4/40"); | ||
1442 | 1235 | $modelmore="SPARCstation IPX" if ($model eq "Sun 4/50"); | ||
1443 | 1236 | $modelmore="SPARCstation 1" if ($model eq "Sun 4/60"); | ||
1444 | 1237 | $modelmore="SPARCstation 1+" if ($model eq "Sun 4/65"); | ||
1445 | 1238 | $modelmore="SPARCstation 2" if ($model eq "Sun 4/75"); | ||
1446 | 1239 | $modelmore="(SPARCsystem 600)" if ($model =~ /Sun.4.600/ && $banner !~ /SPARCsystem/); | ||
1447 | 1240 | $modelmore="Sun 4/30" if ($model =~ /SPARCstation-LX/); | ||
1448 | 1241 | $modelmore="Sun 4/15" if ($model =~ /SPARCclassic/); | ||
1449 | 1242 | $modelmore="Sun 4/10" if ($model =~ /SPARCclassic-X/); | ||
1450 | 1243 | $modelmore="(SPARCstation 10SX)" if ($model =~ /Premier-24/); | ||
1451 | 1244 | if ($model eq "S240") { | ||
1452 | 1245 | $manufacturer="Sun Microsystems, Inc."; | ||
1453 | 1246 | $modelmore="SPARCstation Voyager"; | ||
1454 | 1247 | } | ||
1455 | 1248 | # x86 | ||
1456 | 1249 | &checkX86; | ||
1457 | 1250 | if ($isX86) { | ||
1458 | 1251 | $modelmore="(Solaris x86 machine)"; | ||
1459 | 1252 | $cputype="x86"; | ||
1460 | 1253 | $machine=$model; | ||
1461 | 1254 | $ultra=0; | ||
1462 | 1255 | $cpucntfrom="prtconf" if ($cpucntfrom eq ""); | ||
1463 | 1256 | return if ($model_checked); | ||
1464 | 1257 | &check_prtdiag if ($use_psrinfo_data == 2); | ||
1465 | 1258 | &check_psrinfo; | ||
1466 | 1259 | &cpubanner; | ||
1467 | 1260 | $cpucnt{"$cputype $cpufreq"}++; | ||
1468 | 1261 | } | ||
1469 | 1262 | # Clones | ||
1470 | 1263 | if ($banner =~ /\bMP-250[(\b]/) { | ||
1471 | 1264 | $ultra="axus250"; | ||
1472 | 1265 | $bannermore="Ultra-250"; | ||
1473 | 1266 | $modelmore="(Ultra-250)"; | ||
1474 | 1267 | } | ||
1475 | 1268 | $manufacturer="AXUS" if ($ultra =~ /axus/); | ||
1476 | 1269 | $manufacturer="Force Computers" if ($model =~ /SPARC CP/); | ||
1477 | 1270 | if ($model eq "S3GX") { | ||
1478 | 1271 | $bannermore="(SPARCbook 3GX)"; | ||
1479 | 1272 | $modelmore="(SPARCbook 3GX)"; | ||
1480 | 1273 | } | ||
1481 | 1274 | if ($model eq "S3XP") { | ||
1482 | 1275 | $bannermore="(SPARCbook 3XP)"; | ||
1483 | 1276 | $modelmore="(SPARCbook 3XP)"; | ||
1484 | 1277 | } | ||
1485 | 1278 | $manufacturer="Sun Microsystems, Inc." if ($banner !~ /Axil/ && ( | ||
1486 | 1279 | $model =~ /^SPARCstation/ || $model =~ /^SPARCsystem/ || | ||
1487 | 1280 | $model =~ /^SPARCclassic/ || $model =~ /^SPARCserver/ || | ||
1488 | 1281 | $model =~ /^SPARCcenter/ || $model =~ /Enterprise/ || | ||
1489 | 1282 | $model =~ /Premier 24/ || $model =~ /Netra/ || | ||
1490 | 1283 | $model =~ /Sun.Fire/ || $model =~ /Sun.Blade/ || | ||
1491 | 1284 | $model =~ /Serverblade1/)); | ||
1492 | 1285 | if ($model =~ /Auspex/) { | ||
1493 | 1286 | $manufacturer="Auspex"; | ||
1494 | 1287 | $model=~s/Auspex //g; | ||
1495 | 1288 | $bannermore="Netserver"; | ||
1496 | 1289 | $modelmore="Netserver"; | ||
1497 | 1290 | } | ||
1498 | 1291 | $manufacturer="Fujitsu" if ($banner =~ /Fujitsu/); | ||
1499 | 1292 | $manufacturer="Fujitsu Siemens" if ($banner =~ /Fujitsu Siemens/); | ||
1500 | 1293 | $manufacturer="Fujitsu Siemens Computers" if ($banner =~ /Fujitsu Siemens Computers/); | ||
1501 | 1294 | if ($model =~ /S-4/ || $model eq "GP" || $model =~ /^GPU[SZU]/) { | ||
1502 | 1295 | $manufacturer="Fujitsu" if ($manufacturer !~ /^Fujitsu/); | ||
1503 | 1296 | $model=~s,_,/,g; | ||
1504 | 1297 | $untested=1 if ($model =~ /^GPUSC-L/); | ||
1505 | 1298 | $untested=1 if ($model =~ /^GPUU/); | ||
1506 | 1299 | } | ||
1507 | 1300 | if ($model =~ /PowerLite-/) { | ||
1508 | 1301 | $bannermore=$model; | ||
1509 | 1302 | $bannermore=~s/PowerLite-//g; | ||
1510 | 1303 | } | ||
1511 | 1304 | $model_checked=1; | ||
1512 | 1305 | } | ||
1513 | 1306 | |||
1514 | 1307 | sub check_banner { | ||
1515 | 1308 | print &runtime . "in check_banner, banner=$banner, ultra=$ultra\n" if ($DEBUG); | ||
1516 | 1309 | $ultra="ultra" if ($ultra eq 0 && ($banner =~ /Ultra/ || $banner =~ /Blade/ || $banner =~ /Fire/)); | ||
1517 | 1310 | $ultra="sparc64" if ($banner =~ /SPARC64/); | ||
1518 | 1311 | $ultra=5 if ($banner =~ /Ultra 5\b/); | ||
1519 | 1312 | $ultra="5_10" if ($banner =~ /Ultra 5\/10\b/); | ||
1520 | 1313 | $ultra=10 if ($banner =~ /Ultra 10\b/); | ||
1521 | 1314 | $ultra="220R" if ($banner =~ /Enterprise 220R\b/); | ||
1522 | 1315 | $ultra=80 if ($banner =~ /Ultra 80\b/); | ||
1523 | 1316 | # E410 is prototype name of E420R, but may still be in the | ||
1524 | 1317 | # banner as "Sun Ultra 80/Enterprise 410 UPA/PCI" | ||
1525 | 1318 | $ultra="420R" if ($banner =~ /Enterprise 410\b/); | ||
1526 | 1319 | $ultra="420R" if ($banner =~ /Enterprise 420R\b/); | ||
1527 | 1320 | $ultra="Netra t140x" if ($banner =~ /Netra t 1400\/1405\b/); | ||
1528 | 1321 | $ultra="CP1400" if ($banner =~ /Ultra CP 1400\b/); | ||
1529 | 1322 | $ultra="CP1500" if ($banner =~ /Ultra CP 1500\b/); | ||
1530 | 1323 | $ultra="CP2000" if ($banner =~ /\bCP2000\b/); | ||
1531 | 1324 | $ultra="CP2040" if ($banner =~ /\bCP2000 model 40\b/); | ||
1532 | 1325 | $ultra="CP2060" if ($banner =~ /\bCP2000 model 60\b/); | ||
1533 | 1326 | $ultra="CP2080" if ($banner =~ /\bCP2000 model 80\b/); | ||
1534 | 1327 | $ultra="CP2140" if ($banner =~ /\bCP2000 model 140\b/); | ||
1535 | 1328 | $ultra="CP2160" if ($banner =~ /\bCP2000 model 160\b/); | ||
1536 | 1329 | $ultra="Sun Blade 1000" if ($banner =~ /Sun Excalibur\b/); # prototype | ||
1537 | 1330 | $ultra="Sun Blade 2000" if ($banner =~ /Sun Blade 2000\b/); | ||
1538 | 1331 | $ultra="Netra ct400" if ($banner =~ /Netra ct400\b/); | ||
1539 | 1332 | $ultra="Netra ct410" if ($banner =~ /Netra ct410\b/); | ||
1540 | 1333 | $ultra="Netra ct800" if ($banner =~ /Netra ct800\b/); | ||
1541 | 1334 | $ultra="Netra ct810" if ($banner =~ /Netra ct810\b/); | ||
1542 | 1335 | $ultra="Sun Blade 150" if ($banner =~ /Sun Blade 150\b/); | ||
1543 | 1336 | # Sun Fire 12K, E25K, etc. systems identifies itself as Sun Fire 15K | ||
1544 | 1337 | $ultra="Sun Fire 12K" if ($banner =~ /Sun Fire 12000\b/ || $banner =~ /Sun Fire 12K\b/); | ||
1545 | 1338 | if ($banner =~ /Ultra 4FT\b/) { | ||
1546 | 1339 | $ultra="Netra ft1800"; | ||
1547 | 1340 | $bannermore="(Netra ft1800)"; | ||
1548 | 1341 | $modelmore="(Netra ft1800)"; | ||
1549 | 1342 | } | ||
1550 | 1343 | # UltraSPARC-IIIi (Jalapeno) systems | ||
1551 | 1344 | $ultra="Sun Ultra 45 Workstation" if ($banner =~ /Sun Ultra 45 Workstation\b/); | ||
1552 | 1345 | $ultra="Sun Ultra 25 Workstation" if ($banner =~ /Sun Ultra 25 Workstation\b/); | ||
1553 | 1346 | # UltraSPARC-IV (Jaguar) or UltraSPARC-IV+ (Panther) systems | ||
1554 | 1347 | $ultra="Sun Fire E2900" if ($banner =~ /Sun Fire E2900\b/); | ||
1555 | 1348 | $ultra="Sun Fire E4900" if ($banner =~ /Sun Fire E4900\b/); | ||
1556 | 1349 | $ultra="Sun Fire E6900" if ($banner =~ /Sun Fire E6900\b/); | ||
1557 | 1350 | $ultra="Sun Fire E20K" if ($banner =~ /Sun Fire E20K\b/); | ||
1558 | 1351 | $ultra="Sun Fire E25K" if ($banner =~ /Sun Fire E25K\b/); | ||
1559 | 1352 | # SPARC64-VI or SPARC64-VII systems | ||
1560 | 1353 | $ultra=$banner if ($banner =~ /SPARC Enterprise M[34589]000 Server/); | ||
1561 | 1354 | # Clones | ||
1562 | 1355 | if ($banner =~ /\bMP-250[(\b]/) { | ||
1563 | 1356 | $ultra="axus250"; | ||
1564 | 1357 | $bannermore="Ultra-250"; | ||
1565 | 1358 | $modelmore="(Ultra-250)"; | ||
1566 | 1359 | } | ||
1567 | 1360 | $manufacturer="AXUS" if ($ultra =~ /\baxus\b/); | ||
1568 | 1361 | $manufacturer="Rave" if ($banner =~ /Axil/); | ||
1569 | 1362 | $manufacturer="Tadpole/Cycle" if ($banner =~ /Cycle/ || $banner =~ /\bUP-20\b/ || $banner =~ /\b520IIi\b/); | ||
1570 | 1363 | $manufacturer="Tadpole" if ($banner =~ /Tadpole/ || $banner =~ /\bRDI\b/ || $banner =~ /\bVoyagerIIi\b/ || $banner =~ /\bSPARCLE\b/); | ||
1571 | 1364 | $manufacturer="Tatung" if ($banner =~ /COMPstation/); | ||
1572 | 1365 | $manufacturer="Twinhead" if ($banner =~ /TWINstation/); | ||
1573 | 1366 | $manufacturer="Fujitsu" if ($banner =~ /Fujitsu/); | ||
1574 | 1367 | $manufacturer="Fujitsu Siemens" if ($banner =~ /Fujitsu Siemens/); | ||
1575 | 1368 | $manufacturer="Fujitsu Siemens Computers" if ($banner =~ /Fujitsu Siemens Computers/); | ||
1576 | 1369 | } | ||
1577 | 1370 | |||
1578 | 1371 | sub check_for_prtdiag { | ||
1579 | 1372 | return if ("$prtdiag_exec" eq "" && $filename eq ""); | ||
1580 | 1373 | return if ($have_prtdiag_data); | ||
1581 | 1374 | &find_helpers; | ||
1582 | 1375 | # Check for LDOMs | ||
1583 | 1376 | if ($ldm_cmd ne "" && $have_ldm_data == 0) { | ||
1584 | 1377 | # Warn that ldm and prtdiag may take a while to run | ||
1585 | 1378 | &please_wait; | ||
1586 | 1379 | @ldm=&run("$ldm_cmd list-devices -a -p"); | ||
1587 | 1380 | $have_ldm_data=1; | ||
1588 | 1381 | foreach $line (@ldm) { | ||
1589 | 1382 | $line=&dos2unix($line); | ||
1590 | 1383 | $line=&mychomp($line); | ||
1591 | 1384 | &check_LDOM; | ||
1592 | 1385 | } | ||
1593 | 1386 | } | ||
1594 | 1387 | @prtdiag=&run("$prtdiag_exec") if ($filename eq ""); | ||
1595 | 1388 | $have_prtdiag_data=1; | ||
1596 | 1389 | foreach $line (@prtdiag) { | ||
1597 | 1390 | $line=&dos2unix($line); | ||
1598 | 1391 | # Some Solaris prtdiag outputs have malformed header, so | ||
1599 | 1392 | # handle them also. | ||
1600 | 1393 | if ($line =~ /^System Configuration: +/ || $line =~ /.BIOS Configuration: / || $line =~ /Sun Microsystems *Sun Fire X/i || $line =~ /Sun Microsystems *Sun Blade X/i || $line =~ /Sun Microsystems .*Memory size: / || ($line =~ /Sun Microsystems *Sun Ultra / && $machine eq i86pc)) { | ||
1601 | 1394 | $line=&mychomp($line); | ||
1602 | 1395 | $tmp=$line; | ||
1603 | 1396 | $line=~s/System Configuration: +//g; | ||
1604 | 1397 | $line=~s/BIOS Configuration: .*//g; | ||
1605 | 1398 | if ($line =~ /^Sun Microsystems/i) { | ||
1606 | 1399 | $manufacturer="Sun Microsystems, Inc."; | ||
1607 | 1400 | } elsif ($line =~ /Inc\./) { | ||
1608 | 1401 | $manufacturer=$line; | ||
1609 | 1402 | $manufacturer=~s/^(.* Inc\.).*/$1/; | ||
1610 | 1403 | if ($tmp !~ /BIOS Configuration: / && $model eq "" && $machine eq "i86pc") { | ||
1611 | 1404 | $diagbanner=$line; | ||
1612 | 1405 | $diagbanner=~s/^.* Inc\. *(.*)/$1/; | ||
1613 | 1406 | } | ||
1614 | 1407 | } elsif ($line =~ /Corporation/) { | ||
1615 | 1408 | $manufacturer=$line; | ||
1616 | 1409 | $manufacturer=~s/^(.* Corporation).*/$1/; | ||
1617 | 1410 | if ($tmp !~ /BIOS Configuration: / && $model eq "" && $machine eq "i86pc") { | ||
1618 | 1411 | $diagbanner=$line; | ||
1619 | 1412 | $diagbanner=~s/^.* Corporation *(.*)/$1/; | ||
1620 | 1413 | } | ||
1621 | 1414 | } else { | ||
1622 | 1415 | $manufacturer=$line; | ||
1623 | 1416 | $manufacturer=~s/^(\w+)[ \/].*/$1/; | ||
1624 | 1417 | } | ||
1625 | 1418 | if ($line =~ /^Sun Microsystems +sun\w+ +/) { | ||
1626 | 1419 | $diagbanner=$line; | ||
1627 | 1420 | $diagbanner=~s/Sun Microsystems +sun\w+ +//g; | ||
1628 | 1421 | $diagbanner=~s/Memory size: .*$//g; | ||
1629 | 1422 | } elsif ($line =~ /^Sun Microsystems *Sun +/i) { | ||
1630 | 1423 | $diagbanner=$line; | ||
1631 | 1424 | $diagbanner=~s/Sun Microsystems *Sun/Sun/ig; | ||
1632 | 1425 | $diagbanner=~s/Memory size: .*$//g; | ||
1633 | 1426 | $diagbanner=~s/ BLADE / Blade /g; | ||
1634 | 1427 | $diagbanner=~s/ FIRE / Fire /g; | ||
1635 | 1428 | $diagbanner=~s/ SERVER / Server /g; | ||
1636 | 1429 | } elsif ($line =~ /^Sun Microsystems, Inc. *Sun +/i) { | ||
1637 | 1430 | $diagbanner=$line; | ||
1638 | 1431 | $diagbanner=~s/Sun Microsystems, Inc. *Sun/Sun/ig; | ||
1639 | 1432 | $diagbanner=~s/Memory size: .*$//g; | ||
1640 | 1433 | $diagbanner=~s/ BLADE / Blade /g; | ||
1641 | 1434 | $diagbanner=~s/ FIRE / Fire /g; | ||
1642 | 1435 | $diagbanner=~s/ SERVER / Server /g; | ||
1643 | 1436 | } elsif ($line =~ /^Sun Microsystems.*Ultra/) { | ||
1644 | 1437 | $diagbanner=$line; | ||
1645 | 1438 | $diagbanner=~s/Sun Microsystems.*Ultra/Ultra/g; | ||
1646 | 1439 | $diagbanner=~s/Memory size: .*$//g; | ||
1647 | 1440 | } | ||
1648 | 1441 | } | ||
1649 | 1442 | $prtdiag_failed=1 if ($line =~ /Prtdiag Failed/i); | ||
1650 | 1443 | # prtdiag only works on the global zone (container), so find out | ||
1651 | 1444 | # if we are in a Solaris zone. solaris8 brand container shows | ||
1652 | 1445 | # kernel version of "Generic_Virtual" | ||
1653 | 1446 | $prtdiag_failed=2 if ($line =~ /prtdiag can only be run in the global /i || $kernver eq "Generic_Virtual"); | ||
1654 | 1447 | } | ||
1655 | 1448 | if ($psrinfo_cmd ne "" && $have_psrinfo_data == 0) { | ||
1656 | 1449 | @psrinfo=&run("$psrinfo_cmd -v"); | ||
1657 | 1450 | $tmp=&mychomp(`$psrinfo_cmd -p 2>/dev/null`); # physical CPUs | ||
1658 | 1451 | if ($tmp ne "") { | ||
1659 | 1452 | push(@psrinfo, "#psrinfo -p\n$tmp\n"); | ||
1660 | 1453 | $tmp=&mychomp(`$psrinfo_cmd -p -v 2>/dev/null`); | ||
1661 | 1454 | push(@psrinfo, "#psrinfo -p -v\n$tmp\n"); | ||
1662 | 1455 | } | ||
1663 | 1456 | $have_psrinfo_data=1; | ||
1664 | 1457 | } | ||
1665 | 1458 | if ($ipmitool_cmd ne "" && $have_ipmitool_data == 0) { | ||
1666 | 1459 | @ipmitool=&run("$ipmitool_cmd fru"); | ||
1667 | 1460 | $have_ipmitool_data=1; | ||
1668 | 1461 | } | ||
1669 | 1462 | if ($smbios_cmd ne "" && $have_smbios_data == 0) { | ||
1670 | 1463 | @smbios=&run("$smbios_cmd"); | ||
1671 | 1464 | $have_smbios_data=1; | ||
1672 | 1465 | } | ||
1673 | 1466 | if (($filename eq "") && ($verbose == 3)) { | ||
1674 | 1467 | # Only run the following commands if E-mailing maintainer since | ||
1675 | 1468 | # this data is used by memconf only for some systems | ||
1676 | 1469 | if ($prtfru_cmd ne "" && $have_prtfru_data == 0) { | ||
1677 | 1470 | @prtfru=&run("$prtfru_cmd -x"); | ||
1678 | 1471 | $have_prtfru_data=1; | ||
1679 | 1472 | } | ||
1680 | 1473 | if ($prtpicl_cmd ne "" && $have_prtpicl_data == 0) { | ||
1681 | 1474 | @prtpicl=&run("$prtpicl_cmd -v"); | ||
1682 | 1475 | $have_prtpicl_data=1; | ||
1683 | 1476 | } | ||
1684 | 1477 | if ($cfgadm_cmd ne "" && $have_cfgadm_data == 0) { | ||
1685 | 1478 | @cfgadm=&run("$cfgadm_cmd -al"); | ||
1686 | 1479 | $have_cfgadm_data=1; | ||
1687 | 1480 | } | ||
1688 | 1481 | if ($ldm_cmd ne "" && $have_ldm_data == 0) { | ||
1689 | 1482 | @ldm=&run("$ldm_cmd list-devices -a -p"); | ||
1690 | 1483 | $have_ldm_data=1; | ||
1691 | 1484 | } | ||
1692 | 1485 | } | ||
1693 | 1486 | } | ||
1694 | 1487 | |||
1695 | 1488 | sub check_prtdiag { | ||
1696 | 1489 | return if ($prtdiag_checked); | ||
1697 | 1490 | print &runtime . "in check_prtdiag\n" if ($DEBUG); | ||
1698 | 1491 | $prtdiag_checked=1; | ||
1699 | 1492 | return if ("$prtdiag_exec" eq "" && $filename eq ""); | ||
1700 | 1493 | &check_for_prtdiag; | ||
1701 | 1494 | foreach $line (@prtdiag) { | ||
1702 | 1495 | $line=&dos2unix($line); | ||
1703 | 1496 | if ($line =~ /====/) { | ||
1704 | 1497 | $flag_cpu=0; # End of CPU section | ||
1705 | 1498 | $flag_mem=0; # End of memory section | ||
1706 | 1499 | } | ||
1707 | 1500 | if ($line =~ /Memory Units: Group Size/) { | ||
1708 | 1501 | # Start of CPU and memory section on SS1000/SC2000 | ||
1709 | 1502 | $flag_cpu=1; | ||
1710 | 1503 | $flag_mem=1; | ||
1711 | 1504 | } | ||
1712 | 1505 | $line="Memory $line" if ($line =~ /^Segment Table:/); | ||
1713 | 1506 | if (($flag_mem >= 1) && ($line !~ /^\s*\n$/)) { | ||
1714 | 1507 | $boardfound_mem=1; | ||
1715 | 1508 | $boardfound_mem=0 if ($line =~ /Cannot find/); | ||
1716 | 1509 | @linearr=split(' ', $line); | ||
1717 | 1510 | if ($linearr[0] =~ /^0x/ && $ultra =~ /Sun Blade 1[05]0\b/ && ($linearr[$#linearr] eq "chassis/system-board" || $linearr[$#linearr] eq "-")) { | ||
1718 | 1511 | # Sometimes socket is unlabeled on prtdiag | ||
1719 | 1512 | # output on Sun Blade 100/150 | ||
1720 | 1513 | $socket=$socketstr[0] if ($linearr[0] =~ /^0x0/); | ||
1721 | 1514 | if ($simmrangex eq "00000400") { | ||
1722 | 1515 | $socket=$socketstr[1] if ($linearr[0] =~ /^0x4/); | ||
1723 | 1516 | $socket=$socketstr[2] if ($linearr[0] =~ /^0x8/); | ||
1724 | 1517 | $socket=$socketstr[3] if ($linearr[0] =~ /^0xc/); | ||
1725 | 1518 | } else { | ||
1726 | 1519 | $socket=$socketstr[1] if ($linearr[0] =~ /^0x2/); | ||
1727 | 1520 | $socket=$socketstr[2] if ($linearr[0] =~ /^0x4/); | ||
1728 | 1521 | $socket=$socketstr[3] if ($linearr[0] =~ /^0x6/); | ||
1729 | 1522 | } | ||
1730 | 1523 | if ($linearr[$#linearr] eq "-") { | ||
1731 | 1524 | $line=~s/-$/$socket/g; | ||
1732 | 1525 | $linearr[$#linearr]=$socket; | ||
1733 | 1526 | } else { | ||
1734 | 1527 | $line=~s/-board/-board\/$socket/g; | ||
1735 | 1528 | $linearr[$#linearr]="chassis/system-board/$socket"; | ||
1736 | 1529 | } | ||
1737 | 1530 | } | ||
1738 | 1531 | push(@boards_mem, "$line"); | ||
1739 | 1532 | $flag_rewrite_prtdiag_mem=1 if ($line =~ /^MB\/CMP[0-3]\/BR[0-3]\/CH[01]\/D[01]/); | ||
1740 | 1533 | if ($#linearr >= 2) { | ||
1741 | 1534 | if ($linearr[2] =~ /\bU\d\d\d\d\b/) { | ||
1742 | 1535 | # Sun Ultra-250 format | ||
1743 | 1536 | $sockets_used .= " $linearr[2]"; | ||
1744 | 1537 | } elsif ($linearr[2] =~ /\b\d\d\d\d\b/) { | ||
1745 | 1538 | # Sun Ultra-4 format | ||
1746 | 1539 | $sockets_used .= " U$linearr[2]"; | ||
1747 | 1540 | } | ||
1748 | 1541 | } | ||
1749 | 1542 | if ($#linearr >= 3) { | ||
1750 | 1543 | if ($linearr[3] ne "BankIDs" && $linearr[3] ne "GroupID" && $line !~ /^0x\d[\d ]+\d.+ +\d +-$/) { | ||
1751 | 1544 | if ($linearr[1] =~ /\b\d+MB\b/) { | ||
1752 | 1545 | # Sun Blade 100/1000 format | ||
1753 | 1546 | $simmsize=$linearr[1]; | ||
1754 | 1547 | $simmsize=~s/MB//g; | ||
1755 | 1548 | push(@simmsizesfound, "$simmsize"); | ||
1756 | 1549 | } elsif ($linearr[1] =~ /\b\d+GB\b/) { | ||
1757 | 1550 | # Sun Blade 1000 format | ||
1758 | 1551 | $simmsize=$linearr[1]; | ||
1759 | 1552 | $simmsize=~s/GB//g; | ||
1760 | 1553 | $simmsize *= 1024; | ||
1761 | 1554 | push(@simmsizesfound, "$simmsize"); | ||
1762 | 1555 | } | ||
1763 | 1556 | } | ||
1764 | 1557 | if ($model eq "Ultra-250" || $ultra eq 250 || $model eq "Ultra-4" || $ultra eq 450 || $model eq "Ultra-4FT" || $ultra eq "Netra ft1800") { | ||
1765 | 1558 | if ($linearr[3] =~ /\b\d+\b/) { | ||
1766 | 1559 | $simmsize=$linearr[3]; | ||
1767 | 1560 | push(@simmsizesfound, "$simmsize"); | ||
1768 | 1561 | } | ||
1769 | 1562 | } | ||
1770 | 1563 | } | ||
1771 | 1564 | if ($linearr[$#linearr] =~ /\bDIMM\d/ || $linearr[$#linearr] =~ /\b[UJ]\d\d\d\d[\b,]/ || ($linearr[$#linearr - 1] eq "Label" && $linearr[$#linearr] eq "-")) { | ||
1772 | 1565 | $sockets_used .= " $linearr[$#linearr]"; | ||
1773 | 1566 | # May be multiple sockets separated by "," | ||
1774 | 1567 | $sockets_used=~s/,/ /g; | ||
1775 | 1568 | } elsif ($#linearr >= 2) { | ||
1776 | 1569 | if ($linearr[2] =~ /MB\/P[01]\/B[01]\/D[01]/ || $linearr[2] =~ /C[0-3]\/P[01]\/B[01]\/D[01]/) { | ||
1777 | 1570 | $sockets_used .= " $linearr[2]"; | ||
1778 | 1571 | # May be multiple sockets separated by "," | ||
1779 | 1572 | $sockets_used=~s/,/ /g; | ||
1780 | 1573 | } | ||
1781 | 1574 | } | ||
1782 | 1575 | if ($linearr[0] !~ /^0x/ && ($linearr[$#linearr] eq "-" || $linearr[$#linearr] =~ /^-,/)) { | ||
1783 | 1576 | # unlabeled sockets | ||
1784 | 1577 | $sockets_used .= " $linearr[$#linearr]"; | ||
1785 | 1578 | # May be multiple sockets separated by "," | ||
1786 | 1579 | $sockets_used=~s/,/ /g; | ||
1787 | 1580 | } | ||
1788 | 1581 | if ($linearr[$#linearr] =~ /\/J\d\d\d\d$/) { | ||
1789 | 1582 | $linearr[$#linearr]=~s/.+\///g; | ||
1790 | 1583 | $sockets_used .= " $linearr[$#linearr]"; | ||
1791 | 1584 | } | ||
1792 | 1585 | if ($ultra eq "Sun Fire 280R") { | ||
1793 | 1586 | if ($line =~ / CA +0 +[0-3] .+4-way/) { | ||
1794 | 1587 | $sockets_used="J0100 J0202 J0304 J0406 J0101 J0203 J0305 J0407"; | ||
1795 | 1588 | } elsif ($line =~ / CA +0 +[02] /) { | ||
1796 | 1589 | $sockets_used .= " J0100 J0202 J0304 J0406" if ($sockets_used !~ / J0100 /); | ||
1797 | 1590 | } elsif ($line =~ / CA +[01] +[13] /) { | ||
1798 | 1591 | $sockets_used .= " J0101 J0203 J0305 J0407" if ($sockets_used !~ / J0101 /); | ||
1799 | 1592 | } | ||
1800 | 1593 | } | ||
1801 | 1594 | # Memory on Sun Fire systems | ||
1802 | 1595 | if ($line =~ /^\/N\d\/SB\d\/P\d\/B\d\b/) { | ||
1803 | 1596 | $boardslot_mem=substr($line,0,13); | ||
1804 | 1597 | push(@boardslot_mems, "$boardslot_mem"); | ||
1805 | 1598 | $boardslot_mems .= $boardslot_mem . " "; | ||
1806 | 1599 | } elsif ($line =~ /^\/N\d\/SB\d\d\/P\d\/B\d\b/) { | ||
1807 | 1600 | $boardslot_mem=substr($line,0,14); | ||
1808 | 1601 | push(@boardslot_mems, "$boardslot_mem"); | ||
1809 | 1602 | $boardslot_mems .= $boardslot_mem . " "; | ||
1810 | 1603 | } elsif ($line =~ /^\/SB\d\d\/P\d\/B\d\b/) { | ||
1811 | 1604 | $boardslot_mem=substr($line,0,11); | ||
1812 | 1605 | push(@boardslot_mems, "$boardslot_mem"); | ||
1813 | 1606 | $boardslot_mems .= $boardslot_mem . " "; | ||
1814 | 1607 | } elsif ($line =~ /\bSB\d\/P\d\/B\d\/D\d\b,/) { | ||
1815 | 1608 | $boardslot_mem=substr($line,24,51); | ||
1816 | 1609 | push(@boardslot_mems, "$boardslot_mem"); | ||
1817 | 1610 | $boardslot_mems .= $boardslot_mem . " "; | ||
1818 | 1611 | } elsif ($line =~ /\bSB\d\/P\d\/B\d\/D\d\b/) { | ||
1819 | 1612 | $boardslot_mem=substr($line,24,12); | ||
1820 | 1613 | push(@boardslot_mems, "$boardslot_mem"); | ||
1821 | 1614 | $boardslot_mems .= $boardslot_mem . " "; | ||
1822 | 1615 | } | ||
1823 | 1616 | if (($ultra =~ /Sun Fire/) && ($#linearr >= 5)) { | ||
1824 | 1617 | if ($linearr[5] =~ /\d+MB/) { | ||
1825 | 1618 | $simmsize=$linearr[5]; | ||
1826 | 1619 | $simmsize=~s/MB//g; | ||
1827 | 1620 | push(@simmsizesfound, "$simmsize"); | ||
1828 | 1621 | } | ||
1829 | 1622 | } | ||
1830 | 1623 | if ($ultra =~ /Sun Fire V[48][89]0\b/) { | ||
1831 | 1624 | # Fire V480, V490, V880, V890 | ||
1832 | 1625 | $bankname="groups"; | ||
1833 | 1626 | if ($banks_used ne "A0 A1 B0 B1") { | ||
1834 | 1627 | $banks_used="A0 B0" if ($line =~ /^ ?[ABCD] .+ 4-way /); | ||
1835 | 1628 | $banks_used="A0 A1 B0 B1" if ($line =~ /^ ?[ABCD] .+ 8-way /); | ||
1836 | 1629 | } | ||
1837 | 1630 | } | ||
1838 | 1631 | if ($linearr[$#linearr] =~ /MB\/CMP0\/CH[0-3]\/R[01]\/D[01]/) { | ||
1839 | 1632 | # UltraSPARC-T1 systems | ||
1840 | 1633 | if ($#linearr >= 5) { | ||
1841 | 1634 | if ($linearr[5] eq "MB") { | ||
1842 | 1635 | $simmsize=$linearr[4]; | ||
1843 | 1636 | $simmsize=~s/MB//g; | ||
1844 | 1637 | $simmsize /= 2; | ||
1845 | 1638 | push(@simmsizesfound, "$simmsize"); | ||
1846 | 1639 | } elsif ($linearr[5] eq "GB") { | ||
1847 | 1640 | $simmsize=$linearr[4]; | ||
1848 | 1641 | $simmsize=~s/GB//g; | ||
1849 | 1642 | $simmsize *= 512; | ||
1850 | 1643 | push(@simmsizesfound, "$simmsize"); | ||
1851 | 1644 | } | ||
1852 | 1645 | } | ||
1853 | 1646 | $sockets_used .= " $linearr[$#linearr]"; | ||
1854 | 1647 | } | ||
1855 | 1648 | if ($linearr[$#linearr] =~ /MB\/CMP[0-3]\/BR[0-3]\/CH[01]\/D[01]/ || $linearr[$#linearr] =~ /MB\/CMP[01]\/MR[01]\/BR[01]\/CH[01]\/D[23]/) { | ||
1856 | 1649 | # UltraSPARC-T2 systems: T5120, T5220, T6320 | ||
1857 | 1650 | # UltraSPARC-T2+ systems: T5140, T5240 | ||
1858 | 1651 | $sockets_used .= " $linearr[$#linearr]"; | ||
1859 | 1652 | } | ||
1860 | 1653 | if ($linearr[$#linearr] =~ /MB\/CPU[01]\/CMP[01]\/BR[01]\/CH[01]\/D[01]/ || $linearr[$#linearr] =~ /MB\/MEM[01]\/CMP[01]\/BR[01]\/CH[01]\/D[01]/) { | ||
1861 | 1654 | $sockets_used .= " $linearr[$#linearr]"; | ||
1862 | 1655 | } | ||
1863 | 1656 | } | ||
1864 | 1657 | if ($line =~ /CPU Units:/) { | ||
1865 | 1658 | $flag_cpu=1; # Start of CPU section | ||
1866 | 1659 | $flag_mem=0; # End of memory section | ||
1867 | 1660 | $format_cpu=1; | ||
1868 | 1661 | } | ||
1869 | 1662 | if ($line =~ /==== CPU/ || $line =~ /==== Processor Sockets / || $line =~ /==== Virtual CPU/) { | ||
1870 | 1663 | $flag_cpu=1; # Start of CPU section | ||
1871 | 1664 | $flag_mem=0; # End of memory section | ||
1872 | 1665 | $format_cpu=2; | ||
1873 | 1666 | } | ||
1874 | 1667 | if ($line =~ /Memory Units:/ || $line =~ /==== Memory / || $line =~ /==== Physical Memory / || $line =~ /Used Memory:/) { | ||
1875 | 1668 | $flag_cpu=0; # End of CPU section | ||
1876 | 1669 | $flag_mem=1; # Start of memory section | ||
1877 | 1670 | } | ||
1878 | 1671 | if ($line =~ /CPU Units:/ && $line =~ /Memory Units:/) { | ||
1879 | 1672 | $flag_cpu=1; # Start of CPU section | ||
1880 | 1673 | $flag_mem=1; # Start of memory section | ||
1881 | 1674 | } | ||
1882 | 1675 | if (($flag_cpu >= 1) && ($line !~ /^\s*\n$/)) { | ||
1883 | 1676 | if ($model eq "Ultra-5_10" || $ultra eq "5_10" || $ultra eq 5 || $ultra eq 10) { | ||
1884 | 1677 | $newline=$line; | ||
1885 | 1678 | $newline=~s/^ //g if ($line !~ /Run Ecache CPU CPU/); | ||
1886 | 1679 | push(@boards_cpu, "$newline"); | ||
1887 | 1680 | } else { | ||
1888 | 1681 | push(@boards_cpu, "$line"); | ||
1889 | 1682 | } | ||
1890 | 1683 | $boardfound_cpu=1; | ||
1891 | 1684 | &checkX86; | ||
1892 | 1685 | if (($flag_cpu == 2) && $isX86) { | ||
1893 | 1686 | # Solaris x86 CPU type found in prtdiag | ||
1894 | 1687 | $cputype2=&mychomp($line); | ||
1895 | 1688 | $cputype2=~s/\s\s+.*//; | ||
1896 | 1689 | $cputype2=~s/(^.* Processor \d+) .*/$1/; | ||
1897 | 1690 | $cputype2=~s/ CPU / /; | ||
1898 | 1691 | $cputype2=~s/\s+/ /g; | ||
1899 | 1692 | $cputype2=~s/^\s+//; | ||
1900 | 1693 | $cputype2=~s/\s+$//; | ||
1901 | 1694 | &x86multicorecnt($cputype2); | ||
1902 | 1695 | # rewrite %cpucnt $cputype2 | ||
1903 | 1696 | $cfreq=0; | ||
1904 | 1697 | while (($cf,$cnt)=each(%cpucnt)) { | ||
1905 | 1698 | $cf=~/^(.*) (\d+)$/; | ||
1906 | 1699 | if (! defined($2)) { | ||
1907 | 1700 | delete $cpucnt{"$cf"}; | ||
1908 | 1701 | } else { | ||
1909 | 1702 | $cfreq=$2; | ||
1910 | 1703 | delete $cpucnt{"$1 $2"}; | ||
1911 | 1704 | } | ||
1912 | 1705 | } | ||
1913 | 1706 | $ndcpu++; | ||
1914 | 1707 | if ($cpucntfrom ne "psrinfo") { | ||
1915 | 1708 | $cpucntfrom="prtdiag"; | ||
1916 | 1709 | $cpucntflag=1; | ||
1917 | 1710 | $ncpu++ if ($filename); | ||
1918 | 1711 | } | ||
1919 | 1712 | $cputype=$cputype2 if ($cputype2 ne ""); | ||
1920 | 1713 | $cputype=$cputype_prtconf if ($cputype eq "AMD" && $cputype_prtconf ne ""); | ||
1921 | 1714 | $cputype=$cputype_psrinfo if ($cputype_psrinfo ne ""); | ||
1922 | 1715 | $cpucnt{"$cputype $cfreq"}=$ncpu; | ||
1923 | 1716 | } | ||
1924 | 1717 | # CPUs on Sun Fire systems | ||
1925 | 1718 | if ($line =~ /^\/N\d\/SB\d\/P\d\b/) { | ||
1926 | 1719 | $boardslot_cpu=substr($line,0,10); | ||
1927 | 1720 | push(@boardslot_cpus, "$boardslot_cpu"); | ||
1928 | 1721 | $boardslot_cpus .= $boardslot_cpu . " "; | ||
1929 | 1722 | } elsif ($line =~ /^\/N\d\/SB\d\d\/P\d\b/) { | ||
1930 | 1723 | $boardslot_cpu=substr($line,0,11); | ||
1931 | 1724 | push(@boardslot_cpus, "$boardslot_cpu"); | ||
1932 | 1725 | $boardslot_cpus .= $boardslot_cpu . " "; | ||
1933 | 1726 | } elsif ($line =~ /^\/SB\d\d\/P\d\b/) { | ||
1934 | 1727 | $boardslot_cpu=substr($line,0,8); | ||
1935 | 1728 | push(@boardslot_cpus, "$boardslot_cpu"); | ||
1936 | 1729 | $boardslot_cpus .= $boardslot_cpu . " "; | ||
1937 | 1730 | &prtdiag_threadcount(1); | ||
1938 | 1731 | } elsif ($line =~ /^ SB\d\/P\d\b/) { | ||
1939 | 1732 | $boardslot_cpu=substr($line,4,6); | ||
1940 | 1733 | push(@boardslot_cpus, "$boardslot_cpu"); | ||
1941 | 1734 | $boardslot_cpus .= $boardslot_cpu . " "; | ||
1942 | 1735 | # prtdiag does not show cpuid or cputype | ||
1943 | 1736 | } elsif ($line =~ / SB\d\/P\d$/) { | ||
1944 | 1737 | $boardslot_cpu=substr($line,length($line)-7,6); | ||
1945 | 1738 | push(@boardslot_cpus, "$boardslot_cpu"); | ||
1946 | 1739 | $boardslot_cpus .= $boardslot_cpu . " "; | ||
1947 | 1740 | &prtdiag_threadcount(0); | ||
1948 | 1741 | } | ||
1949 | 1742 | } | ||
1950 | 1743 | if ($flag_cpu && $line =~ /------/) { | ||
1951 | 1744 | # Next lines are the CPUs on each system board | ||
1952 | 1745 | $flag_cpu=2; | ||
1953 | 1746 | } | ||
1954 | 1747 | if ($flag_mem && $line =~ /------/) { | ||
1955 | 1748 | # Next lines are the memory on each system board | ||
1956 | 1749 | $flag_mem=2; | ||
1957 | 1750 | } | ||
1958 | 1751 | if ($filename && $use_psrinfo_data) { | ||
1959 | 1752 | # May have "psrinfo -v" output in regression test file | ||
1960 | 1753 | if ($line =~ /.+ operates at \d+ MHz/) { | ||
1961 | 1754 | $cpufreq=&mychomp($line); | ||
1962 | 1755 | $cpufreq=~s/.+ operates at //; | ||
1963 | 1756 | $cpufreq=~s/ MHz.+//; | ||
1964 | 1757 | $cpucntfrom="psrinfo" if ($cpucntfrom ne "ldm"); | ||
1965 | 1758 | $cpucntflag="0"; # reset flag | ||
1966 | 1759 | $psrcpucnt++; | ||
1967 | 1760 | # rewrite %cpucnt $cputype with frequency | ||
1968 | 1761 | while (($cf,$cnt)=each(%cpucnt)) { | ||
1969 | 1762 | $cf=~/^(.*) (\d+)$/; | ||
1970 | 1763 | $tmp=$1; | ||
1971 | 1764 | if (defined($tmp)) { | ||
1972 | 1765 | delete $cpucnt{"$1 $2"} if ($2 == 0); | ||
1973 | 1766 | } | ||
1974 | 1767 | } | ||
1975 | 1768 | if (defined($tmp)) { | ||
1976 | 1769 | $cpucnt{"$tmp $cpufreq"}=$psrcpucnt; | ||
1977 | 1770 | $ncpu=$psrcpucnt; | ||
1978 | 1771 | } | ||
1979 | 1772 | } | ||
1980 | 1773 | # May have "psrinfo -p -v" output in regression test | ||
1981 | 1774 | # file that has more detailed information about the | ||
1982 | 1775 | # CPUs. Assumes all CPUs are same. | ||
1983 | 1776 | $foundpsrinfocpu=1 if ($line =~ /.+ \d+ virtual processor/); | ||
1984 | 1777 | if ($foundpsrinfocpu && (($line =~ /.+Hz$/ && $line !~ /Speed: / && $line !~ / PCI/) || $line =~ /\bAMD .* Processor /) && $line !~ / x86 /) { | ||
1985 | 1778 | $cputype=&mychomp($line); | ||
1986 | 1779 | $cputype=~s/ CPU / /; | ||
1987 | 1780 | $cputype=~s/\s+/ /g; | ||
1988 | 1781 | $cputype=~s/^\s+//; | ||
1989 | 1782 | $cputype=~s/\s+$//; | ||
1990 | 1783 | $cputype=~s/^Version:\s+//; | ||
1991 | 1784 | # rewrite %cpucnt $cputype with cputype | ||
1992 | 1785 | while (($cf,$cnt)=each(%cpucnt)) { | ||
1993 | 1786 | $cf=~/^(.*) (\d+)$/; | ||
1994 | 1787 | $cpufreq=$2; | ||
1995 | 1788 | delete $cpucnt{"$1 $2"}; | ||
1996 | 1789 | } | ||
1997 | 1790 | $cpucnt{"$cputype $cpufreq"}=$psrcpucnt; | ||
1998 | 1791 | } | ||
1999 | 1792 | } | ||
2000 | 1793 | } | ||
2001 | 1794 | |||
2002 | 1795 | # Rewrite prtdiag output to include DIMM information on SB1X00, SB2X00, | ||
2003 | 1796 | # Enchilada, Chalupa (Sun Fire V440), Netra T12, Seattle and Boston | ||
2004 | 1797 | # systems | ||
2005 | 1798 | @new_boards_mem=""; | ||
2006 | 1799 | $grpcnt=0; | ||
2007 | 1800 | $intcnt=0; | ||
2008 | 1801 | if ($ultra =~ /Sun Blade [12][05]00\b/ || $ultra eq "Sun Fire 280R" || $ultra eq "Netra 20" || $ultra eq "Sun Fire V250" || $ultra eq "Netra T12") { | ||
2009 | 1802 | foreach $line (@boards_mem) { | ||
2010 | 1803 | $line=&mychomp($line); | ||
2011 | 1804 | $newline=$line; | ||
2012 | 1805 | if (($line eq "-----------------------------------------------------------") && ($prtdiag_banktable_has_dimms == 0)) { | ||
2013 | 1806 | $newline=$line . "------"; | ||
2014 | 1807 | } elsif ($line eq "--------------------------------------------------") { | ||
2015 | 1808 | $newline=$line . "-----------"; | ||
2016 | 1809 | } elsif (($line =~ /ControllerID GroupID Size/) && ($prtdiag_banktable_has_dimms == 0)) { | ||
2017 | 1810 | $newline="ID ControllerID GroupID Size DIMMs Interleave Way"; | ||
2018 | 1811 | } elsif ($line =~ /ControllerID GroupID Labels Status/) { | ||
2019 | 1812 | $newline=$line . " DIMMs"; | ||
2020 | 1813 | } elsif ($line =~ /ControllerID GroupID Labels/) { | ||
2021 | 1814 | $newline=$line . " DIMMs"; | ||
2022 | 1815 | } elsif ($line =~ /ControllerID GroupID Size Labels/) { | ||
2023 | 1816 | $newline=$line . " DIMMs"; | ||
2024 | 1817 | } elsif ($line =~ /^\d[\d ] \d[\d ] \d /) { | ||
2025 | 1818 | &read_prtdiag_bank_table; | ||
2026 | 1819 | } elsif ($line =~ /^0x\d[\d ]+\d.+ +\d +-$/ || $line =~ / GroupID \d[\d ]$/) { | ||
2027 | 1820 | &read_prtdiag_memory_segment_table; | ||
2028 | 1821 | } elsif ($line =~ /J0100,/) { | ||
2029 | 1822 | $sz=$grpsize{0,0}; | ||
2030 | 1823 | if (defined($sz)) { | ||
2031 | 1824 | $sz=~s/ //g; | ||
2032 | 1825 | $newline=$line . " 4x$sz"; | ||
2033 | 1826 | } | ||
2034 | 1827 | } elsif ($line =~ /J0101,/) { | ||
2035 | 1828 | $sz=$grpsize{0,1}; | ||
2036 | 1829 | if (defined($sz)) { | ||
2037 | 1830 | $sz=~s/ //g; | ||
2038 | 1831 | $newline=$line . " 4x$sz"; | ||
2039 | 1832 | } | ||
2040 | 1833 | } elsif ($line =~ /\/J0[1-4]0[0246]\b/) { | ||
2041 | 1834 | $sz=$grpsize{0,0}; | ||
2042 | 1835 | if (defined($sz)) { | ||
2043 | 1836 | $sz=~s/ //g; | ||
2044 | 1837 | $newline=$line . " $sz"; | ||
2045 | 1838 | } | ||
2046 | 1839 | } elsif ($line =~ /\/J0[1-4]0[1357]\b/) { | ||
2047 | 1840 | $sz=$grpsize{0,1}; | ||
2048 | 1841 | if (defined($sz)) { | ||
2049 | 1842 | $sz=~s/ //g; | ||
2050 | 1843 | $newline=$line . " $sz"; | ||
2051 | 1844 | } | ||
2052 | 1845 | } elsif ($line =~ /\bSB\d\/P\d\/B\d\/D\d,/) { | ||
2053 | 1846 | $tmp=substr($line,0,2); | ||
2054 | 1847 | $tmp=~s/ //g; | ||
2055 | 1848 | $sz=$grpsize{$tmp,substr($line,15,1)}; | ||
2056 | 1849 | $sz=$grpsize{0,substr($line,15,1)} if (! defined($sz)); | ||
2057 | 1850 | if (defined($sz)) { | ||
2058 | 1851 | $sz=~s/ //g; | ||
2059 | 1852 | $newline=$line . " 4x$sz"; | ||
2060 | 1853 | } | ||
2061 | 1854 | } elsif ($line =~ /\bSB\d\/P\d\/B\d\/D\d\b/) { | ||
2062 | 1855 | $tmp=substr($line,0,2); | ||
2063 | 1856 | $tmp=~s/ //g; | ||
2064 | 1857 | $sz=$grpsize{$tmp,substr($line,15,1)}; | ||
2065 | 1858 | $sz=$grpsize{0,substr($line,15,1)} if (! defined($sz)); | ||
2066 | 1859 | if (defined($sz)) { | ||
2067 | 1860 | $sz=~s/ //g; | ||
2068 | 1861 | $newline=$line . " $sz"; | ||
2069 | 1862 | } | ||
2070 | 1863 | } elsif ($line =~ / MB\/DIMM\d,/) { | ||
2071 | 1864 | $sz=$grpsize{0,substr($line,15,1)}; | ||
2072 | 1865 | $newline=$line . " 2x$sz" if (defined($sz)); | ||
2073 | 1866 | } elsif ($line =~ /DIMM\d,DIMM\d/) { | ||
2074 | 1867 | @linearr=split(' ', $line); | ||
2075 | 1868 | if ($linearr[2] =~ /\d+[MG]B/) { | ||
2076 | 1869 | $sz=$linearr[2]; | ||
2077 | 1870 | if ($sz =~ /\dGB/) { | ||
2078 | 1871 | $sz=~s/GB//g; | ||
2079 | 1872 | $sz *= 512; | ||
2080 | 1873 | } else { | ||
2081 | 1874 | $sz=~s/MB//g; | ||
2082 | 1875 | $sz /= 2; | ||
2083 | 1876 | } | ||
2084 | 1877 | $sz=&show_memory_label($sz); | ||
2085 | 1878 | } | ||
2086 | 1879 | $newline=$line . " 2x$sz" if (defined($sz)); | ||
2087 | 1880 | if ($line =~ /DIMM[13],DIMM[24]/ && $ultra eq "Sun Blade 1500") { | ||
2088 | 1881 | # prototype has sockets DIMM1-DIMM4 | ||
2089 | 1882 | @socketstr=("DIMM1".."DIMM4"); | ||
2090 | 1883 | } | ||
2091 | 1884 | if ($line =~ /DIMM[1357],DIMM[2468]/ && $ultra eq "Sun Blade 2500") { | ||
2092 | 1885 | # prototype has sockets DIMM1-DIMM8 | ||
2093 | 1886 | if ($line =~ /DIMM[13],DIMM[24]/) { | ||
2094 | 1887 | @socketstr=("DIMM1".."DIMM4"); | ||
2095 | 1888 | } elsif ($line =~ /DIMM[57],DIMM[68]/) { | ||
2096 | 1889 | push(@socketstr, "DIMM5".."DIMM8"); | ||
2097 | 1890 | } | ||
2098 | 1891 | } | ||
2099 | 1892 | } | ||
2100 | 1893 | push(@new_boards_mem, "$newline\n") if ($newline ne ""); | ||
2101 | 1894 | } | ||
2102 | 1895 | @boards_mem=@new_boards_mem; | ||
2103 | 1896 | } elsif ($ultra eq "Enchilada" || $ultra eq "Sun Fire V440" || $ultra eq "Netra 440" || $ultra =~ /Sun Ultra [24]5 .*Workstation/ || $ultra eq "Sun Fire V125" || $ultra eq "Seattle" || $ultra eq "Boston" || $banner =~ /Sun Fire E[24]900\b/ || $diagbanner =~ /Sun Fire E[24]900/) { | ||
2104 | 1897 | foreach $line (@boards_mem) { | ||
2105 | 1898 | $line=&mychomp($line); | ||
2106 | 1899 | $newline=$line; | ||
2107 | 1900 | if (($line eq "-----------------------------------------------------------") && ($prtdiag_banktable_has_dimms == 0)) { | ||
2108 | 1901 | $newline=$line . "------"; | ||
2109 | 1902 | } elsif ($line eq "--------------------------------------------------") { | ||
2110 | 1903 | $newline=$line . "-----------"; | ||
2111 | 1904 | } elsif (($line =~ /ControllerID GroupID Size/) && ($prtdiag_banktable_has_dimms == 0)) { | ||
2112 | 1905 | $newline="ID ControllerID GroupID Size DIMMs Interleave Way"; | ||
2113 | 1906 | } elsif ($line =~ /ControllerID GroupID Labels Status/) { | ||
2114 | 1907 | $newline=$line . " DIMMs"; | ||
2115 | 1908 | } elsif ($line =~ /ControllerID GroupID Labels/) { | ||
2116 | 1909 | $newline=$line . " DIMMs"; | ||
2117 | 1910 | } elsif ($line =~ /^\d[\d ] \d[\d ] \d /) { | ||
2118 | 1911 | &read_prtdiag_bank_table; | ||
2119 | 1912 | } elsif ($line =~ /^0x\d[\d ]+\d.+ +\d +-$/ || $line =~ / GroupID \d[\d ]$/) { | ||
2120 | 1913 | &read_prtdiag_memory_segment_table; | ||
2121 | 1914 | } elsif ($line =~ / MB\/P[01]\/B[01]\/D[01],/ || $line =~ /C[0-3]\/P[01]\/B[01]\/D[01],/) { | ||
2122 | 1915 | $sz=$grpsize{substr($line,0,1),substr($line,15,1)}; | ||
2123 | 1916 | $sz=$grpsize{0,substr($line,15,1)} if (! defined($sz)); | ||
2124 | 1917 | if (defined($sz)) { | ||
2125 | 1918 | $newline=$line . " 2x$sz"; | ||
2126 | 1919 | } else { | ||
2127 | 1920 | $newline=$line . " Failing"; | ||
2128 | 1921 | $failing_memory=1; | ||
2129 | 1922 | } | ||
2130 | 1923 | } elsif ($line =~ / MB\/P[01]\/B[01]\/D[01]\b/ || $line =~ /C[0-3]\/P[01]\/B[01]\/D[01]\b/) { | ||
2131 | 1924 | $sz=$grpsize{substr($line,0,1),substr($line,15,1)}; | ||
2132 | 1925 | $sz=$grpsize{0,substr($line,15,1)} if (! defined($sz)); | ||
2133 | 1926 | if (defined($sz)) { | ||
2134 | 1927 | $sz=~s/ //g; | ||
2135 | 1928 | $sz=&show_memory_label($sz); | ||
2136 | 1929 | } | ||
2137 | 1930 | $space=" "; | ||
2138 | 1931 | $space="" if ($line =~ / okay/); | ||
2139 | 1932 | if ($line =~ / failed/) { | ||
2140 | 1933 | if (defined($sz)) { | ||
2141 | 1934 | $failed_memory += $sz; | ||
2142 | 1935 | } else { | ||
2143 | 1936 | $failing_memory=1; | ||
2144 | 1937 | } | ||
2145 | 1938 | } | ||
2146 | 1939 | if (defined($sz)) { | ||
2147 | 1940 | # If interleave factor is 16, then print 4x$sz | ||
2148 | 1941 | if (defined($grpinterleave{substr($line,28,1),0})) { | ||
2149 | 1942 | if (($grpinterleave{substr($line,28,1),0} eq "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15") && ($prtdiag_banktable_has_dimms == 0)) { | ||
2150 | 1943 | $newline=$line . "$space 4x$sz"; | ||
2151 | 1944 | } else { | ||
2152 | 1945 | $newline=$line . "$space $sz"; | ||
2153 | 1946 | } | ||
2154 | 1947 | } else { | ||
2155 | 1948 | $newline=$line . "$space $sz"; | ||
2156 | 1949 | } | ||
2157 | 1950 | } | ||
2158 | 1951 | } elsif ($line =~ / MB\/DIMM[0-7]\b/) { | ||
2159 | 1952 | $sz=$grpsize{substr($line,0,1),substr($line,15,1)}; | ||
2160 | 1953 | $sz=$grpsize{0,substr($line,15,1)} if (! defined($sz)); | ||
2161 | 1954 | $newline=$line . " $sz" if (defined($sz)); | ||
2162 | 1955 | } elsif ($line =~ /\bSB\d\/P\d\/B\d\/D\d,/) { | ||
2163 | 1956 | $tmp=substr($line,0,2); | ||
2164 | 1957 | $tmp=~s/ //g; | ||
2165 | 1958 | $sz=$grpsize{$tmp,substr($line,15,1)}; | ||
2166 | 1959 | $sz=$grpsize{0,substr($line,15,1)} if (! defined($sz)); | ||
2167 | 1960 | if (defined($sz)) { | ||
2168 | 1961 | $sz=~s/ //g; | ||
2169 | 1962 | $newline=$line . " 4x$sz"; | ||
2170 | 1963 | } | ||
2171 | 1964 | } elsif ($line =~ /\bSB\d\/P\d\/B\d\/D\d\b/) { | ||
2172 | 1965 | $tmp=substr($line,0,2); | ||
2173 | 1966 | $tmp=~s/ //g; | ||
2174 | 1967 | $sz=$grpsize{$tmp,substr($line,15,1)}; | ||
2175 | 1968 | $sz=$grpsize{0,substr($line,15,1)} if (! defined($sz)); | ||
2176 | 1969 | if (defined($sz)) { | ||
2177 | 1970 | $sz=~s/ //g; | ||
2178 | 1971 | $newline=$line . " $sz"; | ||
2179 | 1972 | } | ||
2180 | 1973 | } | ||
2181 | 1974 | push(@new_boards_mem, "$newline\n") if ($newline ne ""); | ||
2182 | 1975 | } | ||
2183 | 1976 | @boards_mem=@new_boards_mem; | ||
2184 | 1977 | } | ||
2185 | 1978 | # Rewrite prtdiag output to exclude redundant labels | ||
2186 | 1979 | @new_boards_mem=""; | ||
2187 | 1980 | $flag_group=0; | ||
2188 | 1981 | foreach $line (@boards_mem) { | ||
2189 | 1982 | $line=&mychomp($line); | ||
2190 | 1983 | $newline=$line; | ||
2191 | 1984 | $flag_group++ if ($line =~ /Memory Module Groups:/); | ||
2192 | 1985 | if ($flag_group ge 2) { | ||
2193 | 1986 | $newline="" if ($line =~ /Memory Module Groups:/ || $line =~ "--------------------------------------------------" || $line =~ /ControllerID GroupID/); | ||
2194 | 1987 | } | ||
2195 | 1988 | push(@new_boards_mem, "$newline\n") if ($newline ne ""); | ||
2196 | 1989 | } | ||
2197 | 1990 | if (($ultra eq "T5120" || $ultra eq "T5220" || $ultra eq "T6320" || $ultra eq "T5140" || $ultra eq "T5240" || $ultra eq "T5440") && $sockets_used ne "") { | ||
2198 | 1991 | if ($prtpicl_cmd ne "" && $have_prtpicl_data == 0) { | ||
2199 | 1992 | # Warn that prtpicl may take a while to run | ||
2200 | 1993 | &please_wait; | ||
2201 | 1994 | @prtpicl=&run("$prtpicl_cmd -v"); | ||
2202 | 1995 | $have_prtpicl_data=1; | ||
2203 | 1996 | } | ||
2204 | 1997 | &check_prtpicl if ($have_prtpicl_data); | ||
2205 | 1998 | if ($picl_foundmemory) { | ||
2206 | 1999 | @new_boards_mem=""; | ||
2207 | 2000 | $bank_cnt=scalar(keys %picl_mem_bank); | ||
2208 | 2001 | if (scalar(keys %picl_mem_dimm) == 1 || $bank_cnt > 1) { | ||
2209 | 2002 | $pn_cnt=scalar(keys %picl_mem_pn); | ||
2210 | 2003 | while (($socket,$simmsize)=each(%picl_mem_bank)) { | ||
2211 | 2004 | if ($pn_cnt == $bank_cnt * 2 || $interleave == 8) { | ||
2212 | 2005 | # CH1 was not listed | ||
2213 | 2006 | $simmsize /= 2; | ||
2214 | 2007 | $picl_mem_dimm{"$socket"}=$simmsize; | ||
2215 | 2008 | $socket=~s/CH0/CH1/g; | ||
2216 | 2009 | $picl_mem_dimm{"$socket"}=$simmsize; | ||
2217 | 2010 | $sockets_used .= " $socket" if ($sockets_used !~ /$socket/); | ||
2218 | 2011 | } else { | ||
2219 | 2012 | $picl_mem_dimm{"$socket"}=$simmsize; | ||
2220 | 2013 | } | ||
2221 | 2014 | } | ||
2222 | 2015 | } | ||
2223 | 2016 | while (($socket,$simmsize)=each(%picl_mem_dimm)) { | ||
2224 | 2017 | $pn=$picl_mem_pn{"$socket"}; | ||
2225 | 2018 | $sz=&show_memory_label($simmsize); | ||
2226 | 2019 | $newline="socket $socket has a "; | ||
2227 | 2020 | $newline .= $pn . " " if (defined($pn)); | ||
2228 | 2021 | $newline .= $sz . " " if (defined($sz)); | ||
2229 | 2022 | $newline .= "$memtype"; | ||
2230 | 2023 | push(@new_boards_mem, "$newline\n"); | ||
2231 | 2024 | push(@simmsizesfound, $simmsize) if (defined($sz)); | ||
2232 | 2025 | } | ||
2233 | 2026 | @new_boards_mem=sort @new_boards_mem; | ||
2234 | 2027 | } elsif ($flag_rewrite_prtdiag_mem) { | ||
2235 | 2028 | # Hack: Rewrite prtdiag output better than original | ||
2236 | 2029 | if ($sockets_used =~ /MB\/CMP[01]\/BR[0-3]\/CH[01]\/D1/) { | ||
2237 | 2030 | # All 16 DIMMs are installed | ||
2238 | 2031 | @new_boards_mem=""; | ||
2239 | 2032 | if ($sockets_used !~ /MB\/CMP[01]\/BR[0-3]\/CH1\/D[01]/) { | ||
2240 | 2033 | foreach $line (@boards_mem) { | ||
2241 | 2034 | $line=&mychomp($line); | ||
2242 | 2035 | $newline=$line; | ||
2243 | 2036 | if ($line =~ /MB\/CMP[01]\/BR[0-3]\/CH0\/D[01]/) { | ||
2244 | 2037 | $line=~s/\s+$//; | ||
2245 | 2038 | $tmp=$line; | ||
2246 | 2039 | $tmp=~s/^.*(MB\/CMP.*)/$1/; | ||
2247 | 2040 | $tmp=~s/CH0/CH1/g; | ||
2248 | 2041 | $space=""; | ||
2249 | 2042 | $space=" " if ($line =~ /^MB\/CMP/); | ||
2250 | 2043 | $newline="$space$line,$tmp"; | ||
2251 | 2044 | } | ||
2252 | 2045 | push(@new_boards_mem, "$newline\n") if ($newline ne ""); | ||
2253 | 2046 | } | ||
2254 | 2047 | } | ||
2255 | 2048 | $sockets_used=""; | ||
2256 | 2049 | for ($cnt=0; $cnt <= $#socketstr; $cnt++) { | ||
2257 | 2050 | $sockets_used .= " $socketstr[$cnt]"; | ||
2258 | 2051 | } | ||
2259 | 2052 | $simmsize=$installed_memory / 16; | ||
2260 | 2053 | } else { | ||
2261 | 2054 | # 8-DIMMs or 4-DIMMs are installed. | ||
2262 | 2055 | # Hack: assume 4-DIMM configuration since | ||
2263 | 2056 | # 8-DIMM has prtpicl output. | ||
2264 | 2057 | @new_boards_mem=""; | ||
2265 | 2058 | foreach $line (@boards_mem) { | ||
2266 | 2059 | $line=&mychomp($line); | ||
2267 | 2060 | $newline=$line; | ||
2268 | 2061 | if ($line =~ /MB\/CMP[01]\/BR[0-3]\/CH0\/D[01]/) { | ||
2269 | 2062 | $line=~s/\s+$//; | ||
2270 | 2063 | $space=""; | ||
2271 | 2064 | $space=" " if ($line =~ /^MB\/CMP/); | ||
2272 | 2065 | $newline="$space$line"; | ||
2273 | 2066 | } | ||
2274 | 2067 | push(@new_boards_mem, "$newline\n") if ($newline ne ""); | ||
2275 | 2068 | } | ||
2276 | 2069 | $simmsize=$installed_memory / 4; | ||
2277 | 2070 | } | ||
2278 | 2071 | # Round up DIMM value | ||
2279 | 2072 | $simmsize=int(($simmsize + 128) / 1024) * 1024; | ||
2280 | 2073 | push(@simmsizesfound, $simmsize); | ||
2281 | 2074 | } else { | ||
2282 | 2075 | $tmp=0; | ||
2283 | 2076 | foreach $socket (sort split(' ', $sockets_used)) { | ||
2284 | 2077 | $tmp++; | ||
2285 | 2078 | } | ||
2286 | 2079 | if ($tmp) { | ||
2287 | 2080 | $simmsize=$installed_memory / $tmp; | ||
2288 | 2081 | # Round up DIMM value | ||
2289 | 2082 | $simmsize=int(($simmsize + 128) / 1024) * 1024; | ||
2290 | 2083 | push(@simmsizesfound, $simmsize); | ||
2291 | 2084 | } | ||
2292 | 2085 | } | ||
2293 | 2086 | } | ||
2294 | 2087 | |||
2295 | 2088 | @boards_mem=@new_boards_mem; | ||
2296 | 2089 | } | ||
2297 | 2090 | |||
2298 | 2091 | sub prtdiag_threadcount { | ||
2299 | 2092 | $arg=shift; | ||
2300 | 2093 | $diagthreadcnt++; | ||
2301 | 2094 | $tmp=$line; | ||
2302 | 2095 | $tmp=~s/,\s+/,/; | ||
2303 | 2096 | @linearr=split(' ', $tmp); | ||
2304 | 2097 | if ($line =~ /\bUS-/) { | ||
2305 | 2098 | $cputype=$linearr[4]; | ||
2306 | 2099 | $cputype=~s/US-/UltraSPARC-/; | ||
2307 | 2100 | $cputype=~s/UltraSPARC-IV/dual-core UltraSPARC-IV/; | ||
2308 | 2101 | $cpufreq=$linearr[2]; | ||
2309 | 2102 | } | ||
2310 | 2103 | $diagcpucnt{"$cputype $cpufreq"}++; | ||
2311 | 2104 | if ($linearr[$arg] =~ /,/) { | ||
2312 | 2105 | $tmp=$linearr[$arg]; | ||
2313 | 2106 | @linearr=split(',', $tmp); | ||
2314 | 2107 | $diagthreadcnt += $#linearr; | ||
2315 | 2108 | } | ||
2316 | 2109 | $cpucntfrom="prtdiag"; | ||
2317 | 2110 | } | ||
2318 | 2111 | |||
2319 | 2112 | sub check_prtpicl { | ||
2320 | 2113 | print &runtime . "in check_prtpicl\n" if ($DEBUG); | ||
2321 | 2114 | $flag_mem_seg=0; | ||
2322 | 2115 | $flag_mem_bank=0; | ||
2323 | 2116 | $flag_mem_chan=0; | ||
2324 | 2117 | $flag_mem_mod=0; | ||
2325 | 2118 | $cpumembrd=""; | ||
2326 | 2119 | foreach $line (@prtpicl) { | ||
2327 | 2120 | $line=&dos2unix($line); | ||
2328 | 2121 | $line=&mychomp($line); | ||
2329 | 2122 | $line=~s/\s+$//; | ||
2330 | 2123 | if ($line =~ /^\s+:Label\s+CPU[01]/ || $line =~ /^\s+:Label\s+MEM[01]/) { | ||
2331 | 2124 | $cpumembrd=$line; | ||
2332 | 2125 | $cpumembrd=~s/^.*:Label\s+(.*)$/$1/; | ||
2333 | 2126 | $cpumembrd .= "/"; | ||
2334 | 2127 | } | ||
2335 | 2128 | if ($line =~ /^\s+:Label\s+CMP[0-3]/) { | ||
2336 | 2129 | $cmp=$line; | ||
2337 | 2130 | $cmp=~s/^.*:Label\s+(.*)$/$1/; | ||
2338 | 2131 | } | ||
2339 | 2132 | if ($line =~ /\s+:name\s/) { | ||
2340 | 2133 | $flag_mem_seg=0; | ||
2341 | 2134 | if ($flag_mem_mod) { | ||
2342 | 2135 | $socket="MB/$cpumembrd$cmp/$mem_branch/$mem_channel/$mem_dimm"; | ||
2343 | 2136 | $flag_mem_mod=0; # End of memory module section | ||
2344 | 2137 | $sockets_used .= " $socket" if ($sockets_used !~ /$socket/); | ||
2345 | 2138 | $picl_mem_pn{"$socket"}="$mem_mfg $mem_model"; | ||
2346 | 2139 | if ($sockets_used =~ /\/CH1\//) { | ||
2347 | 2140 | $picl_mem_dimm{"$socket"}=$bank_size / 2; | ||
2348 | 2141 | } else { | ||
2349 | 2142 | $picl_mem_dimm{"$socket"}=$bank_size; | ||
2350 | 2143 | } | ||
2351 | 2144 | } | ||
2352 | 2145 | if ($flag_mem_bank && ! $flag_mem_mod) { | ||
2353 | 2146 | if ($bank_nac) { | ||
2354 | 2147 | $socket="$bank_nac" if ($bank_nac ne ""); | ||
2355 | 2148 | } | ||
2356 | 2149 | $flag_mem_bank=0; # End of memory bank section | ||
2357 | 2150 | $sockets_used .= " $socket" if ($sockets_used !~ /$socket/); | ||
2358 | 2151 | $picl_mem_bank{"$socket"}=$bank_size; | ||
2359 | 2152 | } | ||
2360 | 2153 | } | ||
2361 | 2154 | if ($line =~ /^\s+memory-segment\s/) { | ||
2362 | 2155 | $flag_mem_seg=1; # Start of memory segment section | ||
2363 | 2156 | } | ||
2364 | 2157 | if ($flag_mem_seg) { | ||
2365 | 2158 | if ($line =~ /^\s+:InterleaveFactor\s/) { | ||
2366 | 2159 | $interleave=$line; | ||
2367 | 2160 | $interleave=~s/^.*:InterleaveFactor\s+(.*)$/$1/; | ||
2368 | 2161 | $interleave=hex($interleave) if ($interleave =~ /^0x\d/); | ||
2369 | 2162 | } | ||
2370 | 2163 | if ($line =~ /^\s+:Size\s/) { | ||
2371 | 2164 | $segment_size=$line; | ||
2372 | 2165 | $segment_size=~s/^.*:Size\s+(.*)$/$1/; | ||
2373 | 2166 | if ($segment_size =~ /^0x\d/) { | ||
2374 | 2167 | $segment_size=~s/^(.*)00000$/$1/; | ||
2375 | 2168 | $segment_size=hex($segment_size); | ||
2376 | 2169 | } else { | ||
2377 | 2170 | $segment_size /= $meg; | ||
2378 | 2171 | } | ||
2379 | 2172 | } | ||
2380 | 2173 | } | ||
2381 | 2174 | if ($line =~ /^\s+memory-bank\s/) { | ||
2382 | 2175 | $flag_mem_bank=1; # Start of memory bank section | ||
2383 | 2176 | } | ||
2384 | 2177 | if ($flag_mem_bank) { | ||
2385 | 2178 | if ($line =~ /^\s+:Label\s/) { | ||
2386 | 2179 | $bank_label=$line; | ||
2387 | 2180 | $bank_label=~s/^.*:Label\s+(.*)$/$1/; | ||
2388 | 2181 | } | ||
2389 | 2182 | if ($line =~ /^\s+:nac\s/) { | ||
2390 | 2183 | $bank_nac=$line; | ||
2391 | 2184 | $bank_nac=~s/^.*:nac\s+(.*)$/$1/; | ||
2392 | 2185 | } | ||
2393 | 2186 | if ($line =~ /^\s+:Size\s/) { | ||
2394 | 2187 | $bank_size=$line; | ||
2395 | 2188 | $bank_size=~s/^.*:Size\s+(.*)$/$1/; | ||
2396 | 2189 | if ($bank_size =~ /^0x\d/) { | ||
2397 | 2190 | $bank_size=~s/^(.*)00000$/$1/; | ||
2398 | 2191 | $bank_size=hex($bank_size); | ||
2399 | 2192 | } else { | ||
2400 | 2193 | $bank_size=$segment_size / $meg; | ||
2401 | 2194 | } | ||
2402 | 2195 | } | ||
2403 | 2196 | } | ||
2404 | 2197 | if ($line =~ /^\s+memory-module\s/ && $flag_mem_bank) { | ||
2405 | 2198 | $flag_mem_mod=1; # Start of memory module section | ||
2406 | 2199 | } | ||
2407 | 2200 | if ($flag_mem_mod) { | ||
2408 | 2201 | if ($line =~ /^\s+:nac\s/) { | ||
2409 | 2202 | $mem_dimm=$line; | ||
2410 | 2203 | $mem_dimm=~s/^.*:nac\s+(.*)$/$1/; | ||
2411 | 2204 | } | ||
2412 | 2205 | } | ||
2413 | 2206 | if ($line =~ /^\s+BR\d\s/) { | ||
2414 | 2207 | $flag_mem_chan=0; | ||
2415 | 2208 | $mem_branch=$line; | ||
2416 | 2209 | $mem_branch=~s/^.*(BR\d).*/$1/; | ||
2417 | 2210 | } | ||
2418 | 2211 | if ($line =~ /^\s+CH\d\s/) { | ||
2419 | 2212 | $flag_mem_chan=1; # Start of memory channel section | ||
2420 | 2213 | $mem_channel=$line; | ||
2421 | 2214 | $mem_channel=~s/^.*(CH\d).*/$1/; | ||
2422 | 2215 | } | ||
2423 | 2216 | if ($flag_mem_chan && $line =~ /^\s+D\d\s/) { | ||
2424 | 2217 | $flag_mem_mod=1; # Start of memory module section | ||
2425 | 2218 | $picl_foundmemory=1; | ||
2426 | 2219 | $mem_dimm=$line; | ||
2427 | 2220 | $mem_dimm=~s/^.*(D\d).*/$1/; | ||
2428 | 2221 | } | ||
2429 | 2222 | if ($flag_mem_mod) { | ||
2430 | 2223 | if ($line =~ /\s+:ModelName\s/) { | ||
2431 | 2224 | $mem_model=$line; | ||
2432 | 2225 | $mem_model=~s/^.*:ModelName\s+(.*)$/$1/; | ||
2433 | 2226 | } | ||
2434 | 2227 | if ($line =~ /\s+:MfgName\s/) { | ||
2435 | 2228 | $mem_mfg=$line; | ||
2436 | 2229 | $mem_mfg=~s/^.*:MfgName\s+(.*)$/$1/; | ||
2437 | 2230 | } | ||
2438 | 2231 | } | ||
2439 | 2232 | } | ||
2440 | 2233 | } | ||
2441 | 2234 | |||
2442 | 2235 | sub multicore_cpu_cnt { | ||
2443 | 2236 | $arg=shift; | ||
2444 | 2237 | # return if ($isX86); | ||
2445 | 2238 | &check_psrinfo; | ||
2446 | 2239 | print &runtime . "in multicore_cpu_cnt, cputype=$cputype\n" if ($DEBUG); | ||
2447 | 2240 | if ($cputype =~ /UltraSPARC-T1\b/) { | ||
2448 | 2241 | $cputype="UltraSPARC-T1"; | ||
2449 | 2242 | # Count 4-thread (4, 6, or 8 core) Niagara CPUs as 1 CPU | ||
2450 | 2243 | if ($npcpu && ! $have_ldm_data) { | ||
2451 | 2244 | $ncpu=$npcpu; | ||
2452 | 2245 | } else { | ||
2453 | 2246 | # Assume each CPU has 8 cores max (32 threads) | ||
2454 | 2247 | $ncpu=int(($threadcnt - 1) / 32) + 1; | ||
2455 | 2248 | } | ||
2456 | 2249 | if (defined($arg)) { | ||
2457 | 2250 | $cnt=$ncpu; | ||
2458 | 2251 | return; | ||
2459 | 2252 | } | ||
2460 | 2253 | $cputype=$threadcnt / 4 / $ncpu . "-core quad-thread $cputype"; | ||
2461 | 2254 | $cpucnt{"$cputype $cpufreq"}=$ncpu; | ||
2462 | 2255 | } elsif ($cputype =~ /UltraSPARC-T2\+/) { | ||
2463 | 2256 | $cputype="UltraSPARC-T2+"; | ||
2464 | 2257 | # Count 8-thread (4, 6, or 8 core) Victoria Falls CPUs as 1 CPU | ||
2465 | 2258 | if ($npcpu && ! $have_ldm_data) { | ||
2466 | 2259 | $ncpu=$npcpu; | ||
2467 | 2260 | } else { | ||
2468 | 2261 | # Assume there are no single-cpu systems with the US-T2+ | ||
2469 | 2262 | $ncpu=2; | ||
2470 | 2263 | # Valid configurations: | ||
2471 | 2264 | # T5140,T5240: 2 x 4-core (64 threads), 2 x 6-core | ||
2472 | 2265 | # (96 threads), 2 x 8-core (128 threads) | ||
2473 | 2266 | # T5440: 4 x 4-core (128 threads), 4 x 8-core | ||
2474 | 2267 | # (256 threads) | ||
2475 | 2268 | if ($ultra eq "T5140" || $ultra eq "T5240") { | ||
2476 | 2269 | $ncpu=2; | ||
2477 | 2270 | } elsif ($ultra eq "T5440") { | ||
2478 | 2271 | $ncpu=4; | ||
2479 | 2272 | } | ||
2480 | 2273 | } | ||
2481 | 2274 | if (defined($arg)) { | ||
2482 | 2275 | $cnt=$ncpu; | ||
2483 | 2276 | return; | ||
2484 | 2277 | } | ||
2485 | 2278 | $cputype=$threadcnt / 8 / $ncpu . "-core 8-thread $cputype"; | ||
2486 | 2279 | $cpucnt{"$cputype $cpufreq"}=$ncpu; | ||
2487 | 2280 | } elsif ($cputype =~ /UltraSPARC-T2\b/) { | ||
2488 | 2281 | $cputype="UltraSPARC-T2"; | ||
2489 | 2282 | # Count 8-thread (4 or 8 core) Niagara-II CPUs as 1 CPU | ||
2490 | 2283 | if ($npcpu && ! $have_ldm_data) { | ||
2491 | 2284 | $ncpu=$npcpu; | ||
2492 | 2285 | } else { | ||
2493 | 2286 | # Assume each CPU has 8 cores max (64 threads) | ||
2494 | 2287 | $ncpu=int(($threadcnt - 1) / 64) + 1; | ||
2495 | 2288 | } | ||
2496 | 2289 | if (defined($arg)) { | ||
2497 | 2290 | $cnt=$ncpu; | ||
2498 | 2291 | return; | ||
2499 | 2292 | } | ||
2500 | 2293 | $cputype=$threadcnt / 8 / $ncpu . "-core 8-thread $cputype"; | ||
2501 | 2294 | $cpucnt{"$cputype $cpufreq"}=$ncpu; | ||
2502 | 2295 | } elsif ($cputype =~ /SPARC64-VI\b/) { | ||
2503 | 2296 | # Count dual-core dual-thread Olympus-C SPARC64-VI CPUs as 1 CPU | ||
2504 | 2297 | $ncpu=$threadcnt / 4; | ||
2505 | 2298 | $cputype="dual-core dual-thread SPARC64-VI"; | ||
2506 | 2299 | if (defined($arg)) { | ||
2507 | 2300 | $cnt=$ncpu; | ||
2508 | 2301 | return; | ||
2509 | 2302 | } | ||
2510 | 2303 | $cpucnt{"$cputype $cpufreq"}=$ncpu; | ||
2511 | 2304 | } elsif ($cputype =~ /SPARC64-VII\b/) { | ||
2512 | 2305 | # Count quad-core dual-thread Jupiter SPARC64-VII CPUs as 1 CPU | ||
2513 | 2306 | $ncpu=$threadcnt / 8; | ||
2514 | 2307 | $cputype="quad-core dual-thread SPARC64-VII"; | ||
2515 | 2308 | if (defined($arg)) { | ||
2516 | 2309 | $cnt=$ncpu; | ||
2517 | 2310 | return; | ||
2518 | 2311 | } | ||
2519 | 2312 | $cpucnt{"$cputype $cpufreq"}=$ncpu; | ||
2520 | 2313 | } elsif ($cputype =~ /SPARC64-VII\+\b/) { | ||
2521 | 2314 | # Count quad-core dual-thread Jupiter+ SPARC64-VII+ CPUs as 1 CPU | ||
2522 | 2315 | $ncpu=$threadcnt / 8; | ||
2523 | 2316 | $cputype="quad-core dual-thread SPARC64-VII+"; | ||
2524 | 2317 | if (defined($arg)) { | ||
2525 | 2318 | $cnt=$ncpu; | ||
2526 | 2319 | return; | ||
2527 | 2320 | } | ||
2528 | 2321 | $cpucnt{"$cputype $cpufreq"}=$ncpu; | ||
2529 | 2322 | } elsif ($cputype =~ /SPARC64-VIII\b/) { | ||
2530 | 2323 | # Guess on the Venus SPARC64-VIII name ??? | ||
2531 | 2324 | # Count 8-core dual-thread Venus SPARC64-VIII CPUs as 1 CPU | ||
2532 | 2325 | $ncpu=$threadcnt / 16; | ||
2533 | 2326 | $cputype="8-core dual-thread SPARC64-VIII"; | ||
2534 | 2327 | if (defined($arg)) { | ||
2535 | 2328 | $cnt=$ncpu; | ||
2536 | 2329 | return; | ||
2537 | 2330 | } | ||
2538 | 2331 | $cpucnt{"$cputype $cpufreq"}=$ncpu; | ||
2539 | 2332 | } | ||
2540 | 2333 | } | ||
2541 | 2334 | |||
2542 | 2335 | sub x86multicorecnt { | ||
2543 | 2336 | $_=shift; | ||
2544 | 2337 | return if (! defined($_)); | ||
2545 | 2338 | $corecnt=2 if (/\bDual.Core/i || /\bTwo.Core/i); | ||
2546 | 2339 | $corecnt=3 if (/\bTriple.Core/i || /\bThree.Core/i); | ||
2547 | 2340 | $corecnt=4 if (/\bQuad.Core/i || /\bFour.Core/i); | ||
2548 | 2341 | $corecnt=6 if (/\bHex.Core/i || /\bSix.Core/i); | ||
2549 | 2342 | $corecnt=8 if (/\bOctal.Core/i || /\bEight.Core/i); | ||
2550 | 2343 | $corecnt=12 if (/\bTwelve.Core/i); | ||
2551 | 2344 | } | ||
2552 | 2345 | |||
2553 | 2346 | sub checkX86 { | ||
2554 | 2347 | $isX86=1 if ($model eq "i86pc" || $machine eq "i86pc" || $model eq "i86xpv" || $machine eq "i86xpv"); | ||
2555 | 2348 | # Use CPU count from prtdiag (ndcpu) and thread count from psrinfo to | ||
2556 | 2349 | # get core count per cpu for i86xpv | ||
2557 | 2350 | $use_psrinfo_data=2 if ($model eq "i86xpv" || $machine eq "i86xpv"); | ||
2558 | 2351 | } | ||
2559 | 2352 | |||
2560 | 2353 | sub check_psrinfo { | ||
2561 | 2354 | return if ($psrinfo_checked); | ||
2562 | 2355 | print &runtime . "in check_psrinfo, ndcpu=$ndcpu, npcpu=$npcpu, nvcpu=$nvcpu\n" if ($DEBUG); | ||
2563 | 2356 | $psrinfo_checked=1; | ||
2564 | 2357 | return if ($nvcpu); | ||
2565 | 2358 | return if (! $use_psrinfo_data); | ||
2566 | 2359 | if ($filename) { | ||
2567 | 2360 | $npcpu=0; | ||
2568 | 2361 | foreach $line (@psrinfo) { | ||
2569 | 2362 | $line=&dos2unix($line); | ||
2570 | 2363 | # May have "psrinfo -p -v" output in regression test | ||
2571 | 2364 | # file that has number of virtual CPUs. Assumes all | ||
2572 | 2365 | # CPUs are same. | ||
2573 | 2366 | if ($line =~ /.+ \d+ virtual processor/) { | ||
2574 | 2367 | $nvcpu=&mychomp($line); | ||
2575 | 2368 | $nvcpu=~s/.+ processor has //; | ||
2576 | 2369 | $nvcpu=~s/ virtual processor.+//; | ||
2577 | 2370 | $corecnt=$nvcpu if ($nvcpu >= 2); | ||
2578 | 2371 | $corecnt /= 2 if ($hyperthread); | ||
2579 | 2372 | if ($use_psrinfo_data == 2 && $ndcpu > 1) { | ||
2580 | 2373 | $corecnt /= $ndcpu; | ||
2581 | 2374 | $npcpu=$ndcpu; | ||
2582 | 2375 | } else { | ||
2583 | 2376 | $npcpu++; | ||
2584 | 2377 | } | ||
2585 | 2378 | $cpucntfrom="psrinfo" if ($cpucntfrom ne "ldm"); | ||
2586 | 2379 | $cpucntflag="0"; # reset flag | ||
2587 | 2380 | } | ||
2588 | 2381 | } | ||
2589 | 2382 | } elsif ($psrinfo_cmd ne "") { | ||
2590 | 2383 | $ncpu=&mychomp(`$psrinfo_cmd | wc -l`); # physical & virtual CPUs | ||
2591 | 2384 | $ncpu=~s/\s+//; | ||
2592 | 2385 | $npcpu=&mychomp(`$psrinfo_cmd -p 2>/dev/null`); # physical CPUs | ||
2593 | 2386 | if ($npcpu eq "") { | ||
2594 | 2387 | $npcpu=$ncpu; | ||
2595 | 2388 | $nvcpu=1; | ||
2596 | 2389 | } else { | ||
2597 | 2390 | # Find number of virtual CPUs | ||
2598 | 2391 | @tmp=`$psrinfo_cmd -p -v`; | ||
2599 | 2392 | foreach $line (@tmp) { | ||
2600 | 2393 | $line=&dos2unix($line); | ||
2601 | 2394 | if ($line =~ /.+ \d+ virtual processor/) { | ||
2602 | 2395 | $nvcpu=&mychomp($line); | ||
2603 | 2396 | $nvcpu=~s/.+ processor has //; | ||
2604 | 2397 | $nvcpu=~s/ virtual processor.+//; | ||
2605 | 2398 | $corecnt=$nvcpu if ($nvcpu >= 2); | ||
2606 | 2399 | $corecnt /= 2 if ($hyperthread); | ||
2607 | 2400 | if ($use_psrinfo_data == 2 && $ndcpu > 1) { | ||
2608 | 2401 | $corecnt /= $ndcpu; | ||
2609 | 2402 | $npcpu=$ndcpu; | ||
2610 | 2403 | } | ||
2611 | 2404 | } | ||
2612 | 2405 | } | ||
2613 | 2406 | if ($cputype eq "x86") { | ||
2614 | 2407 | if ($tmp[2] =~ /.+Hz/ || $tmp[2] =~ /\bAMD .* Processor /) { | ||
2615 | 2408 | $cputype=&mychomp($tmp[2]); | ||
2616 | 2409 | $cputype=~s/ CPU / /; | ||
2617 | 2410 | $cputype=~s/\s+/ /g; | ||
2618 | 2411 | $cputype=~s/^\s+//; | ||
2619 | 2412 | $cputype=~s/\s+$//; | ||
2620 | 2413 | $cputype_psrinfo=$cputype; | ||
2621 | 2414 | } | ||
2622 | 2415 | } | ||
2623 | 2416 | } | ||
2624 | 2417 | @tmp=`$psrinfo_cmd -v`; | ||
2625 | 2418 | if ($tmp[2] =~ /MHz/) { | ||
2626 | 2419 | $cpufreq=&mychomp($tmp[2]); | ||
2627 | 2420 | $cpufreq=~s/.+ operates at //; | ||
2628 | 2421 | $cpufreq=~s/ MHz.+//; | ||
2629 | 2422 | } | ||
2630 | 2423 | $cpucntfrom="psrinfo" if ($cpucntfrom ne "ldm"); | ||
2631 | 2424 | $have_psrinfo_data=1; | ||
2632 | 2425 | } | ||
2633 | 2426 | } | ||
2634 | 2427 | |||
2635 | 2428 | sub get_mfg { | ||
2636 | 2429 | $_=shift; | ||
2637 | 2430 | return "" if (! defined($_)); | ||
2638 | 2431 | s/Manufacturer: *//ig; | ||
2639 | 2432 | if (/JEDEC ID:/) { | ||
2640 | 2433 | s/JEDEC ID://g; | ||
2641 | 2434 | s/ //g; | ||
2642 | 2435 | } | ||
2643 | 2436 | s/^\s*//; | ||
2644 | 2437 | s/^0x//; | ||
2645 | 2438 | return "" if (/^$/ || /^\r$/ || /^FFFFFFFFFFFF/i || /Manufacturer\d/i); | ||
2646 | 2439 | # Based on JEDEC JEP106-X | ||
2647 | 2440 | return "AMD" if (/^01/ || /^8001/); | ||
2648 | 2441 | return "AMI" if (/^02/ || /^8002/); | ||
2649 | 2442 | return "Fujitsu" if (/^04/ || /^8004/ || /Fujitsu/i); | ||
2650 | 2443 | return "Elpida" if (/^0500/ || /Elpida/i); # Hack | ||
2651 | 2444 | return "Hitachi" if (/^07/ || /^8007/ || /Hitachi/i); | ||
2652 | 2445 | return "Inmos" if (/^08/ || /^8008/ || /Inmos/i); | ||
2653 | 2446 | return "Intersil" if (/^0B/i || /^800B/i || /Intersil/i); | ||
2654 | 2447 | return "Mostek" if (/^0D/i || /^800D/i || /Mostek/i); | ||
2655 | 2448 | return "Freescale (Motorola)" if (/^0E/i || /^800E/i || /Freescale/i || /Motorola/i); | ||
2656 | 2449 | return "NEC" if (/^10/ || /^8010/); | ||
2657 | 2450 | return "Conexant (Rockwell)" if (/^13/ || /^8013/ || /Conexant/i || /Rockwell/i); | ||
2658 | 2451 | return "NXP (Philips Semi, Signetics)" if (/^15/ || /^8015/ || /Philips Semi/i || /Signetics/i); | ||
2659 | 2452 | return "Synertek" if (/^16/ || /^8016/ || /Synertek/i); | ||
2660 | 2453 | return "Xicor" if (/^19/ || /^8019/ || /Xicor/i); | ||
2661 | 2454 | return "Zilog" if (/^1A/i || /^801A/i || /Zilog/i); | ||
2662 | 2455 | return "Mitsubishi" if (/^1C/i || /^801C/i || /Mitsubishi/i); | ||
2663 | 2456 | return "Micron Technology" if (/^2C/i || /^802C/i || /Micron Technology/i); | ||
2664 | 2457 | return "ProMOS/Mosel Vitelic" if (/^40/ || /^8040/ || /ProMOS/i || /Mosel Vitelic/i); | ||
2665 | 2458 | return "Goldenram" if (/^6A/i || /^806A/i || /Goldenram/i); | ||
2666 | 2459 | return "Nanya Technology" if (/^7F7F7F0B/i || /^830B/i || /Nanya/i); # Hack | ||
2667 | 2460 | return "Fairchild" if (/^83/ || /^8083/ || /Fairchild/i); | ||
2668 | 2461 | return "Numonyx (Intel)" if (/^89/ || /^8089/ || /Numonyx/i || /Intel/i); | ||
2669 | 2462 | return "DATARAM" if (/^91/ || /^8091/); | ||
2670 | 2463 | return "Toshiba" if (/^98/ || /^8098/ || /Toshiba/i); | ||
2671 | 2464 | return "IBM" if (/^A4/i || /^80A4/); | ||
2672 | 2465 | return "Hynix Semiconductor (Hyundai Electronics)" if (/^AD/i || /^80AD/i || /Hynix/i || /Hyundai/i); | ||
2673 | 2466 | return "Infineon (Siemens)" if (/^C1/i || /^80C1/ || /^7F7F7F7F7F51/i || /Infineon/i || /Siemens/i); | ||
2674 | 2467 | return "Samsung" if (/^CE/i || /^80CE/i || /Samsung/i); | ||
2675 | 2468 | return "Winbond Electronics" if (/^DE/i || /^80DE/i || /Winbond/i); | ||
2676 | 2469 | return "LG Semiconductor (Goldstar)" if (/^E0/i || /^80E0/i || /LG Semi/i || /Goldstar/i); | ||
2677 | 2470 | return "Micron CMS" if (/^7F45/i || /Micron CMS/i); | ||
2678 | 2471 | return "Kingston" if (/^7F98/i || /Kingston/i); | ||
2679 | 2472 | return "Ramaxel Technology" if (/^7F7F7F7F43/i || /Ramaxel/i); # Hack | ||
2680 | 2473 | return &mychomp($_); | ||
2681 | 2474 | } | ||
2682 | 2475 | |||
2683 | 2476 | # See if CPUs and memory modules are listed in "ipmitool fru" output | ||
2684 | 2477 | sub check_ipmitool { | ||
2685 | 2478 | print &runtime . "in check_ipmitool\n" if ($DEBUG); | ||
2686 | 2479 | return if ("$ipmitool_cmd" eq "" && $filename eq ""); | ||
2687 | 2480 | $cputype2=""; | ||
2688 | 2481 | $mem_mfg=""; | ||
2689 | 2482 | $mem_model=""; | ||
2690 | 2483 | foreach $line (@ipmitool) { | ||
2691 | 2484 | $line=&dos2unix($line); | ||
2692 | 2485 | $line=&mychomp($line); | ||
2693 | 2486 | if ($line =~ /^ *$/) { | ||
2694 | 2487 | # store cpu and memory modules in hash | ||
2695 | 2488 | if ($flag_cpu) { | ||
2696 | 2489 | if ($cputype2 ne "") { | ||
2697 | 2490 | $cputype2=~s/DUAL.CORE/Dual Core/; | ||
2698 | 2491 | $cputype2=~s/QUAD.CORE/Quad Core/; | ||
2699 | 2492 | $cputype2=~s/-Core/ Core/; | ||
2700 | 2493 | $cputype2=~s/OPTERON\(TM\) PROCESSOR/Opteron\(tm\) Processor/; | ||
2701 | 2494 | $ipmi_cputype="$cputype2"; | ||
2702 | 2495 | $ipmi_cpu_cnt++; | ||
2703 | 2496 | } | ||
2704 | 2497 | } | ||
2705 | 2498 | if ($flag_mem && $socket ne "") { | ||
2706 | 2499 | $ipmi_mem{"$socket"}=("$mem_mfg$mem_model" ne "") ? "$mem_mfg $mem_model" : ""; | ||
2707 | 2500 | } | ||
2708 | 2501 | $flag_cpu=0; # End of CPU section | ||
2709 | 2502 | $flag_mem=0; # End of memory section | ||
2710 | 2503 | $cputype2=""; | ||
2711 | 2504 | $mem_mfg=""; | ||
2712 | 2505 | $mem_model=""; | ||
2713 | 2506 | } | ||
2714 | 2507 | if ($line =~ / cpu\d+\.vpd / || $line =~ / p\d+\.fru /) { | ||
2715 | 2508 | $flag_cpu=1; # Start of CPU section | ||
2716 | 2509 | $socket=$line; | ||
2717 | 2510 | $socket=~s/^.*: +(.*\S)\.[vf][pr][du].*$/$1/; | ||
2718 | 2511 | } | ||
2719 | 2512 | if ($flag_cpu && ($line =~ / Product Name /)) { | ||
2720 | 2513 | $cputype2=$line; | ||
2721 | 2514 | $cputype2=~s/^.*: +(.*\S) *$/$1/; | ||
2722 | 2515 | &x86multicorecnt($cputype2); | ||
2723 | 2516 | } | ||
2724 | 2517 | if ($line =~ / cpu\d+\.mem\d+\.vpd / || $line =~ / p\d+\.d\d+\.fru /) { | ||
2725 | 2518 | $flag_mem=1; # Start of memory module section | ||
2726 | 2519 | $socket=$line; | ||
2727 | 2520 | $socket=~s/^.*: +(.*\S)\.[vf][pr][du].*$/$1/; | ||
2728 | 2521 | } | ||
2729 | 2522 | if ($flag_mem && ($line =~ / Product Manufacturer /)) { | ||
2730 | 2523 | $mem_mfg=$line; | ||
2731 | 2524 | $mem_mfg=~s/^.*: +(.*\S) *$/$1/; | ||
2732 | 2525 | $mem_mfg=&get_mfg($mem_mfg); | ||
2733 | 2526 | } | ||
2734 | 2527 | if ($flag_mem && ($line =~ / Product Name /)) { | ||
2735 | 2528 | $mem_model=$line; | ||
2736 | 2529 | $mem_model=~s/^.*: +(.*\S) *$/$1/; | ||
2737 | 2530 | $mem_model=~s/ ADDRESS\/COMMAND//; | ||
2738 | 2531 | $mem_model=~s/PARITY/Parity/; | ||
2739 | 2532 | } | ||
2740 | 2533 | } | ||
2741 | 2534 | # Is ipmitool CPU count better? | ||
2742 | 2535 | # print &runtime . "ipmi_cpu_cnt=$ipmi_cpu_cnt\n" if ($DEBUG); | ||
2743 | 2536 | if ($ncpu != $ipmi_cpu_cnt && $npcpu == 0 && $ipmi_cpu_cnt != 0) { | ||
2744 | 2537 | $ncpu=$ipmi_cpu_cnt; | ||
2745 | 2538 | $npcpu=$ipmi_cpu_cnt; | ||
2746 | 2539 | $cpucntfrom="ipmitool"; | ||
2747 | 2540 | $cpucnt{"$cputype $cpufreq"}=$ipmi_cpu_cnt; | ||
2748 | 2541 | } | ||
2749 | 2542 | # Did ipmitool find a better cputype? | ||
2750 | 2543 | if (&lc($cputype) ne &lc($ipmi_cputype) && $ipmi_cputype ne "") { | ||
2751 | 2544 | # rewrite %cpucnt $cputype with cputype | ||
2752 | 2545 | while (($cf,$cnt)=each(%cpucnt)) { | ||
2753 | 2546 | $cf=~/^(.*) (\d+)$/; | ||
2754 | 2547 | $cpufreq=$2; | ||
2755 | 2548 | delete $cpucnt{"$1 $2"}; | ||
2756 | 2549 | } | ||
2757 | 2550 | $cpucnt{"$ipmi_cputype $cpufreq"}=$ipmi_cpu_cnt; | ||
2758 | 2551 | } | ||
2759 | 2552 | } | ||
2760 | 2553 | |||
2761 | 2554 | # Check for logical domains | ||
2762 | 2555 | sub check_for_LDOM { | ||
2763 | 2556 | print &runtime . "in check_for_LDOM\n" if ($DEBUG); | ||
2764 | 2557 | # Handle control domain on UltraSPARC-T1 and UltraSPARC-T2 systems | ||
2765 | 2558 | if ($ldm_cmd ne "" && $have_ldm_data == 0) { | ||
2766 | 2559 | @ldm=&run("$ldm_cmd list-devices -a -p"); | ||
2767 | 2560 | $have_ldm_data=1; | ||
2768 | 2561 | } | ||
2769 | 2562 | if ($have_ldm_data) { | ||
2770 | 2563 | $threadcnt=0; | ||
2771 | 2564 | foreach $line (@ldm) { | ||
2772 | 2565 | $line=&dos2unix($line); | ||
2773 | 2566 | $line=&mychomp($line); | ||
2774 | 2567 | &check_LDOM; | ||
2775 | 2568 | # Count virtual CPUs | ||
2776 | 2569 | $threadcnt++ if ($line =~ /^\|pid=\d/); | ||
2777 | 2570 | if ($line =~ /^\|pa=\d.*\|size=\d/) { | ||
2778 | 2571 | # Add up total memory found in ldm output | ||
2779 | 2572 | $sz=$line; | ||
2780 | 2573 | $sz=~s/^.*size=(\d*).*/$1/; | ||
2781 | 2574 | $ldm_memory += $sz; | ||
2782 | 2575 | } | ||
2783 | 2576 | } | ||
2784 | 2577 | if ($threadcnt > 0) { | ||
2785 | 2578 | # VCPUs found in ldm output | ||
2786 | 2579 | delete $cpucnt{"$cputype $cpufreq"}; | ||
2787 | 2580 | print &runtime . "ldm: ncpu=$ncpu, npcpu=$npcpu\n" if ($DEBUG); | ||
2788 | 2581 | $cpucntfrom="ldm"; | ||
2789 | 2582 | &multicore_cpu_cnt; | ||
2790 | 2583 | } | ||
2791 | 2584 | $installed_memory=$ldm_memory / $meg if ($ldm_memory > 0); | ||
2792 | 2585 | } | ||
2793 | 2586 | # Handle guest domains on UltraSPARC-T1 and UltraSPARC-T2 systems | ||
2794 | 2587 | if ($cfgadm_cmd ne "" && $have_cfgadm_data == 0) { | ||
2795 | 2588 | @cfgadm=&run("$cfgadm_cmd -al"); | ||
2796 | 2589 | $have_cfgadm_data=1; | ||
2797 | 2590 | } | ||
2798 | 2591 | if ($have_cfgadm_data) { | ||
2799 | 2592 | foreach $line (@cfgadm) { | ||
2800 | 2593 | $line=&dos2unix($line); | ||
2801 | 2594 | if ($line =~ /Configuration administration not supported/) { | ||
2802 | 2595 | # Hack: Assume cfgadm fails on guest domains. | ||
2803 | 2596 | &found_guest_LDOM; | ||
2804 | 2597 | exit 1; | ||
2805 | 2598 | } | ||
2806 | 2599 | } | ||
2807 | 2600 | } | ||
2808 | 2601 | } | ||
2809 | 2602 | |||
2810 | 2603 | sub check_LDOM { | ||
2811 | 2604 | if ($line =~ /Authorization failed/i || $line =~ /Connection refused/i) { | ||
2812 | 2605 | if ($uid eq "0") { | ||
2813 | 2606 | # No LDOMs configured | ||
2814 | 2607 | $ldm_cmd=""; | ||
2815 | 2608 | $have_ldm_data=0; | ||
2816 | 2609 | } else { | ||
2817 | 2610 | &found_guest_LDOM(""); | ||
2818 | 2611 | print "ERROR: ldm: $line\n"; | ||
2819 | 2612 | print " This user does not have permission to run '/opt/SUNWldm/bin/ldm'.\n"; | ||
2820 | 2613 | print " Run memconf as a privileged user like root on the control domain.\n"; | ||
2821 | 2614 | exit 1; | ||
2822 | 2615 | } | ||
2823 | 2616 | } | ||
2824 | 2617 | } | ||
2825 | 2618 | |||
2826 | 2619 | sub found_guest_LDOM { | ||
2827 | 2620 | # Rewrite cputype and cpucnt hash since I don't | ||
2828 | 2621 | # know how many cores the guest domain host has | ||
2829 | 2622 | if ($cputype =~ /UltraSPARC-T1\b/) { | ||
2830 | 2623 | delete $cpucnt{"$cputype $cpufreq"}; | ||
2831 | 2624 | $cputype="UltraSPARC-T1"; | ||
2832 | 2625 | $cpucnt{"$cputype $cpufreq"}=1; | ||
2833 | 2626 | } elsif ($cputype =~ /UltraSPARC-T2\+/) { | ||
2834 | 2627 | delete $cpucnt{"$cputype $cpufreq"}; | ||
2835 | 2628 | $cputype="UltraSPARC-T2+"; | ||
2836 | 2629 | $cpucnt{"$cputype $cpufreq"}=1; | ||
2837 | 2630 | } elsif ($cputype =~ /UltraSPARC-T2\b/) { | ||
2838 | 2631 | delete $cpucnt{"$cputype $cpufreq"}; | ||
2839 | 2632 | $cputype="UltraSPARC-T2"; | ||
2840 | 2633 | $cpucnt{"$cputype $cpufreq"}=1; | ||
2841 | 2634 | } | ||
2842 | 2635 | &show_header; | ||
2843 | 2636 | $arg=shift; | ||
2844 | 2637 | return if (defined($arg)); | ||
2845 | 2638 | print "ERROR: Guest Logical Domain (LDOM) detected.\n"; | ||
2846 | 2639 | print " Run memconf on the control domain. It will not work on guest domains.\n"; | ||
2847 | 2640 | } | ||
2848 | 2641 | |||
2849 | 2642 | sub check_smbios { | ||
2850 | 2643 | print &runtime . "in check_smbios\n" if ($DEBUG); | ||
2851 | 2644 | $flag_smb_memdevice=0; | ||
2852 | 2645 | foreach $line (@smbios) { | ||
2853 | 2646 | $line=&dos2unix($line); | ||
2854 | 2647 | $line=&mychomp($line); | ||
2855 | 2648 | if ($line =~ /SMB_TYPE_MEMDEVICE/) { | ||
2856 | 2649 | $mem_mfg=""; | ||
2857 | 2650 | $socket=""; | ||
2858 | 2651 | $pn=""; | ||
2859 | 2652 | $simmsize=0; | ||
2860 | 2653 | $memtype=""; | ||
2861 | 2654 | $formfactor=""; | ||
2862 | 2655 | $flag_smb_memdevice=1; | ||
2863 | 2656 | } | ||
2864 | 2657 | if ($flag_smb_memdevice) { | ||
2865 | 2658 | if ($line =~ /Manufacturer:/) { | ||
2866 | 2659 | $mem_mfg=$line; | ||
2867 | 2660 | $mem_mfg=~s/^ *Manufacturer: *//g; | ||
2868 | 2661 | $mem_mfg=&get_mfg($mem_mfg); | ||
2869 | 2662 | $mem_mfg .= " " if ($mem_mfg ne ""); | ||
2870 | 2663 | } | ||
2871 | 2664 | if ($line =~ /Location Tag:/) { | ||
2872 | 2665 | $socket=$line; | ||
2873 | 2666 | $socket=~s/^ *Location Tag: *//g; | ||
2874 | 2667 | } | ||
2875 | 2668 | if ($line =~ /Part Number:/) { | ||
2876 | 2669 | $pn=$line; | ||
2877 | 2670 | $pn=~s/^ *Part Number: *//g; | ||
2878 | 2671 | $pn=~s/\s*$//g; | ||
2879 | 2672 | $pn="" if ($pn =~ /^0xFF/ || $pn =~ /PartNum\d/i); | ||
2880 | 2673 | $pn .= " " if ($pn ne ""); | ||
2881 | 2674 | } | ||
2882 | 2675 | if ($line =~ /Size:/) { | ||
2883 | 2676 | $simmsize=$line; | ||
2884 | 2677 | $simmsize=~s/^ *Size: //g; | ||
2885 | 2678 | $simmsize=~s/ bytes//g; | ||
2886 | 2679 | $simmsize=0 if ($simmsize =~ /Not Populated/); | ||
2887 | 2680 | $simmsize /= $meg; | ||
2888 | 2681 | } | ||
2889 | 2682 | if ($line =~ /Memory Type:/) { | ||
2890 | 2683 | $memtype=$line; | ||
2891 | 2684 | $memtype=~s/^ *Memory Type:.*\((.*)\).*/$1/g; | ||
2892 | 2685 | $memtype="" if ($memtype =~ /Memory Type:/); | ||
2893 | 2686 | $memtype .= " " if ($formfactor ne ""); | ||
2894 | 2687 | } | ||
2895 | 2688 | if ($line =~ /Form Factor:/) { | ||
2896 | 2689 | $formfactor=$line; | ||
2897 | 2690 | $formfactor=~s/^ *Form Factor:.*\((.*)\).*/$1/g; | ||
2898 | 2691 | $formfactor="" if ($formfactor =~ /Form Factor:/); | ||
2899 | 2692 | } | ||
2900 | 2693 | if ($line =~ /Bank Locator:/ || $line =~ /^ *ID *SIZE *TYPE/) { | ||
2901 | 2694 | $bank_label=$line; | ||
2902 | 2695 | $bank_label=~s/^ *Bank Locator: *//g; | ||
2903 | 2696 | $bank_label="BANK $bank_label" if ($bank_label =~ /^.$/); | ||
2904 | 2697 | $bank_label="" if ($bank_label eq $socket); | ||
2905 | 2698 | $bank_label=", $bank_label" if ($bank_label ne ""); | ||
2906 | 2699 | $flag_smb_memdevice=0; | ||
2907 | 2700 | if ($socket ne "") { | ||
2908 | 2701 | $smbios_mem{"$socket"}=($simmsize) ? "$mem_mfg${simmsize}MB $pn$memtype$formfactor$bank_label" : ""; | ||
2909 | 2702 | $sockets_used=""; | ||
2910 | 2703 | } | ||
2911 | 2704 | } | ||
2912 | 2705 | } | ||
2913 | 2706 | } | ||
2914 | 2707 | $tmp=scalar(keys %smbios_mem); | ||
2915 | 2708 | if (defined($tmp)) { | ||
2916 | 2709 | if ($tmp > 0) { | ||
2917 | 2710 | &show_header; | ||
2918 | 2711 | for (sort keys %smbios_mem) { | ||
2919 | 2712 | if ($smbios_mem{$_} eq "") { | ||
2920 | 2713 | $sockets_empty .= "," if ($sockets_empty ne ""); | ||
2921 | 2714 | $sockets_empty .= " $_"; | ||
2922 | 2715 | } else { | ||
2923 | 2716 | print "socket $_: $smbios_mem{$_}\n"; | ||
2924 | 2717 | } | ||
2925 | 2718 | } | ||
2926 | 2719 | $totmem=$installed_memory; | ||
2927 | 2720 | &print_empty_memory("memory sockets"); | ||
2928 | 2721 | &finish; | ||
2929 | 2722 | exit; | ||
2930 | 2723 | } | ||
2931 | 2724 | } | ||
2932 | 2725 | } | ||
2933 | 2726 | |||
2934 | 2727 | sub found_empty_bank { | ||
2935 | 2728 | $empty_banks .= "," if ($empty_banks ne ""); | ||
2936 | 2729 | $boardslot_mem=~s/[: ]//g; | ||
2937 | 2730 | $empty_banks .= " Board $boardslot_mem @_"; | ||
2938 | 2731 | } | ||
2939 | 2732 | |||
2940 | 2733 | sub print_empty_memory { | ||
2941 | 2734 | $s=shift; | ||
2942 | 2735 | print "empty $s:"; | ||
2943 | 2736 | if ($sockets_empty ne "") { | ||
2944 | 2737 | print "$sockets_empty\n"; | ||
2945 | 2738 | } else { | ||
2946 | 2739 | print " None\n"; | ||
2947 | 2740 | } | ||
2948 | 2741 | } | ||
2949 | 2742 | |||
2950 | 2743 | sub found_nvsimm_bank { | ||
2951 | 2744 | $nvsimm_banks .= ", Board $boardslot_mem @_"; | ||
2952 | 2745 | } | ||
2953 | 2746 | |||
2954 | 2747 | sub recommend_prtdiag_patch { | ||
2955 | 2748 | # Sun BugID 4664349 | ||
2956 | 2749 | print " This may be corrected by installing "; | ||
2957 | 2750 | if ($osrel eq "5.9") { | ||
2958 | 2751 | print "Sun patch 113221-03 or 118558-06 or later.\n"; | ||
2959 | 2752 | } elsif ($osrel eq "5.8") { | ||
2960 | 2753 | print "Sun patch 109873-26 or 111792-11 or later.\n"; | ||
2961 | 2754 | } else { | ||
2962 | 2755 | print "a Sun patch on this system.\n"; | ||
2963 | 2756 | } | ||
2964 | 2757 | } | ||
2965 | 2758 | |||
2966 | 2759 | sub numerically { | ||
2967 | 2760 | $a <=> $b; | ||
2968 | 2761 | } | ||
2969 | 2762 | |||
2970 | 2763 | sub lc { | ||
2971 | 2764 | $s=shift; | ||
2972 | 2765 | return "" if (! defined($s)); | ||
2973 | 2766 | $s=~tr/[A-Z]/[a-z]/; | ||
2974 | 2767 | return $s; | ||
2975 | 2768 | } | ||
2976 | 2769 | |||
2977 | 2770 | sub dos2unix { | ||
2978 | 2771 | # Convert "CR LF" or "CR" to "LF" | ||
2979 | 2772 | $s=shift; | ||
2980 | 2773 | $s=~s/\r\n/\n/g; | ||
2981 | 2774 | $s=~s/\r/\n/g; | ||
2982 | 2775 | return $s; | ||
2983 | 2776 | } | ||
2984 | 2777 | |||
2985 | 2778 | sub convert_freq { | ||
2986 | 2779 | ($freqx)=@_; | ||
2987 | 2780 | if ($isX86) { | ||
2988 | 2781 | $freq=int(hex("0x$freqx") / 10000 + 0.5); | ||
2989 | 2782 | } else { | ||
2990 | 2783 | if ($freqx =~ /'/) { | ||
2991 | 2784 | $freqpack=$freqx; | ||
2992 | 2785 | $freqpack=~s/'//g; | ||
2993 | 2786 | @frequnpack=unpack("C*",$freqpack); | ||
2994 | 2787 | $freqx=""; | ||
2995 | 2788 | foreach $field (@frequnpack) { | ||
2996 | 2789 | $freqx.=sprintf("%02lx", $field); | ||
2997 | 2790 | } | ||
2998 | 2791 | if ($#frequnpack < 3) { | ||
2999 | 2792 | $freqx.="00"; | ||
3000 | 2793 | } | ||
3001 | 2794 | } | ||
3002 | 2795 | $freq=int(hex("0x$freqx") / 1000000 + 0.5); | ||
3003 | 2796 | } | ||
3004 | 2797 | return $freq; | ||
3005 | 2798 | } | ||
3006 | 2799 | |||
3007 | 2800 | sub mychomp { | ||
3008 | 2801 | # Used instead of chop or chomp for compatibility with perl4 and perl5 | ||
3009 | 2802 | ($a)=@_; | ||
3010 | 2803 | return "" if (! defined($a)); | ||
3011 | 2804 | $a=~s,$/$,,g; | ||
3012 | 2805 | return $a; | ||
3013 | 2806 | } | ||
3014 | 2807 | |||
3015 | 2808 | sub run { | ||
3016 | 2809 | print &runtime . "Running @_\n" if ($DEBUG); | ||
3017 | 2810 | `@_ 2>&1`; | ||
3018 | 2811 | } | ||
3019 | 2812 | |||
3020 | 2813 | sub runtime { | ||
3021 | 2814 | return "DEBUG time " . (time - $starttime) . ": "; | ||
3022 | 2815 | } | ||
3023 | 2816 | |||
3024 | 2817 | sub read_prtdiag_bank_table { | ||
3025 | 2818 | # prtdiag Bank Table | ||
3026 | 2819 | $simmsize=substr($line,33,5); | ||
3027 | 2820 | if ($simmsize =~ /\dGB/) { | ||
3028 | 2821 | $simmsize=~s/GB//g; | ||
3029 | 2822 | $simmsize *= 1024; | ||
3030 | 2823 | } else { | ||
3031 | 2824 | $simmsize=~s/MB//g; | ||
3032 | 2825 | } | ||
3033 | 2826 | if (($prtdiag_banktable_has_dimms == 0) || ($line =~ / 0$/)) { | ||
3034 | 2827 | # Interleave Way = 0 | ||
3035 | 2828 | $simmsize /= 2; | ||
3036 | 2829 | } | ||
3037 | 2830 | if (($prtdiag_banktable_has_dimms == 1) && ($line =~ / 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15/)) { | ||
3038 | 2831 | # Interleave Way = 16 | ||
3039 | 2832 | $simmsize *= 4; | ||
3040 | 2833 | $intcnt=1; | ||
3041 | 2834 | push(@simmsizesfound, "$simmsize"); | ||
3042 | 2835 | } elsif ($intcnt > 0) { | ||
3043 | 2836 | # Interleave Way = 16 | ||
3044 | 2837 | $intcnt++; | ||
3045 | 2838 | $simmsize *= 4; | ||
3046 | 2839 | } | ||
3047 | 2840 | $a=substr($line,9,2); | ||
3048 | 2841 | $a=~s/ //g; | ||
3049 | 2842 | $b=substr($line,23,1); | ||
3050 | 2843 | $sz=&show_memory_label($simmsize); | ||
3051 | 2844 | $grpsize{$a,$b}=$sz; | ||
3052 | 2845 | $memlength=length($line); | ||
3053 | 2846 | if ($memlength > 49) { | ||
3054 | 2847 | $grpinterleave{$a,$b}=substr($line,49,40) if (substr($line,49,40) ne ""); | ||
3055 | 2848 | } | ||
3056 | 2849 | if ($intcnt == 0) { | ||
3057 | 2850 | push(@simmsizesfound, "$simmsize"); | ||
3058 | 2851 | $simmsize=&show_memory_label($simmsize) . " "; | ||
3059 | 2852 | if ($prtdiag_banktable_has_dimms == 0) { | ||
3060 | 2853 | $newline=substr($line,0,38) . " 2x" . substr($simmsize,0,5); | ||
3061 | 2854 | $newline .= substr($line,42,20) if ($memlength > 38); | ||
3062 | 2855 | } | ||
3063 | 2856 | } | ||
3064 | 2857 | $intcnt=1 if (($prtdiag_banktable_has_dimms == 1) && ($line =~ / 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15/)); | ||
3065 | 2858 | $intcnt=0 if ($intcnt == 16); | ||
3066 | 2859 | } | ||
3067 | 2860 | |||
3068 | 2861 | sub read_prtdiag_memory_segment_table { | ||
3069 | 2862 | # prtdiag Memory Segment Table | ||
3070 | 2863 | $simmsize=($line =~ /\dGB/) ? substr($line,19,1) * 512 : substr($line,19,3) / 2; | ||
3071 | 2864 | $grp=substr($line,-2,2); | ||
3072 | 2865 | $grp=~s/ //g; | ||
3073 | 2866 | if ($grp eq "-") { | ||
3074 | 2867 | $grp=$grpcnt; | ||
3075 | 2868 | $grpcnt++; | ||
3076 | 2869 | } | ||
3077 | 2870 | push(@simmsizesfound, "$simmsize"); | ||
3078 | 2871 | $simmsize=&show_memory_label($simmsize); | ||
3079 | 2872 | $grpsize{0,$grp}=$simmsize; | ||
3080 | 2873 | } | ||
3081 | 2874 | |||
3082 | 2875 | $motherboard=""; | ||
3083 | 2876 | $realmodel=""; | ||
3084 | 2877 | $manufacturer=""; | ||
3085 | 2878 | $i=0; | ||
3086 | 2879 | # May not have had permission to run prtconf, so see if prtdiag works | ||
3087 | 2880 | &check_for_prtdiag; | ||
3088 | 2881 | if ($diagbanner) { | ||
3089 | 2882 | $diagbanner=~s/\s+$//; | ||
3090 | 2883 | if ($filename eq "" || $SUNWexplo) { | ||
3091 | 2884 | $model=$platform; | ||
3092 | 2885 | $model=~s/SUNW,//g; | ||
3093 | 2886 | } else { | ||
3094 | 2887 | $model=$diagbanner; | ||
3095 | 2888 | $model=~s/ /-/g; | ||
3096 | 2889 | # define $model for systems with $diagbanner != $model | ||
3097 | 2890 | $model="Ultra-4" if ($diagbanner =~ /Sun.Enterprise.450\b/); | ||
3098 | 2891 | $model="Sun-Blade-1000" if ($diagbanner =~ /Sun.Blade.1000\b/); | ||
3099 | 2892 | $model="Sun-Fire-280R" if ($diagbanner =~ /Sun.Fire.280R\b/); | ||
3100 | 2893 | $model="Netra t1" if ($diagbanner =~ /Netra.t1\b/); | ||
3101 | 2894 | $model="Netra-T4" if ($diagbanner =~ /Netra.T4\b/); | ||
3102 | 2895 | $model="Sun-Blade-100" if ($diagbanner =~ /Sun.Blade.1[05]0\b/); | ||
3103 | 2896 | $model="Netra-T12" if ($diagbanner =~ /Sun.Fire.V1280\b/); | ||
3104 | 2897 | $model="Serverblade1" if ($diagbanner =~ /Serverblade1\b/); | ||
3105 | 2898 | $model="Ultra-Enterprise" if ($diagbanner =~ /Enterprise.E?[3-6][05]00\b/ || $diagbanner =~ /Enterprise.10000\b/); | ||
3106 | 2899 | } | ||
3107 | 2900 | # Check model and banner here in case we don't have prtconf data | ||
3108 | 2901 | &check_model; | ||
3109 | 2902 | &check_banner; | ||
3110 | 2903 | } | ||
3111 | 2904 | foreach $line (@config) { | ||
3112 | 2905 | $line=&dos2unix($line); | ||
3113 | 2906 | $line=&mychomp($line); | ||
3114 | 2907 | $config_permission=1 if ($line =~ /Node /); | ||
3115 | 2908 | if ($line =~ /Permission denied/i) { | ||
3116 | 2909 | $permission_error="ERROR: $line" if ($diagbanner eq "" || ! $prtdiag_has_mem); | ||
3117 | 2910 | } | ||
3118 | 2911 | &hpux_cstm if ($line =~ /cstm.*selclass qualifier /); # for HP-UX regression test file | ||
3119 | 2912 | if ($line =~ /banner-name:/ && $banner eq "") { | ||
3120 | 2913 | $banner=$line; | ||
3121 | 2914 | $banner=~s/\s+banner-name:\s+//; | ||
3122 | 2915 | $banner=~s/'//g; | ||
3123 | 2916 | $banner=~s/SUNW,//g; | ||
3124 | 2917 | $banner=~s/TWS,//g; | ||
3125 | 2918 | $banner=~s/CYCLE,//g; | ||
3126 | 2919 | &check_banner; | ||
3127 | 2920 | } | ||
3128 | 2921 | if ($line =~ /model:.*AXUS/) { | ||
3129 | 2922 | # AXUS clones with their name on OBP | ||
3130 | 2923 | $manufacturer="AXUS"; | ||
3131 | 2924 | } | ||
3132 | 2925 | if (($line =~ /SUNW,Ultra-/ || $line =~ /SUNW,SPARC/ || $line =~ /Sun.4/ || | ||
3133 | 2926 | $line =~ /SUNW,S240/ || $line =~ /SUNW,JavaEngine1/ || | ||
3134 | 2927 | $line =~ /SUNW,Ultra.*[Ee]ngine/ || $line =~ /SUNW,Ultra.*Netra*/ || | ||
3135 | 2928 | $line =~ /SUNW,Premier-24/ || $line =~ /SUNW,UltraAX-/ || | ||
3136 | 2929 | $line =~ /SUNW,Netra/ || $line =~ /\s+name:.*SUNW,Sun-/ || | ||
3137 | 2930 | $line =~ /SUNW,Grover/ || $line =~ /SUNW,Enchilada/ || | ||
3138 | 2931 | $line =~ /SUNW,Serverblade1/ || $line =~ /SUNW,Enterprise/ || | ||
3139 | 2932 | $line =~ /SUNW,A[0-9]/ || $line =~ /SUNW,T[0-9]/ || | ||
3140 | 2933 | $line =~ /\s+name:.*'i86pc'/ || $line =~ /^i86pc/ || $line =~ /^i86xpv/ || | ||
3141 | 2934 | $line =~ /model:\s+'SPARC CPU-/ || $line =~ /model:\s+'SPARC CPCI-/ || | ||
3142 | 2935 | $line =~ /SUNW,Axil-/ || $line =~ /\s+name:.*COMPstation/ || | ||
3143 | 2936 | $line =~ /\s+name:.*Tadpole/ || $line =~ /\s+name:.*Auspex/ || | ||
3144 | 2937 | $line =~ /\s+name:.*S-4/ || $line =~ /\s+name:.*FJSV,GP/ || | ||
3145 | 2938 | $line =~ /\s+name:.*CompuAdd/ || $line =~ /\s+name:.*RDI,/) && | ||
3146 | 2939 | $line !~ /\s+:Description\s+/ && $line !~ /\s+:*whoami:*\s+/ && | ||
3147 | 2940 | $line !~ /\s+:*impl-arch-name:*\s+/ && $line !~ /Sun 4x Quad/i) { | ||
3148 | 2941 | $model=$line; | ||
3149 | 2942 | $model=~s/\s+name:\s+//; | ||
3150 | 2943 | $model=~s/\s+model:\s+//; | ||
3151 | 2944 | $model=~s/\s+:binding-name\s+//; | ||
3152 | 2945 | $model=~s/\s+:PlatformName\s+//; | ||
3153 | 2946 | $model=~s/'//g; | ||
3154 | 2947 | $model=~s/\s+$//; | ||
3155 | 2948 | &check_model; | ||
3156 | 2949 | if ($line =~ /CompuAdd/) { | ||
3157 | 2950 | $manufacturer="CompuAdd"; | ||
3158 | 2951 | if ($model eq "SS-2") { | ||
3159 | 2952 | $banner=$model if ($banner eq ""); | ||
3160 | 2953 | $bannermore="SPARCstation 2"; | ||
3161 | 2954 | $modelmore="SPARCstation 2"; | ||
3162 | 2955 | } | ||
3163 | 2956 | } | ||
3164 | 2957 | } | ||
3165 | 2958 | $foundname=1 if ($line =~ /\s+name:\s+/); | ||
3166 | 2959 | if (($line =~ /\s+model:\s+'.+,/) && ($foundname == 0)) { | ||
3167 | 2960 | # Ultra 5/10 motherboard is 375-xxxx part number | ||
3168 | 2961 | # SS10/SS20 motherboard is Sxx,501-xxxx part number | ||
3169 | 2962 | if ($line =~ /,375-/ || $line =~ /,500-/ || $line =~ /,501-/) { | ||
3170 | 2963 | $motherboard=$line; | ||
3171 | 2964 | $motherboard=~s/\s+model:\s+//; | ||
3172 | 2965 | $motherboard=~s/'//g; | ||
3173 | 2966 | } | ||
3174 | 2967 | } | ||
3175 | 2968 | if ($line =~ /\sname:\s+'memory'/) { | ||
3176 | 2969 | $j=$i - 2; | ||
3177 | 2970 | if ($config[$j] =~ /\sreg:\s/) { | ||
3178 | 2971 | $gotmemory=&mychomp($config[$j]); | ||
3179 | 2972 | } elsif ($config[$j - 1] =~ /\sreg:\s/) { | ||
3180 | 2973 | $gotmemory=&mychomp($config[$j - 1]); | ||
3181 | 2974 | } elsif ($config[$j + 1] =~ /\sreg:\s/) { | ||
3182 | 2975 | $gotmemory=&mychomp($config[$j + 1]); | ||
3183 | 2976 | } | ||
3184 | 2977 | } | ||
3185 | 2978 | if ($line =~ /\sdevice_type:\s+'memory-bank'/) { | ||
3186 | 2979 | $j=$i - 3; | ||
3187 | 2980 | if ($config[$j] =~ /\sreg:\s/ && $config[$j] !~ /.00000000$/) { | ||
3188 | 2981 | $config[$j]=~s/\s+reg:\s+//; | ||
3189 | 2982 | $gotmemory=($gotmemory) ? "$gotmemory.$config[$j]" : $config[$j]; | ||
3190 | 2983 | $gotmemory=&mychomp($gotmemory); | ||
3191 | 2984 | } | ||
3192 | 2985 | } | ||
3193 | 2986 | # The following is not used yet | ||
3194 | 2987 | #if ($line =~ /\sdevice_type:\s+'memory-module'/) { | ||
3195 | 2988 | # if ($config[$i - 2] =~ /\sreg:\s/) { | ||
3196 | 2989 | # $config[$i - 3]=~s/\s+socket-name:\s+//; | ||
3197 | 2990 | # if ($gotmodule) { | ||
3198 | 2991 | # $gotmodule .= ".$config[$i - 3]"; | ||
3199 | 2992 | # } else { | ||
3200 | 2993 | # $gotmodule=$config[$i - 3]; | ||
3201 | 2994 | # } | ||
3202 | 2995 | # $gotmodule=&mychomp($gotmodule); | ||
3203 | 2996 | # $config[$i - 2]=~s/\s+reg:\s+//; | ||
3204 | 2997 | # @module=split(/\./, $config[$i - 2]); | ||
3205 | 2998 | # $gotmodule .= ".$module[3]"; | ||
3206 | 2999 | # $gotmodule=&mychomp($gotmodule); | ||
3207 | 3000 | # $config[$i + 1]=~s/\s+name:\s+//; | ||
3208 | 3001 | # $config[$i + 1] =~ y/[a-z]/[A-Z]/; | ||
3209 | 3002 | # $gotmodule .= ".$config[$i + 1]"; | ||
3210 | 3003 | # $gotmodule=&mychomp($gotmodule); | ||
3211 | 3004 | # $gotmodule=~s/'//g; | ||
3212 | 3005 | # } | ||
3213 | 3006 | #} | ||
3214 | 3007 | if ($line =~ /\ssimm-use:\s+/) { | ||
3215 | 3008 | # DIMM usage on Fujitsu GP7000 | ||
3216 | 3009 | $gotmodule=&mychomp($config[$i]); | ||
3217 | 3010 | $gotmodule=~s/\s+simm-use:\s+//; | ||
3218 | 3011 | $slotname0="SLOT0" if ($banner =~ /GP7000\b/); | ||
3219 | 3012 | } | ||
3220 | 3013 | if ($line =~ /\scomponent-name:\s+'.*CPU.*'/) { | ||
3221 | 3014 | # CPUs on Fujitsu GP7000F and PrimePower systems | ||
3222 | 3015 | $slotname=$line; | ||
3223 | 3016 | $slotname=~s/\s+component-name:\s+//; | ||
3224 | 3017 | $slotname=~s/'//g; | ||
3225 | 3018 | $gotcpunames=($gotcpunames) ? "$gotcpunames $slotname" : $slotname; | ||
3226 | 3019 | $boardname=$slotname; | ||
3227 | 3020 | $boardname=~s/-.*//g; | ||
3228 | 3021 | if ($boardname ne $slotname) { | ||
3229 | 3022 | if ($gotcpuboards) { | ||
3230 | 3023 | $gotcpuboards .= " $boardname" if ($gotcpuboards !~ /\b$boardname\b/); | ||
3231 | 3024 | } else { | ||
3232 | 3025 | $gotcpuboards=$boardname; | ||
3233 | 3026 | } | ||
3234 | 3027 | } | ||
3235 | 3028 | } | ||
3236 | 3029 | if ($line =~ /\sdevice_type:\s+'memory-module'/) { | ||
3237 | 3030 | # DIMM usage on Fujitsu GP7000F and PrimePower systems | ||
3238 | 3031 | $slotname=""; | ||
3239 | 3032 | if ($config[$i - 3] =~ /\scomponent-name:\s/) { | ||
3240 | 3033 | $slotname=$config[$i - 3]; | ||
3241 | 3034 | } | ||
3242 | 3035 | if ($config[$i - 4] =~ /\scomponent-name:\s/) { | ||
3243 | 3036 | $slotname=$config[$i - 4]; | ||
3244 | 3037 | } | ||
3245 | 3038 | if ($slotname ne "") { | ||
3246 | 3039 | $slotname=~s/\s+component-name:\s+//; | ||
3247 | 3040 | $slotname=~s/'//g; | ||
3248 | 3041 | $slotname=&mychomp($slotname); | ||
3249 | 3042 | $gotmodulenames=($gotmodulenames) ? "$gotmodulenames.$slotname" : $slotname; | ||
3250 | 3043 | $slotname0=$slotname if (! $slotname0); | ||
3251 | 3044 | $config[$i - 1]=~s/\s+reg:\s+//; | ||
3252 | 3045 | @module=split(/\./, $config[$i - 1]); | ||
3253 | 3046 | $gotmodulenames .= ".$module[1]"; | ||
3254 | 3047 | $gotmodulenames=&mychomp($gotmodulenames); | ||
3255 | 3048 | } | ||
3256 | 3049 | } | ||
3257 | 3050 | if ($line =~ /\sname:\s+'cgfourteen'/) { | ||
3258 | 3051 | # Determine size of VSIMM | ||
3259 | 3052 | # Currently assumes only one VSIMM is installed | ||
3260 | 3053 | if ($config[$i - 2] =~ /\sreg:\s/) { | ||
3261 | 3054 | $sx_line=&mychomp($config[$i - 2]); | ||
3262 | 3055 | } elsif ($config[$i - 3] =~ /\sreg:\s/) { | ||
3263 | 3056 | $sx_line=&mychomp($config[$i - 3]); | ||
3264 | 3057 | } | ||
3265 | 3058 | @sxline=split(/\./, $sx_line); | ||
3266 | 3059 | $sxmem=hex("0x$sxline[5]") / $meg; | ||
3267 | 3060 | } | ||
3268 | 3061 | if ($line =~ /501-2197/) { | ||
3269 | 3062 | # 1MB Prestoserve NVSIMMs (SS1000/SC2000) | ||
3270 | 3063 | if ($config[$i + 1] =~ /\sreg:\s/) { | ||
3271 | 3064 | $nv_line=&mychomp($config[$i + 1]); | ||
3272 | 3065 | } elsif ($config[$i + 2] =~ /\sreg:\s/) { | ||
3273 | 3066 | $nv_line=&mychomp($config[$i + 2]); | ||
3274 | 3067 | } | ||
3275 | 3068 | @nvline=split(/\./, $nv_line); | ||
3276 | 3069 | $nvmem += hex("0x$nvline[2]") / $meg; | ||
3277 | 3070 | } | ||
3278 | 3071 | if ($line =~ /501-2001/) { | ||
3279 | 3072 | # 2MB Prestoserve NVSIMMs (SS10/SS20) | ||
3280 | 3073 | if ($config[$i + 1] =~ /\sreg:\s/) { | ||
3281 | 3074 | $nv_line=&mychomp($config[$i + 1]); | ||
3282 | 3075 | } elsif ($config[$i + 2] =~ /\sreg:\s/) { | ||
3283 | 3076 | $nv_line=&mychomp($config[$i + 2]); | ||
3284 | 3077 | } | ||
3285 | 3078 | @nvline=split(/\./, $nv_line); | ||
3286 | 3079 | $nvmem += hex("0x$nvline[2]") / $meg; | ||
3287 | 3080 | $nvmem1=1 if ($nvline[1] eq "10000000"); | ||
3288 | 3081 | $nvmem2=1 if ($nvline[1] eq "14000000" || $nvline[1] eq "1c000000"); | ||
3289 | 3082 | } | ||
3290 | 3083 | if (($line =~ /Memory size:\s/) && ($installed_memory == 0)) { | ||
3291 | 3084 | $installed_memory=$line; | ||
3292 | 3085 | $installed_memory=~s/^.*size: *(\d*[GM]*[Bb]*).*/$1/; | ||
3293 | 3086 | if ($installed_memory =~ /GB/) { | ||
3294 | 3087 | $installed_memory=~s/GB//g; | ||
3295 | 3088 | $installed_memory *= 1024; | ||
3296 | 3089 | } else { | ||
3297 | 3090 | $installed_memory=~s/MB//ig; | ||
3298 | 3091 | } | ||
3299 | 3092 | # prtconf sometimes reports incorrect total memory | ||
3300 | 3093 | # 32MB is minimum for sun4u machines | ||
3301 | 3094 | if (($installed_memory < 32) && ($machine eq "sun4u")) { | ||
3302 | 3095 | $prtconf_warn="Incorrect total installed memory (${installed_memory}MB) was reported by prtconf."; | ||
3303 | 3096 | $installed_memory=0; | ||
3304 | 3097 | } | ||
3305 | 3098 | # Round up some odd-number total memory values | ||
3306 | 3099 | $installed_memory++ if (sprintf("%3d", ($installed_memory + 1) / 2 ) * 2 != $installed_memory && $installed_memory >= 1023); | ||
3307 | 3100 | $BSD=0; # prtconf and prtdiag only have this output | ||
3308 | 3101 | $config_cmd="/usr/sbin/prtconf -vp" if ($config_cmd !~ /prtconf/); | ||
3309 | 3102 | $config_command="prtconf"; | ||
3310 | 3103 | } | ||
3311 | 3104 | if (($sysfreq == 0) && ($freq > 0)) { | ||
3312 | 3105 | $sysfreq=$freq; | ||
3313 | 3106 | $freq=0; | ||
3314 | 3107 | } | ||
3315 | 3108 | if ($devtype eq "cpu" || $line =~ /compatible: 'FJSV,SPARC64-/) { | ||
3316 | 3109 | if ($cputype =~ /SPARC64-/) { | ||
3317 | 3110 | $cpufreq=$freq if ($freq > $cpufreq); | ||
3318 | 3111 | } else { | ||
3319 | 3112 | $cpufreq=$freq; | ||
3320 | 3113 | } | ||
3321 | 3114 | $cpuline=$line; | ||
3322 | 3115 | $j=$i - 3; | ||
3323 | 3116 | while ($cpuline !~ /^$/ && $cpuline !~ /^\r$/) { | ||
3324 | 3117 | if ($cpuline =~ /clock-frequency:/) { | ||
3325 | 3118 | @freq_line=split(' ', $cpuline); | ||
3326 | 3119 | $cpufreq=&convert_freq($freq_line[1]); | ||
3327 | 3120 | $sysfreq=$freq if (($sysfreq == 0) && ($freq > 0)); | ||
3328 | 3121 | } elsif (($cpuline =~ /\sname:\s/ || $cpuline =~ /\scompatible:\s/) && $cpuline !~ /Sun 4/ && $cpuline !~ /SPARCstation/ && $cpuline !~ /CompuAdd/ && $cpuline !~ /'cpu/ && $cpuline !~ /'core'/) { | ||
3329 | 3122 | $cputype=&mychomp($cpuline); | ||
3330 | 3123 | $cputype=~s/\s+name:\s+//; | ||
3331 | 3124 | $cputype=~s/\s+compatible:\s+//; | ||
3332 | 3125 | $cputype=~s/'//g; | ||
3333 | 3126 | $cputype=~s/SUNW,//g; | ||
3334 | 3127 | $cputype=~s/FJSV,//g; | ||
3335 | 3128 | $cputype=~s/ .*//g; | ||
3336 | 3129 | } | ||
3337 | 3130 | $j++; | ||
3338 | 3131 | $cpuline=($config[$j]) ? $config[$j] : ""; | ||
3339 | 3132 | } | ||
3340 | 3133 | $freq=0; | ||
3341 | 3134 | $cpufreq=$sysfreq if ($sysfreq >= $cpufreq); | ||
3342 | 3135 | print &runtime . "Checking cputype=$cputype, ncpu=$ncpu\n" if ($DEBUG); | ||
3343 | 3136 | if ($cputype eq "") { | ||
3344 | 3137 | $cputype=$machine; | ||
3345 | 3138 | $cputype="SPARC" if ($cputype =~ /^sun4/ || $model =~ /Sun 4\//); | ||
3346 | 3139 | @bannerarr=split(/\s/, $banner); | ||
3347 | 3140 | foreach $field (@bannerarr) { | ||
3348 | 3141 | if ($field =~ /SPARC/ && $field !~ /SPARCstation/) { | ||
3349 | 3142 | $cputype=$field; | ||
3350 | 3143 | } elsif ($field =~ /390Z5/) { | ||
3351 | 3144 | $field="TI,TMS$field" if ($field =~ /^390Z5/); | ||
3352 | 3145 | $cputype=($cpufreq > 70) ? "SuperSPARC-II $field" : "SuperSPARC $field"; | ||
3353 | 3146 | } elsif ($field =~ /RT62[56]/) { | ||
3354 | 3147 | $cputype="hyperSPARC $field"; | ||
3355 | 3148 | $machine="sun4m"; | ||
3356 | 3149 | } | ||
3357 | 3150 | } | ||
3358 | 3151 | $cputype=~s/[()]//g; | ||
3359 | 3152 | } elsif ($cputype =~ /MB86907/) { | ||
3360 | 3153 | $cputype="TurboSPARC-II $cputype"; | ||
3361 | 3154 | } elsif ($cputype =~ /MB86904/ || $cputype =~ /390S10/) { | ||
3362 | 3155 | $cputype=($cpufreq > 70) ? "microSPARC-II $cputype" : "microSPARC $cputype"; | ||
3363 | 3156 | } elsif ($cputype =~ /,RT62[56]/) { | ||
3364 | 3157 | $cputype="hyperSPARC $cputype"; | ||
3365 | 3158 | $machine="sun4m"; | ||
3366 | 3159 | } elsif ($cputype =~ /UltraSPARC-IV/) { | ||
3367 | 3160 | # Count dual-core US-IV & US-IV+ as 1 CPU | ||
3368 | 3161 | $cputype="dual-core $cputype"; | ||
3369 | 3162 | $machine="sun4u"; | ||
3370 | 3163 | $threadcnt++; | ||
3371 | 3164 | $threadcnt=0 if ($threadcnt == 2); | ||
3372 | 3165 | # CPU count is better from prtdiag than psrinfo for | ||
3373 | 3166 | # US-IV & US-IV+ dual-core processors. | ||
3374 | 3167 | $use_psrinfo_data=0; | ||
3375 | 3168 | } elsif ($cputype =~ /UltraSPARC-T1\b/) { | ||
3376 | 3169 | # Count 4-thread (4, 6, or 8 core) Niagara CPUs as 1 CPU | ||
3377 | 3170 | $machine="sun4v"; | ||
3378 | 3171 | $threadcnt++; | ||
3379 | 3172 | # Number of cores & CPUs counted outside this loop below | ||
3380 | 3173 | } elsif ($cputype =~ /UltraSPARC-T2\+/) { | ||
3381 | 3174 | # Count 8-thread (4, 6, or 8 core) Victoria Falls CPUs as 1 CPU | ||
3382 | 3175 | $machine="sun4v"; | ||
3383 | 3176 | $threadcnt++; | ||
3384 | 3177 | # Number of cores & CPUs counted outside this loop below | ||
3385 | 3178 | } elsif ($cputype =~ /UltraSPARC-T2\b/) { | ||
3386 | 3179 | # Count 8-thread (4 or 8 core) Niagara-II CPUs as 1 CPU | ||
3387 | 3180 | $machine="sun4v"; | ||
3388 | 3181 | $threadcnt++; | ||
3389 | 3182 | # Number of cores & CPUs counted outside this loop below | ||
3390 | 3183 | } elsif ($cputype =~ /SPARC64-VI\b/ && $devtype eq "cpu") { | ||
3391 | 3184 | # Count dual-core dual-thread as 1 CPU | ||
3392 | 3185 | $machine="sun4u"; | ||
3393 | 3186 | $threadcnt++; | ||
3394 | 3187 | # Number of cores & CPUs counted outside this loop below | ||
3395 | 3188 | } elsif ($cputype =~ /SPARC64-VII\b/ && $devtype eq "cpu") { | ||
3396 | 3189 | # Count quad-core dual-thread as 1 CPU | ||
3397 | 3190 | $machine="sun4u"; | ||
3398 | 3191 | $threadcnt++; | ||
3399 | 3192 | # Number of cores & CPUs counted outside this loop below | ||
3400 | 3193 | } elsif ($cputype =~ /SPARC64-VII\+\b/ && $devtype eq "cpu") { | ||
3401 | 3194 | # Count quad-core dual-thread as 1 CPU | ||
3402 | 3195 | $machine="sun4u"; | ||
3403 | 3196 | $threadcnt++; | ||
3404 | 3197 | # Number of cores & CPUs counted outside this loop below | ||
3405 | 3198 | } elsif ($cputype eq "SPARC64-VIII" && $devtype eq "cpu") { | ||
3406 | 3199 | # Guess on the Venus SPARC64-VIII name ??? | ||
3407 | 3200 | # Count 8-core dual-thread as 1 CPU | ||
3408 | 3201 | $machine="sun4u"; | ||
3409 | 3202 | $threadcnt++; | ||
3410 | 3203 | # Number of cores & CPUs counted outside this loop below | ||
3411 | 3204 | } | ||
3412 | 3205 | if ($threadcnt == 0 && $devtype eq "cpu") { | ||
3413 | 3206 | $ncpu++; | ||
3414 | 3207 | $cpucnt{"$cputype $cpufreq"}++; | ||
3415 | 3208 | $cpucntfrom="prtconf"; | ||
3416 | 3209 | } | ||
3417 | 3210 | $devtype=""; | ||
3418 | 3211 | } | ||
3419 | 3212 | if ($line =~ /device_type:/) { | ||
3420 | 3213 | @dev_line=split(/\'/, $line); | ||
3421 | 3214 | $devtype=$dev_line[1]; | ||
3422 | 3215 | } | ||
3423 | 3216 | if ($line =~ /clock-frequency:/) { | ||
3424 | 3217 | @freq_line=split(' ', $line); | ||
3425 | 3218 | $freq=&convert_freq($freq_line[1]); | ||
3426 | 3219 | } | ||
3427 | 3220 | if ($line =~ /\sversion:\s+'OBP/ && $romver eq "") { | ||
3428 | 3221 | $romver=$line; | ||
3429 | 3222 | $romver=~s/\s+version:\s+//; | ||
3430 | 3223 | $romver=~s/'//g; | ||
3431 | 3224 | @romverarr=split(/\s/, $romver); | ||
3432 | 3225 | $romvernum=$romverarr[1]; | ||
3433 | 3226 | } | ||
3434 | 3227 | if ($line =~ /compatible:\s+'sun4.'/ && $osrel eq "") { | ||
3435 | 3228 | @compatible_line=split(/\'/, $line); | ||
3436 | 3229 | $machine=$compatible_line[1]; | ||
3437 | 3230 | } | ||
3438 | 3231 | if ($line =~ /value='.*AMD Opteron/ && $cputype eq "x86") { | ||
3439 | 3232 | $cputype_prtconf=$line; | ||
3440 | 3233 | $cputype_prtconf=~s/.*='//; | ||
3441 | 3234 | $cputype_prtconf=~s/'//g; | ||
3442 | 3235 | } | ||
3443 | 3236 | $i++; | ||
3444 | 3237 | } | ||
3445 | 3238 | &multicore_cpu_cnt; | ||
3446 | 3239 | if ($osrel eq "") { | ||
3447 | 3240 | if ($BSD) { | ||
3448 | 3241 | $osrel="4.X"; | ||
3449 | 3242 | $config_cmd="/usr/etc/devinfo -pv"; | ||
3450 | 3243 | $config_command="devinfo"; | ||
3451 | 3244 | } else { | ||
3452 | 3245 | $osrel="5.X"; | ||
3453 | 3246 | $solaris="2.X"; | ||
3454 | 3247 | $config_cmd="/usr/sbin/prtconf -vp"; | ||
3455 | 3248 | $config_command="prtconf"; | ||
3456 | 3249 | } | ||
3457 | 3250 | } | ||
3458 | 3251 | #$sysfreq=$freq if ($sysfreq == 0 && $freq > 0); | ||
3459 | 3252 | #$cpufreq=$sysfreq if ($sysfreq > $cpufreq && $ncpu > 0); | ||
3460 | 3253 | |||
3461 | 3254 | @romverarr=split(/\./, $romvernum) if ($romver); | ||
3462 | 3255 | $romvermajor=($romverarr[0]) ? $romverarr[0] : 2; | ||
3463 | 3256 | $romverminor=($romverarr[1]) ? $romverarr[1] : 0; | ||
3464 | 3257 | $romverminor=0 if ($romverminor eq "" || $romverminor eq "X"); | ||
3465 | 3258 | if ($banner =~ /^ \(/) { | ||
3466 | 3259 | # banner-name does not include the eeprom banner name. This happens | ||
3467 | 3260 | # sometimes when OBP 3.23 is installed on Ultra-60/E220R and | ||
3468 | 3261 | # Ultra-80/E420R systems. | ||
3469 | 3262 | $bannermore="Ultra 60 or Enterprise 220R" if ($model eq "Ultra-60"); | ||
3470 | 3263 | $bannermore="Ultra 80, Enterprise 420R or Netra t 1400/1405" if ($model eq "Ultra-80"); | ||
3471 | 3264 | } | ||
3472 | 3265 | # | ||
3473 | 3266 | # SPARCengine systems | ||
3474 | 3267 | # | ||
3475 | 3268 | $ultra="AX" if ($motherboard =~ /501-3043/); | ||
3476 | 3269 | $ultra="AX-300" if ($motherboard =~ /501-5037/); | ||
3477 | 3270 | $ultra="AXi" if ($motherboard =~ /501-4559/); | ||
3478 | 3271 | $ultra="AXmp" if ($banner =~ /UltraAX-MP/ || $model =~ /UltraAX-MP/ || $motherboard =~ /501-5296/ || $motherboard =~ /501-5487/ || $motherboard =~ /501-5670/); | ||
3479 | 3272 | $ultra="AXmp+" if ($banner =~ /UltraAX-MP\+/ || $model =~ /UltraAX-MP\+/ || $motherboard =~ /501-4324/); | ||
3480 | 3273 | $ultra="AXe" if ($banner =~ /UltraAXe\b/ || $model =~ /UltraAX-e\b/ || $motherboard =~ /375-0088/); | ||
3481 | 3274 | $ultra="AX-e2" if ($banner =~ /Netra AX1105-500\b/ || $model =~ /UltraAX-e2\b/ || $motherboard =~ /375-0128/); | ||
3482 | 3275 | $ultra="Netra X1" if ($banner =~ /Netra X1\b/ || $motherboard =~ /375-3015/); | ||
3483 | 3276 | $ultra="Netra T1 200" if ($banner =~ /Netra T1 200\b/ || $motherboard =~ /375-0132/); | ||
3484 | 3277 | $ultra="Sun Fire V100" if ($banner =~ /Sun Fire V100\b/); | ||
3485 | 3278 | # Sun Fire V120/Netra 120 can use motherboard 375-0132 like Netra T1 200 above | ||
3486 | 3279 | $ultra="Sun Fire V120" if ($banner =~ /Sun Fire V120\b/); | ||
3487 | 3280 | $ultra="Netra 120" if ($banner =~ /Netra 120\b/); | ||
3488 | 3281 | if ($ultra =~ /AX/) { | ||
3489 | 3282 | if ($banner !~ /SPARCengine.*Ultra/) { | ||
3490 | 3283 | $tmp="(SPARCengine Ultra $ultra)"; | ||
3491 | 3284 | $bannermore=($bannermore) ? "$tmp $bannermore" : $tmp; | ||
3492 | 3285 | } | ||
3493 | 3286 | } | ||
3494 | 3287 | if ($model =~ /Ultra-5_10\b/) { | ||
3495 | 3288 | if ($banner =~ /\bVoyagerIIi\b/) { | ||
3496 | 3289 | # Tadpole Voyager IIi has 8 DIMM slots, but prtconf reports | ||
3497 | 3290 | # it as an Ultra 5/10 | ||
3498 | 3291 | $model="VoyagerIIi"; | ||
3499 | 3292 | $ultra="VoyagerIIi"; | ||
3500 | 3293 | } | ||
3501 | 3294 | } | ||
3502 | 3295 | $ultra="Sun Blade 150" if ($banner =~ /Sun Blade 150\b/ || $diagbanner =~ /Sun Blade 150\b/); | ||
3503 | 3296 | $ultra="UP-20" if ($banner =~ /\bUP-20\b/); # untested ??? | ||
3504 | 3297 | $ultra="UP-520IIi" if ($motherboard =~ /501-4559/ && $banner =~ /\b520IIi\b/); | ||
3505 | 3298 | |||
3506 | 3299 | $need_obp2=0; | ||
3507 | 3300 | if ($model eq "Sun 4/20" || $model eq "Sun 4/25" || $model eq "Sun 4/40" || $model eq "Sun 4/50" || $model eq "Sun 4/60" || $model eq "Sun 4/65" || $model eq "Sun 4/75" || $model eq "SS-2") { | ||
3508 | 3301 | $machine="sun4c"; | ||
3509 | 3302 | $need_obp2=1 if ($model eq "Sun 4/40" || $model eq "Sun 4/60" || $model eq "Sun 4/65"); | ||
3510 | 3303 | } | ||
3511 | 3304 | |||
3512 | 3305 | &check_prtdiag if ($isX86); | ||
3513 | 3306 | if ($isX86) { | ||
3514 | 3307 | # Round up Solaris x86 memory (may have 128MB or more reserved) | ||
3515 | 3308 | $installed_memory=&roundup_memory($installed_memory); | ||
3516 | 3309 | } | ||
3517 | 3310 | |||
3518 | 3311 | |||
3519 | 3312 | if ($gotmemory eq "" && $ultra eq 0 && $machine ne "sun4d" && $boardfound_mem eq 0) { | ||
3520 | 3313 | &check_prtdiag; | ||
3521 | 3314 | &show_header; | ||
3522 | 3315 | if ($installed_memory) { | ||
3523 | 3316 | print "total memory = "; | ||
3524 | 3317 | &show_memory($installed_memory); | ||
3525 | 3318 | } | ||
3526 | 3319 | print "$permission_error\n" if ($permission_error); | ||
3527 | 3320 | print "$prtconf_warn\n" if ($prtconf_warn ne ""); | ||
3528 | 3321 | if ($prtdiag_failed == 2) { | ||
3529 | 3322 | # non-global zone (container) | ||
3530 | 3323 | print "WARNING: More details can be reported if memconf is run in the global zone.\n"; | ||
3531 | 3324 | } else { | ||
3532 | 3325 | print "ERROR: no 'memory' line in \"$config_cmd\" output.\n" if ($model ne "i86pc"); | ||
3533 | 3326 | if (! $config_permission && $machine =~ /sun4/ && $prtconf_warn eq "") { | ||
3534 | 3327 | print " This user "; | ||
3535 | 3328 | if ($permission_error) { | ||
3536 | 3329 | print "does"; | ||
3537 | 3330 | } else { | ||
3538 | 3331 | print "may"; | ||
3539 | 3332 | } | ||
3540 | 3333 | print " not have permission to run $config_command.\n"; | ||
3541 | 3334 | print " Try running memconf as a privileged user like root.\n" if ($uid ne "0"); | ||
3542 | 3335 | } elsif ($need_obp2) { | ||
3543 | 3336 | print " Upgrading from Open Boot PROM V1.X to V2.X will "; | ||
3544 | 3337 | print "allow memconf to\n detect the memory installed.\n"; | ||
3545 | 3338 | } elsif ($prtconf_warn =~ /openprom/) { | ||
3546 | 3339 | print " Please correct the problem with the openprom device.\n" if ($model ne "i86pc"); | ||
3547 | 3340 | } else { | ||
3548 | 3341 | print " This is an unsupported system by memconf.\n" if ($model ne "i86pc"); | ||
3549 | 3342 | } | ||
3550 | 3343 | } | ||
3551 | 3344 | &show_supported if ($machine !~ /sun4/); | ||
3552 | 3345 | $exitstatus=1; | ||
3553 | 3346 | &mailmaintainer if ($verbose == 3); | ||
3554 | 3347 | exit $exitstatus; | ||
3555 | 3348 | } | ||
3556 | 3349 | |||
3557 | 3350 | $gotmemory=~s/\s+reg:\s+//; | ||
3558 | 3351 | $gotmemory=~s/'//g; | ||
3559 | 3352 | @slots=split(/\./, $gotmemory); | ||
3560 | 3353 | $slot=1; | ||
3561 | 3354 | if ($manufacturer ne "" && $manufacturer !~ /^Sun\b/ && $ultra !~ /SPARC Enterprise M[34589]000 Server/) { | ||
3562 | 3355 | $bannermore=($bannermore) ? "$bannermore clone" : "clone" if ($manufacturer ne "Force Computers"); | ||
3563 | 3356 | $modelmore=($modelmore) ? "$modelmore clone" : "clone"; | ||
3564 | 3357 | $clone=1; | ||
3565 | 3358 | } | ||
3566 | 3359 | # DIMMs are installed in pairs on Ultra 1, 5 and 10; quads on | ||
3567 | 3360 | # Ultra 2, 60, 80, 220R, 420R, 450; 8's in Ultra Enterprise | ||
3568 | 3361 | # | ||
3569 | 3362 | # On 64-bit systems, prtconf format is AAAAAAAA.AAAAAAAA.SSSSSSSS.SSSSSSSS | ||
3570 | 3363 | # and on 32-bit systems, prtconf format is AAAAAAAA.AAAAAAAA.SSSSSSSS | ||
3571 | 3364 | # where A is for Address, S is for Size. | ||
3572 | 3365 | # Minimum module size is 1MB (0x00100000), so strip off last 5 hex digits of LSB | ||
3573 | 3366 | # and prepend last 5 digits of MSB, which allows recognizing up to 4500TB! | ||
3574 | 3367 | # | ||
3575 | 3368 | if ($ultra) { | ||
3576 | 3369 | $val0=3; # simmsize is in 3rd and 4th fields | ||
3577 | 3370 | $valaddr=2; # address is 2 fields before simmsize | ||
3578 | 3371 | $valinc=4; # fields per simm | ||
3579 | 3372 | $memtype="DIMM"; | ||
3580 | 3373 | } else { | ||
3581 | 3374 | $val0=2; # simmsize is in 3rd field | ||
3582 | 3375 | $valaddr=1; # address is 1 field before simmsize | ||
3583 | 3376 | $valinc=3; # fields per simm | ||
3584 | 3377 | } | ||
3585 | 3378 | |||
3586 | 3379 | # | ||
3587 | 3380 | # Define memory layout for specific systems | ||
3588 | 3381 | # | ||
3589 | 3382 | if ($model eq "Sun 4/20") { | ||
3590 | 3383 | # SLC accepts 4MB SIMMs on motherboard | ||
3591 | 3384 | # 501-1676 (4MB 100ns), 501-1698 (4MB 80ns) | ||
3592 | 3385 | # 33-bit 72-pin Fast Page Mode (36-bit work also) | ||
3593 | 3386 | # Does not support Open Boot PROM V2.X, so devinfo/prtconf output will | ||
3594 | 3387 | # not have memory lines. | ||
3595 | 3388 | $devname="OffCampus"; | ||
3596 | 3389 | $untested=1; | ||
3597 | 3390 | $simmrangex="00000010"; | ||
3598 | 3391 | $simmbanks=4; | ||
3599 | 3392 | $simmsperbank=1; | ||
3600 | 3393 | @simmsizes=(4); | ||
3601 | 3394 | @socketstr=("U0502","U0501","U0602","U0601"); | ||
3602 | 3395 | } | ||
3603 | 3396 | if ($model eq "Sun 4/25") { | ||
3604 | 3397 | # ELC accepts 4MB or 16MB SIMMs on motherboard | ||
3605 | 3398 | # 501-1698 or 501-1812 (4MB 80ns), 501-1822 (16MB 80ns) | ||
3606 | 3399 | # 33-bit 72-pin Fast Page Mode (36-bit work also) | ||
3607 | 3400 | $devname="NodeWarrior"; | ||
3608 | 3401 | $untested=0; | ||
3609 | 3402 | $simmrangex="00000010"; | ||
3610 | 3403 | $simmbanks=4; | ||
3611 | 3404 | $simmsperbank=1; | ||
3612 | 3405 | @simmsizes=(4,16); | ||
3613 | 3406 | @socketstr=("U0407".."U0410"); | ||
3614 | 3407 | @bankstr=("MEM1".."MEM4"); | ||
3615 | 3408 | } | ||
3616 | 3409 | if ($model eq "Sun 4/40") { | ||
3617 | 3410 | # IPC accepts 1MB or 4MB SIMMs on motherboard | ||
3618 | 3411 | # 501-1697 (1MB 80ns), 501-1625 (4MB 100ns), 501-1739 (4MB 80ns) | ||
3619 | 3412 | # Does not show memory with Open Boot PROM V1.X, but does with OBP V2.X | ||
3620 | 3413 | $devname="Phoenix"; | ||
3621 | 3414 | $untested=0; | ||
3622 | 3415 | $simmrangex="00000010"; | ||
3623 | 3416 | $simmbanks=3; | ||
3624 | 3417 | $simmsperbank=4; | ||
3625 | 3418 | @simmsizes=(1,4); | ||
3626 | 3419 | @socketstr=("U0588","U0587","U0586","U0585","U0584","U0591","U0590","U0589","U0678","U0676","U0683","U0677"); | ||
3627 | 3420 | @bankstr=(0,0,0,0,1,1,1,1,2,2,2,2); | ||
3628 | 3421 | @bytestr=(0..3,0..3,0..3); | ||
3629 | 3422 | } | ||
3630 | 3423 | if ($model eq "Sun 4/50") { | ||
3631 | 3424 | # IPX accepts 4MB or 16MB SIMMs on motherboard | ||
3632 | 3425 | # 501-1812 (4MB 80ns), 501-1915 or 501-1822 (16MB 80ns) | ||
3633 | 3426 | # 33-bit 72-pin Fast Page Mode (36-bit work also) | ||
3634 | 3427 | $devname="Hobbes"; | ||
3635 | 3428 | $untested=0; | ||
3636 | 3429 | $simmrangex="00000010"; | ||
3637 | 3430 | $simmbanks=4; | ||
3638 | 3431 | $simmsperbank=1; | ||
3639 | 3432 | @simmsizes=(4,16); | ||
3640 | 3433 | @socketstr=("U0310","U0309","U0308","U0307"); | ||
3641 | 3434 | @bankstr=(0..3); | ||
3642 | 3435 | } | ||
3643 | 3436 | if ($model eq "Sun 4/60" || $model eq "Sun 4/65") { | ||
3644 | 3437 | # SS1 and SS1+ accepts 1MB or 4MB SIMMs on motherboard | ||
3645 | 3438 | # 501-1408 (1MB 100ns), 501-1697 (SS1+ only) (1MB 80ns), | ||
3646 | 3439 | # 501-1625 (4MB 100ns), 501-1739 (4MB 80ns) | ||
3647 | 3440 | # Does not show memory with Open Boot PROM V1.X, but does with OBP V2.X | ||
3648 | 3441 | if ($model eq "Sun 4/60") { | ||
3649 | 3442 | $devname="Campus"; | ||
3650 | 3443 | $untested=0; | ||
3651 | 3444 | } else { | ||
3652 | 3445 | $devname="CampusB, Campus+"; | ||
3653 | 3446 | $untested=1; | ||
3654 | 3447 | } | ||
3655 | 3448 | $simmrangex="00000010"; | ||
3656 | 3449 | $simmbanks=4; | ||
3657 | 3450 | $simmsperbank=4; | ||
3658 | 3451 | @simmsizes=(1,4); | ||
3659 | 3452 | @socketstr=("U0588","U0587","U0586","U0585","U0584","U0591","U0590","U0589","U0678","U0676","U0683","U0677","U0682","U0681","U0680","U0679"); | ||
3660 | 3453 | @bankstr=(0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3); | ||
3661 | 3454 | @bytestr=(0..3,0..3,0..3,0..3); | ||
3662 | 3455 | } | ||
3663 | 3456 | if ($model eq "Sun 4/75" || $model eq "SS-2") { | ||
3664 | 3457 | # SS2 accepts 4MB SIMMs on motherboard and 32MB or 64MB SBus expansion | ||
3665 | 3458 | # card (501-1823 Primary and 501-1824 Secondary) | ||
3666 | 3459 | # 501-1739 (4MB 80ns) | ||
3667 | 3460 | $devname="Calvin"; | ||
3668 | 3461 | $untested=0; | ||
3669 | 3462 | $simmrangex="00000010"; | ||
3670 | 3463 | $simmbanks=4; | ||
3671 | 3464 | $simmsperbank=4; | ||
3672 | 3465 | @simmsizes=(4); | ||
3673 | 3466 | @socketstr=("U0311","U0309","U0307","U0322","U0312","U0310","U0308","U0321","U0313","U0314","U0315","U0320","U0319","U0318","U0317","U0316"); | ||
3674 | 3467 | @bankstr=(0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3); | ||
3675 | 3468 | @bytestr=(0..3,0..3,0..3,0..3); | ||
3676 | 3469 | } | ||
3677 | 3470 | if ($model =~ /SPARCclassic/ || $model =~ /SPARCstation-LX/) { | ||
3678 | 3471 | # Classic-X (4/10) accepts 1MB, 2MB, 4MB and 16MB SIMMs on motherboard | ||
3679 | 3472 | # Classic (4/15) and LX (4/30) accepts 4MB and 16MB SIMMs on motherboard | ||
3680 | 3473 | # Can accept 32MB SIMMs in bank 1, allowing 128MB total (2x32, 4x16) | ||
3681 | 3474 | # Possibly accepts 8MB SIMMs in bank 1 | ||
3682 | 3475 | # 501-2289 (1MB), 501-2433 (2MB) on Classic-X only | ||
3683 | 3476 | # 501-1991 (4MB), 501-2059 (16MB) | ||
3684 | 3477 | # 36-bit 72-pin 60ns Fast Page Mode | ||
3685 | 3478 | $devname="Sunergy"; | ||
3686 | 3479 | if ($model =~ /SPARCclassic-X/) { | ||
3687 | 3480 | $untested=1; | ||
3688 | 3481 | @simmsizes=(1,2,4,8,16,32); | ||
3689 | 3482 | } else { | ||
3690 | 3483 | $untested=0; | ||
3691 | 3484 | @simmsizes=(4,8,16,32); | ||
3692 | 3485 | } | ||
3693 | 3486 | $simmrangex="00000020"; | ||
3694 | 3487 | $simmbanks=3; | ||
3695 | 3488 | $simmsperbank=2; | ||
3696 | 3489 | @socketstr=("U0304","U0303","U0301","U0302","U0402","U0401"); | ||
3697 | 3490 | @bankstr=(1,1,2,2,3,3); | ||
3698 | 3491 | } | ||
3699 | 3492 | if ($model eq "S240") { | ||
3700 | 3493 | # Voyager has 16MB on motherboard, plus accepts one or two 16MB or 32MB | ||
3701 | 3494 | # Memory cards (501-2327 32MB, 501-2366 16MB) | ||
3702 | 3495 | # Motherboard, address 0x00000000-0x007fffff, 0x01000000-0x017fffff | ||
3703 | 3496 | # Lower slot=Mem 1, address 0x02000000-0x07ffffff | ||
3704 | 3497 | # Upper slot=Mem 2, address 0x0a000000-0x0fffffff | ||
3705 | 3498 | $devname="Gypsy"; | ||
3706 | 3499 | $untested=0; | ||
3707 | 3500 | $memtype="memory card"; | ||
3708 | 3501 | $sockettype="slot"; | ||
3709 | 3502 | $simmrangex="00000020"; | ||
3710 | 3503 | $simmbanks=8; # Count the skipped address range | ||
3711 | 3504 | $simmsperbank=1; | ||
3712 | 3505 | @simmsizes=(16,32); | ||
3713 | 3506 | @socketstr=("motherboard","Mem 1","Mem 1","Mem 1","?","Mem 2","Mem 2","Mem 2"); | ||
3714 | 3507 | @orderstr=("","lower slot","lower slot","lower slot","?","upper slot","upper slot","upper slot"); | ||
3715 | 3508 | } | ||
3716 | 3509 | if ($model eq "JavaEngine1") { | ||
3717 | 3510 | # Accepts 8MB, 16MB and 32MB EDO DIMMs | ||
3718 | 3511 | $devname="Bali"; | ||
3719 | 3512 | $untested=0; | ||
3720 | 3513 | $memtype="DIMM"; | ||
3721 | 3514 | $simmrangex="00000020"; | ||
3722 | 3515 | $simmbanks=2; | ||
3723 | 3516 | $simmsperbank=1; | ||
3724 | 3517 | @simmsizes=(8,16,32); | ||
3725 | 3518 | @socketstr=("J0501","J0502"); | ||
3726 | 3519 | @bankstr=(0,1); | ||
3727 | 3520 | } | ||
3728 | 3521 | if ($model eq "SPARCstation-4") { | ||
3729 | 3522 | # Accepts 8MB and 32MB SIMMs on motherboard | ||
3730 | 3523 | # 501-2470 (8MB), 501-2471 (32MB) | ||
3731 | 3524 | # 168-pin 60ns Fast Page Mode | ||
3732 | 3525 | $devname="Perigee"; | ||
3733 | 3526 | $untested=0; | ||
3734 | 3527 | $simmrangex="00000020"; | ||
3735 | 3528 | $simmbanks=5; | ||
3736 | 3529 | $simmsperbank=1; | ||
3737 | 3530 | @simmsizes=(8,32); | ||
3738 | 3531 | @socketstr=("J0301".."J0305"); | ||
3739 | 3532 | @bankstr=(0..4); | ||
3740 | 3533 | } | ||
3741 | 3534 | if ($model eq "SPARCstation-5" || $model eq "micro COMPstation 5" || $model =~ /Axil-255/ || $banner =~ /TWINstation 5G\b/) { | ||
3742 | 3535 | # Accepts 8MB and 32MB SIMMs on motherboard | ||
3743 | 3536 | # 501-2470 (8MB), 501-2471 (32MB) | ||
3744 | 3537 | # 168-pin 60ns Fast Page Mode | ||
3745 | 3538 | $devname="Aurora" if ($model eq "SPARCstation-5"); | ||
3746 | 3539 | $untested=0; | ||
3747 | 3540 | $simmrangex="00000020"; | ||
3748 | 3541 | $simmbanks=8; | ||
3749 | 3542 | $simmsperbank=1; | ||
3750 | 3543 | @simmsizes=(8,32); | ||
3751 | 3544 | @socketstr=("J0300".."J0303","J0400".."J0403"); | ||
3752 | 3545 | @bankstr=(0..7); | ||
3753 | 3546 | if ($banner =~ /TWINstation 5G\b/) { | ||
3754 | 3547 | $simmbanks=6; | ||
3755 | 3548 | @socketstr=(0..5); | ||
3756 | 3549 | } | ||
3757 | 3550 | if ($model ne "SPARCstation-5") { | ||
3758 | 3551 | $bannermore="SPARCstation 5 clone"; | ||
3759 | 3552 | $modelmore="SPARCstation 5 clone"; | ||
3760 | 3553 | } | ||
3761 | 3554 | } | ||
3762 | 3555 | if ($model =~ /SPARCstation-10/ || $model eq "Premier-24" || $motherboard eq "SUNW,S10,501-2365") { | ||
3763 | 3556 | # Accepts 16MB and 64MB SIMMs on motherboard | ||
3764 | 3557 | # 501-1785 or 501-2273 (16MB 80ns), 501-2479 (16MB 60ns), | ||
3765 | 3558 | # 501-2622 (32MB 60ns), 501-1930 (64MB 80ns), 501-2480 (64MB 60ns) | ||
3766 | 3559 | # 200-pin 60ns or 80ns Fast Page Mode ECC | ||
3767 | 3560 | # 32MB SIMMs not supported according to Sun, but appears to work fine | ||
3768 | 3561 | # depending on the OBP revision. OBP 2.12 and older detects the 32MB | ||
3769 | 3562 | # SIMM as 16MB, OBP 2.19 and later properly detects the 32MB SIMM. | ||
3770 | 3563 | $devname="Campus2" if ($model =~ /SPARCstation-10/); | ||
3771 | 3564 | $devname="Campus2+" if ($model =~ /Premier-24/); | ||
3772 | 3565 | $untested=0; | ||
3773 | 3566 | $simmrangex="00000040"; | ||
3774 | 3567 | $simmbanks=8; | ||
3775 | 3568 | $simmsperbank=1; | ||
3776 | 3569 | $romvernum="2.X" if ($romvernum eq ""); | ||
3777 | 3570 | $romverminor=0 if ($romverminor eq "" || $romverminor eq "X"); | ||
3778 | 3571 | @simmsizes=(($romvermajor eq 2) && ($romverminor >= 19)) ? (16,32,64) : (16,64); | ||
3779 | 3572 | @socketstr=("J0201","J0203","J0302","J0304","J0202","J0301","J0303","J0305"); | ||
3780 | 3573 | @orderstr=("1st","3rd","4th","2nd","8th","6th","5th","7th"); | ||
3781 | 3574 | @bankstr=(0..7); | ||
3782 | 3575 | } | ||
3783 | 3576 | if ($model =~ /SPARCstation-20/ || $model =~ /COMPstation-20S/ || $banner =~ /TWINstation 20G\b/) { | ||
3784 | 3577 | # Accepts 16MB, 32MB and 64MB SIMMs on motherboard | ||
3785 | 3578 | # 501-2479 (16MB), 501-2622 (32MB), 501-2480 (64MB) | ||
3786 | 3579 | # 200-pin 60ns Fast Page Mode ECC | ||
3787 | 3580 | $devname="Kodiak" if ($model eq "SPARCstation-20"); | ||
3788 | 3581 | $untested=0; | ||
3789 | 3582 | $simmrangex="00000040"; | ||
3790 | 3583 | $simmbanks=8; | ||
3791 | 3584 | $simmsperbank=1; | ||
3792 | 3585 | @simmsizes=(16,32,64); | ||
3793 | 3586 | @socketstr=("J0201","J0303","J0202","J0301","J0305","J0203","J0302","J0304"); | ||
3794 | 3587 | @orderstr=("1st","2nd","3rd","4th","5th","6th","7th","8th"); | ||
3795 | 3588 | @bankstr=(0..7); | ||
3796 | 3589 | if ($model !~ /SPARCstation-20/) { | ||
3797 | 3590 | $bannermore="SPARCstation 20 clone"; | ||
3798 | 3591 | $modelmore="SPARCstation 20 clone"; | ||
3799 | 3592 | } | ||
3800 | 3593 | if ($model eq "SPARCstation-20I") { | ||
3801 | 3594 | $bannermore="(SPARCstation-20I) clone"; | ||
3802 | 3595 | $modelmore="clone"; | ||
3803 | 3596 | } | ||
3804 | 3597 | if ($banner =~ /TWINstation 20G\b/) { | ||
3805 | 3598 | # @socketstr=("J0201","J0303","J0202","J0301","J0305","J0203","J0302","J0304"); | ||
3806 | 3599 | # @orderstr=("1st","6th","2nd","4th","8th","3rd","5th","7th"); | ||
3807 | 3600 | @socketstr=(0..7); | ||
3808 | 3601 | @orderstr=(""); | ||
3809 | 3602 | } | ||
3810 | 3603 | } | ||
3811 | 3604 | if ($model eq "SPARCsystem-600" || $model =~ /Sun.4.600/) { | ||
3812 | 3605 | # Accepts 4MB or 16MB SIMMs on motherboard | ||
3813 | 3606 | # Accepts 1MB, 4MB or 16MB SIMMs on VME expansion cards | ||
3814 | 3607 | # A memory bank is 16 SIMMs of the same size and speed | ||
3815 | 3608 | # Minimum memory configuration is 16 SIMMs in Bank 0 on the motherboard | ||
3816 | 3609 | # Motherboard Bank 1 must be populated before adding expansion cards | ||
3817 | 3610 | # Up to two VME memory expansion cards can be added | ||
3818 | 3611 | # Use 4MB SIMM 501-1739-01 or 501-2460-01 | ||
3819 | 3612 | # Use 16MB SIMM 501-2060-01 | ||
3820 | 3613 | $devname="Galaxy"; | ||
3821 | 3614 | $untested=0; | ||
3822 | 3615 | $simmrangex="00000100"; | ||
3823 | 3616 | $simmbanks=2; # 2 banks on CPU board, 4 banks on each expansion cards | ||
3824 | 3617 | $simmsperbank=16; | ||
3825 | 3618 | @simmsizes=(4,16); | ||
3826 | 3619 | # Sockets, banks and bytes on motherboard | ||
3827 | 3620 | @socketstr=("U1107","U1307","U1105","U1305","U1103","U1303","U1101","U1301","U1207","U1407","U1205","U1405","U1203","U1403","U1201","U1401","U1108","U1308","U1106","U1306","U1104","U1304","U1102","U1302","U1208","U1408","U1206","U1406","U1204","U1404","U1202","U1402"); | ||
3828 | 3621 | @bankstr=(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1); | ||
3829 | 3622 | @banksstr=("Motherboard bank 0","Motherboard bank 1"); | ||
3830 | 3623 | @bytestr=("0L0","0L1","1L0","1L1","2L0","2L1","3L0","3L1","4L0","4L1","5L0","5L1","6L0","6L1","7L0","7L1","0H0","0H1","1H0","1H1","2H0","2H1","3H0","3H1","4H0","4H1","5H0","5H1","6H0","6H1","7H0","7H1"); | ||
3831 | 3624 | # Sockets, banks and bytes on VME expansion cards | ||
3832 | 3625 | @socketstr_exp=("U1501","U1503","U1505","U1507","U1601","U1603","U1605","U1607","U1701","U1703","U1705","U1707","U1801","U1803","U1805","U1807","U1502","U1504","U1506","U1508","U1602","U1604","U1606","U1608","U1702","U1704","U1706","U1708","U1802","U1804","U1806","U1808","U1901","U1903","U1905","U1907","U2001","U2003","U2005","U2007","U2101","U2103","U2105","U2107","U2201","U2203","U2205","U2207","U1902","U1904","U1906","U1908","U2002","U2004","U2006","U2008","U2102","U2104","U2106","U2108","U2202","U2204","U2206","U2208"); | ||
3833 | 3626 | @bankstr_exp=("B0","B0","B0","B0","B0","B0","B0","B0","B0","B0","B0","B0","B0","B0","B0","B0","B1","B1","B1","B1","B1","B1","B1","B1","B1","B1","B1","B1","B1","B1","B1","B1","B2","B2","B2","B2","B2","B2","B2","B2","B2","B2","B2","B2","B2","B2","B2","B2","B3","B3","B3","B3","B3","B3","B3","B3","B3","B3","B3","B3","B3","B3","B3","B3"); | ||
3834 | 3627 | @bytestr_exp=("0L0","0L1","1L0","1L1","2L0","2L1","3L0","3L1","4L0","4L1","5L0","5L1","6L0","6L1","7L0","7L1","0H0","0H1","1H0","1H1","2H0","2H1","3H0","3H1","4H0","4H1","5H0","5H1","6H0","6H1","7H0","7H1","8L0","8L1","9L0","9L1","aL0","aL1","bL0","bL1","cL0","cL1","dL0","dL1","eL0","eL1","fL0","fL1","8H0","8H1","9H0","9H1","aH0","aH1","bH0","bH1","cH0","cH1","dH0","dH1","eH0","eH1","fH0","fH1"); | ||
3835 | 3628 | } | ||
3836 | 3629 | if ($model eq "Ultra-1" || $ultra eq 1) { | ||
3837 | 3630 | # Accepts 16MB, 32MB, 64MB or 128MB DIMMs on motherboard | ||
3838 | 3631 | # 501-2479 (16MB), 501-2622 (32MB), 501-2480 or 501-5691 (64MB), | ||
3839 | 3632 | # 501-3136 (128MB) | ||
3840 | 3633 | # 200-pin 60ns Fast Page Mode ECC | ||
3841 | 3634 | $devname="Neutron (Ultra 1), Electron (Ultra 1E), Dublin (Ultra 150)"; | ||
3842 | 3635 | $familypn="A11 (Ultra 1), A12 (Ultra 1E)"; | ||
3843 | 3636 | $untested=0; | ||
3844 | 3637 | $simmrangex="00000100"; | ||
3845 | 3638 | $simmbanks=4; | ||
3846 | 3639 | $simmsperbank=2; | ||
3847 | 3640 | @simmsizes=(16,32,64,128); | ||
3848 | 3641 | @socketstr=("U0701","U0601","U0702","U0602","U0703","U0603","U0704","U0604"); | ||
3849 | 3642 | @bankstr=("0L","0H","1L","1H","2L","2H","3L","3H"); | ||
3850 | 3643 | @bytestr=("00-15","16-31","00-15","16-31","00-15","16-31","00-15","16-31"); | ||
3851 | 3644 | } | ||
3852 | 3645 | if ($model eq "Ultra-2" || $ultra eq 2) { | ||
3853 | 3646 | # Accepts 16MB, 32MB, 64MB or 128MB DIMMs on motherboard | ||
3854 | 3647 | $devname="Pulsar"; | ||
3855 | 3648 | $familypn="A14"; | ||
3856 | 3649 | $untested=0; | ||
3857 | 3650 | $simmrangex="00000200"; | ||
3858 | 3651 | $simmbanks=4; | ||
3859 | 3652 | $simmsperbank=4; | ||
3860 | 3653 | @simmsizes=(16,32,64,128); | ||
3861 | 3654 | @socketstr=("U0501","U0401","U0701","U0601","U0502","U0402","U0702","U0602","U0503","U0403","U0703","U0603","U0504","U0404","U0704","U0604"); | ||
3862 | 3655 | @groupstr=(0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3); | ||
3863 | 3656 | @bankstr=("0L","0H","1L","1H","0L","0H","1L","1H","0L","0H","1L","1H","0L","0H","1L","1H"); | ||
3864 | 3657 | @bytestr=("00-15","16-31","32-47","48-63","00-15","16-31","32-47","48-63","00-15","16-31","32-47","48-63","00-15","16-31","32-47","48-63"); | ||
3865 | 3658 | } | ||
3866 | 3659 | if ($model eq "Ultra-30" || $ultra eq 30) { | ||
3867 | 3660 | # Also Netra t 1100 | ||
3868 | 3661 | # Accepts 16MB, 32MB, 64MB or 128MB DIMMs on motherboard | ||
3869 | 3662 | # 501-2479 (16MB), 501-2622 (32MB), 501-2480 or 501-5691 (64MB), | ||
3870 | 3663 | # 501-3136 (128MB) | ||
3871 | 3664 | # 200-pin 60ns Fast Page Mode ECC | ||
3872 | 3665 | # Two DIMMs form a pair, two pairs of DIMMs form a quad. | ||
3873 | 3666 | # Minumum requirements is two DIMMs in any adjacent pair. | ||
3874 | 3667 | # DIMMs can be installed in any order of pairs. | ||
3875 | 3668 | # Interleaving requires a fully populated quad. | ||
3876 | 3669 | # Each quad addresses 512MB of memory. | ||
3877 | 3670 | $devname="Quark (Ultra-30), Lightweight (Netra t 1100)"; | ||
3878 | 3671 | $familypn="A16 (Ultra-30), N01 (Netra t 1100)"; | ||
3879 | 3672 | $untested=0; | ||
3880 | 3673 | # simmrangex, simmbanks, and simmsperbank set later after determining | ||
3881 | 3674 | # if interleaving banks using quads rather than pairs | ||
3882 | 3675 | @simmsizes=(16,32,64,128); | ||
3883 | 3676 | @socketstr=("U0701","U0801","U0901","U1001","U0702","U0802","U0902","U1002","U0703","U0803","U0903","U1003","U0704","U0804","U0904","U1004"); | ||
3884 | 3677 | @bankstr=("Quad 0 Pair 0","Quad 0 Pair 0","Quad 0 Pair 1","Quad 0 Pair 1","Quad 1 Pair 0","Quad 1 Pair 0","Quad 1 Pair 1","Quad 1 Pair 1","Quad 2 Pair 0","Quad 2 Pair 0","Quad 2 Pair 1","Quad 2 Pair 1","Quad 3 Pair 0","Quad 3 Pair 0","Quad 3 Pair 1","Quad 3 Pair 1"); | ||
3885 | 3678 | } | ||
3886 | 3679 | if ($model eq "Ultra-5_10" || $ultra eq "5_10" || $ultra eq 5 || $ultra eq 10) { | ||
3887 | 3680 | # Accepts 16MB, 32MB, 64MB, 128MB or 256MB DIMMs on motherboard | ||
3888 | 3681 | # 16MB DIMM uses 10-bit column addressing and was not sold | ||
3889 | 3682 | # 32, 64, 128 and 256MB DIMMs use 11-bit column addressing | ||
3890 | 3683 | # Do not mix 16MB DIMMs with other sizes | ||
3891 | 3684 | # 256MB DIMM not supported in Ultra 5 according to Sun documentation, | ||
3892 | 3685 | # but they do work as long as you use low-profile DIMMs or take out the | ||
3893 | 3686 | # floppy drive. | ||
3894 | 3687 | # Memory speed is 60ns if 50ns and 60ns DIMMs are mixed | ||
3895 | 3688 | # 2-way interleaving supported with four identical sized DIMMs | ||
3896 | 3689 | # 50ns DIMMs supported on 375-0066 & 375-0079 motherboards | ||
3897 | 3690 | # Bank 0 DIMM1/DIMM2 0x00000000-0x0fffffff, 0x20000000-0x2fffffff | ||
3898 | 3691 | # Bank 1 DIMM3/DIMM4 0x10000000-0x1fffffff, 0x30000000-0x3fffffff | ||
3899 | 3692 | $devname="Darwin/Otter (Ultra 5), Darwin/SeaLion (Ultra 10)"; | ||
3900 | 3693 | $familypn="A21 (Ultra 5), A22 (Ultra 10)"; | ||
3901 | 3694 | $untested=0; | ||
3902 | 3695 | $simmrangex="00000100"; | ||
3903 | 3696 | $simmbanks=2; | ||
3904 | 3697 | $simmsperbank=2; | ||
3905 | 3698 | @simmsizes=(16,32,64,128,256); | ||
3906 | 3699 | @socketstr=("DIMM1".."DIMM4"); | ||
3907 | 3700 | @bankstr=("0L","0H","1L","1H"); | ||
3908 | 3701 | $sortslots=0; | ||
3909 | 3702 | } | ||
3910 | 3703 | if ($model eq "Ultra-60" || $ultra eq 60 || $ultra eq "220R") { | ||
3911 | 3704 | # Also Netra t1120/1125 | ||
3912 | 3705 | # Accepts 16MB, 32MB, 64MB or 128MB DIMMs on motherboard | ||
3913 | 3706 | # 501-2479 (16MB), 501-2622 (32MB), 501-2480 or 501-5691 (64MB), | ||
3914 | 3707 | # 501-3136 (128MB) | ||
3915 | 3708 | # 200-pin 60ns Fast Page Mode ECC | ||
3916 | 3709 | # U1001-U1004 bank 3 address 0xa0000000-0xbfffffff | ||
3917 | 3710 | # U0901-U0904 bank 2 address 0x80000000-0x9fffffff | ||
3918 | 3711 | # U0801-U0804 bank 1 address 0x20000000-0x3fffffff | ||
3919 | 3712 | # U0701-U0704 bank 0 address 0x00000000-0x1fffffff | ||
3920 | 3713 | if ($model eq "Ultra-60" || $ultra eq 60) { | ||
3921 | 3714 | $devname="Deuterium (Ultra-60), Lightweight 2 (Netra t112x)"; | ||
3922 | 3715 | $familypn="A23 (Ultra-60), N02/N04 (Netra t1120), N03 (Netra t1125)"; | ||
3923 | 3716 | } | ||
3924 | 3717 | if ($ultra eq "220R") { | ||
3925 | 3718 | $devname="Razor"; | ||
3926 | 3719 | $familypn="A34"; | ||
3927 | 3720 | } | ||
3928 | 3721 | $untested=0; | ||
3929 | 3722 | $simmrangex="00000200"; | ||
3930 | 3723 | $simmbanks=6; # Count the skipped address range | ||
3931 | 3724 | $simmsperbank=4; | ||
3932 | 3725 | @simmsizes=(16,32,64,128); | ||
3933 | 3726 | @socketstr=("U0701".."U0704","U0801".."U0804","?","?","?","?","?","?","?","?","U0901".."U0904","U1001".."U1004"); | ||
3934 | 3727 | @bankstr=(0,0,0,0,1,1,1,1,"?","?","?","?","?","?","?","?",2,2,2,2,3,3,3,3); | ||
3935 | 3728 | } | ||
3936 | 3729 | |||
3937 | 3730 | # | ||
3938 | 3731 | # SPARCengine systems | ||
3939 | 3732 | # | ||
3940 | 3733 | if ($banner =~ /Netra t1\b/ || $ultra eq "Netra t1" || $model eq "Netra t1" || $banner =~ /Ultra CP 1500\b/ || $ultra eq "CP1500" || $ultra eq "Netra ct400" || $ultra eq "Netra ct410" || $ultra eq "Netra ct800" || $ultra eq "Netra ct810") { | ||
3941 | 3734 | # Netra t1 100/105, Netra ct400/410/800/810, SPARCengine CP1500 | ||
3942 | 3735 | # Accepts 1 or 2 64MB, 128MB, 256MB or 512MB mezzanine memory cards | ||
3943 | 3736 | # Netra ct400/800 use the Netra ct1600 DC chassis (N08) | ||
3944 | 3737 | # Netra ct410/810 use the Netra ct1600 AC chassis (N09) | ||
3945 | 3738 | # Also used in Sun Fire 12K & Sun Fire 15K | ||
3946 | 3739 | # Install the highest capacity memory board first | ||
3947 | 3740 | # The 370-4155 was sold for use in the Netra t1 100/105 | ||
3948 | 3741 | # Up to four 370-4155 256MB memory boards can be installed | ||
3949 | 3742 | # Only one 370-4155 can be mixed with any other memory boards | ||
3950 | 3743 | # Cannot distinguish between 4 370-4155 256MB and 2 512MB memory boards | ||
3951 | 3744 | # Maximum memory: 768MB for 270MHz/33MHz, 1GB for 360MHz/440MHz systems | ||
3952 | 3745 | # | ||
3953 | 3746 | # Top slot -> 64MB 64MB 128MB 128MB 256MB 256MB 512MB | ||
3954 | 3747 | # Bottom slot SSF SS DSF SS SSF SS DSF SS DSF DS DSF SS DSF DS | ||
3955 | 3748 | # | | ||
3956 | 3749 | # v ------ ------ ------ ------ ------ ------ ------ | ||
3957 | 3750 | # 64MB SSF SS Y N Y N N Y N | ||
3958 | 3751 | # 64MB DSF SS Y Y Y Y Y Y Y | ||
3959 | 3752 | # 128MB SSF SS Y N Y N N Y N | ||
3960 | 3753 | # 128MB DSF SS Y Y Y Y Y Y Y | ||
3961 | 3754 | # 256MB DSF SS Y Y Y Y Y Y Y | ||
3962 | 3755 | # 512MB DSF DS Y/N * Y/N * Y/N * Y/N * Y/N * Y/N * Y/N * | ||
3963 | 3756 | # | ||
3964 | 3757 | # SSF=single-sided fab, DSF=double-sided fab | ||
3965 | 3758 | # SS=stuffed on one side, DS=stuffed on both sides | ||
3966 | 3759 | # * 512MB DSF DS board is supported on 360MHz and 440MHz systems, | ||
3967 | 3760 | # 512MB DSF DS board is not supported on 270MHz and 333MHz systems | ||
3968 | 3761 | # Lower board, address 0x00000000-0x0fffffff, 0x20000000-0x2fffffff | ||
3969 | 3762 | # upper board, address 0x10000000-0x1fffffff, 0x30000000-0x3fffffff | ||
3970 | 3763 | if ($banner =~ /Netra t1\b/ || $ultra eq "Netra t1" || $model eq "Netra t1") { | ||
3971 | 3764 | $devname="Flyweight (Model 100), Flapjack (Model 105)"; | ||
3972 | 3765 | $familypn="N07 (Model 100), N06 (Model 105)"; | ||
3973 | 3766 | } | ||
3974 | 3767 | $devname="Tonga" if ($ultra eq "Netra ct400"); | ||
3975 | 3768 | $devname="Monte Carlo" if ($ultra eq "Netra ct800"); | ||
3976 | 3769 | $familypn="N08" if ($ultra =~ /Netra ct[48]00/); | ||
3977 | 3770 | if ($ultra =~ /Netra ct[48]10/) { | ||
3978 | 3771 | $devname="Makaha"; | ||
3979 | 3772 | $familypn="N09"; | ||
3980 | 3773 | } | ||
3981 | 3774 | $untested=0; | ||
3982 | 3775 | $untested=1 if ($ultra eq "Netra ct400" || $ultra =~ /Netra ct[48]10/); | ||
3983 | 3776 | $memtype="memory card"; | ||
3984 | 3777 | $sockettype=""; | ||
3985 | 3778 | $simmrangex="00000100"; | ||
3986 | 3779 | $simmbanks=2; | ||
3987 | 3780 | $simmsperbank=1; | ||
3988 | 3781 | @simmsizes=(64,128,256,512); | ||
3989 | 3782 | @socketstr=("base mezzanine board","additional mezzanine board"); | ||
3990 | 3783 | @orderstr=("lower board","upper board"); | ||
3991 | 3784 | $sortslots=0; | ||
3992 | 3785 | } | ||
3993 | 3786 | if ($banner =~ /Ultra CP 1400\b/ || $ultra eq "CP1400") { | ||
3994 | 3787 | # Accepts 1 or 2 64MB, 128MB, 256MB or 512MB mezzanine memory cards | ||
3995 | 3788 | # Has 64MB on-board memory on motherboard | ||
3996 | 3789 | # Maximum memory: 832MB (64MB motherboard, 512MB bottom, 256MB top) | ||
3997 | 3790 | # | ||
3998 | 3791 | # Top slot -> 64MB 64MB 128MB 128MB 256MB 512MB | ||
3999 | 3792 | # Bottom slot SSF SS DSF SS SSF SS DSF SS DSF SS DSF DS | ||
4000 | 3793 | # | | ||
4001 | 3794 | # v ------ ------ ------ ------ ------ ------ | ||
4002 | 3795 | # 64MB SSF SS Y N Y N Y N | ||
4003 | 3796 | # 64MB DSF SS Y Y Y Y Y N | ||
4004 | 3797 | # 128MB SSF SS Y N Y N Y N | ||
4005 | 3798 | # 128MB DSF SS Y Y Y Y Y N | ||
4006 | 3799 | # 256MB DSF SS Y Y Y Y Y N | ||
4007 | 3800 | # 512MB DSF DS Y Y Y Y Y N | ||
4008 | 3801 | # | ||
4009 | 3802 | # SSF=single-sided fab, DSF=double-sided fab | ||
4010 | 3803 | # SS=stuffed on one side, DS=stuffed on both sides | ||
4011 | 3804 | # 512MB DSF DS board is only supported in bottom slot | ||
4012 | 3805 | # | ||
4013 | 3806 | # Motherboard, address 0x00000000-0x03ffffff | ||
4014 | 3807 | # Upper board, address 0x08000000-0xffffffff, 0x28000000-0x2fffffff | ||
4015 | 3808 | # Lower board, address 0x10000000-0x17ffffff, 0x30000000-0x37ffffff | ||
4016 | 3809 | $devname="Casanova"; | ||
4017 | 3810 | $untested=0; | ||
4018 | 3811 | $memtype="memory card"; | ||
4019 | 3812 | $sockettype=""; | ||
4020 | 3813 | $simmrangex="00000080"; | ||
4021 | 3814 | $simmbanks=3; | ||
4022 | 3815 | $simmsperbank=1; | ||
4023 | 3816 | @simmsizes=(64,128,256,512); | ||
4024 | 3817 | @socketstr=("motherboard","additional mezzanine board","base mezzanine board"); | ||
4025 | 3818 | @orderstr=("","upper board","lower board"); | ||
4026 | 3819 | $sortslots=0; | ||
4027 | 3820 | } | ||
4028 | 3821 | if ($ultra eq "AX" || $ultra eq "AX-300") { | ||
4029 | 3822 | # SPARCengine Ultra AX and AX-300 | ||
4030 | 3823 | # Accepts 8MB, 16MB, 32MB or 64MB DIMMs on motherboard | ||
4031 | 3824 | # AX-300 also accepts 128MB DIMMs on motherboard | ||
4032 | 3825 | $devname="Photon"; | ||
4033 | 3826 | $untested=0; # unsure if socket order is correct | ||
4034 | 3827 | $simmrangex="00000200"; | ||
4035 | 3828 | $simmbanks=2; | ||
4036 | 3829 | $simmsperbank=4; | ||
4037 | 3830 | @simmsizes=(8,16,32,64,128); | ||
4038 | 3831 | @socketstr=("U0301".."U0304","U0401".."U0404"); | ||
4039 | 3832 | @bankstr=(0,0,0,0,1,1,1,1); | ||
4040 | 3833 | } | ||
4041 | 3834 | if ($ultra eq "AXi") { | ||
4042 | 3835 | # SPARCengine Ultra AXi | ||
4043 | 3836 | # Accepts 8MB, 16MB, 32MB, 64MB or 128MB single or dual bank 10-bit | ||
4044 | 3837 | # column address type DIMMs on motherboard in all socket pairs | ||
4045 | 3838 | # Accepts 8MB, 16MB, 32MB, 64MB, 128MB or 256MB dual bank 11-bit | ||
4046 | 3839 | # column address type DIMMs on motherboard in Pairs 0 & 2 | ||
4047 | 3840 | # (leave Pairs 1 & 3 empty) | ||
4048 | 3841 | # DIMMs should be chosen as all 10-bit or all 11-bit column address type | ||
4049 | 3842 | # Use 60ns DIMMs only | ||
4050 | 3843 | #$devname="unknown"; | ||
4051 | 3844 | $untested=0; | ||
4052 | 3845 | $simmrangex="00000100"; | ||
4053 | 3846 | $simmbanks=4; | ||
4054 | 3847 | $simmsperbank=2; | ||
4055 | 3848 | @simmsizes=(8,16,32,64,128,256); | ||
4056 | 3849 | @socketstr=("U0404","U0403","U0304","U0303","U0402","U0401","U0302","U0301"); | ||
4057 | 3850 | @bankstr=(0,0,2,2,1,1,3,3); | ||
4058 | 3851 | $sortslots=0; | ||
4059 | 3852 | } | ||
4060 | 3853 | if ($ultra eq "AXmp" || $ultra eq "AXmp+") { | ||
4061 | 3854 | # SPARCengine Ultra AXmp | ||
4062 | 3855 | # Accepts 8MB, 16MB, 32MB, 64MB or 128MB DIMMs on motherboard | ||
4063 | 3856 | # Accepts 256MB dual-bank DIMMs in bank 0 or 1 (not both) | ||
4064 | 3857 | # Can't distinguish dual-bank DIMMs from two banks of single bank DIMMs | ||
4065 | 3858 | # SPARCengine Ultra AXmp+ | ||
4066 | 3859 | # Accepts 8MB, 16MB, 32MB, 64MB, 128MB or 256MB DIMMs on motherboard | ||
4067 | 3860 | # Accepts dual-bank DIMMs in both bank 0 and 1 | ||
4068 | 3861 | # Can't distinguish dual-bank DIMMs from two banks of single bank DIMMs | ||
4069 | 3862 | $devname="Crichton"; | ||
4070 | 3863 | $untested=0; | ||
4071 | 3864 | $simmbanks=2; | ||
4072 | 3865 | $simmsperbank=8; | ||
4073 | 3866 | if ($ultra eq "AXmp+") { | ||
4074 | 3867 | $simmrangex="00000400"; | ||
4075 | 3868 | @simmsizes=(8,16,32,64,128,256); | ||
4076 | 3869 | } else { | ||
4077 | 3870 | $simmrangex="00000800"; | ||
4078 | 3871 | @simmsizes=(8,16,32,64,128); | ||
4079 | 3872 | } | ||
4080 | 3873 | @socketstr=("U0701".."U0704","U0801".."U0804","U0901".."U0904","U1001".."U1004"); | ||
4081 | 3874 | @bankstr=(0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1); | ||
4082 | 3875 | $sortslots=0; | ||
4083 | 3876 | } | ||
4084 | 3877 | if ($ultra eq "AXe") { | ||
4085 | 3878 | # SPARCengine Ultra AXe | ||
4086 | 3879 | # Accepts 32MB, 64MB, 128MB or 256MB single or dual bank DIMMs | ||
4087 | 3880 | # DIMMs should be chosen as all 10-bit or all 11-bit column address type | ||
4088 | 3881 | $devname="Topdog"; | ||
4089 | 3882 | $untested=0; | ||
4090 | 3883 | $simmrangex="00000100"; | ||
4091 | 3884 | $simmbanks=2; | ||
4092 | 3885 | $simmsperbank=2; | ||
4093 | 3886 | @simmsizes=(32,64,128,256); | ||
4094 | 3887 | @socketstr=("DIMM3","DIMM4","DIMM1","DIMM2"); | ||
4095 | 3888 | @bankstr=(0,0,1,1); | ||
4096 | 3889 | # Assume stacked DIMMs like AXi since only 128MB DIMMs have been tested | ||
4097 | 3890 | $sortslots=0; | ||
4098 | 3891 | } | ||
4099 | 3892 | if ($ultra eq "AX-e2") { | ||
4100 | 3893 | # Netra AX1105-500 | ||
4101 | 3894 | # Accepts up to 4 64MB, 128MB, 256MB or 512MB registered SDRAM PC133 | ||
4102 | 3895 | # DIMMs; 128MB Minimum, 2GB Maximum | ||
4103 | 3896 | # DIMM0 & DIMM1 form Bank 0, DIMM2 & DIMM3 form Bank 1 | ||
4104 | 3897 | # DIMMs don't have to be installed as pairs | ||
4105 | 3898 | $devname="Birdsnest Lite"; | ||
4106 | 3899 | $untested=0; | ||
4107 | 3900 | $simmrangex="00000200"; | ||
4108 | 3901 | $simmbanks=4; | ||
4109 | 3902 | $simmsperbank=1; | ||
4110 | 3903 | @simmsizes=(64,128,256,512); | ||
4111 | 3904 | @socketstr=("DIMM0".."DIMM3"); | ||
4112 | 3905 | @bankstr=(0,0,1,1); | ||
4113 | 3906 | } | ||
4114 | 3907 | if ($ultra eq "Netra X1" || $ultra eq "Sun Fire V100") { | ||
4115 | 3908 | # Netra X1, Sun Fire V100, UltraAX-i2 | ||
4116 | 3909 | # Accepts up to 4 128MB or 256MB PC133 DIMMs for 1GB maximum | ||
4117 | 3910 | # 500MHz model also accepts up to 4 512MB PC133 DIMMs for 2GB maximum | ||
4118 | 3911 | # Have seen slower models also work with 512MB DIMMs for 2GB maximum | ||
4119 | 3912 | # Sun Fire V100 is 500MHz only | ||
4120 | 3913 | # The memory installation sequence is Slot 3, 2, 1, and 0. | ||
4121 | 3914 | # Each DIMM slot addresses 512MB with 400MHz UltraSPARC IIe | ||
4122 | 3915 | # Each DIMM slot addresses 1GB with >= 550MHz UltraSPARC IIe | ||
4123 | 3916 | # Memory is SDRAM PC133 CL=3 ECC registered | ||
4124 | 3917 | # When equal size DIMMs are installed, the lowest slot number is | ||
4125 | 3918 | # mapped to the lowest address range. | ||
4126 | 3919 | # When mixed size DIMMs are installed, the slot number with the largest | ||
4127 | 3920 | # size DIMM is mapped to the lowest address range. | ||
4128 | 3921 | $devname="Flapjack-lite" if ($ultra eq "Netra X1"); | ||
4129 | 3922 | $devname="Flapjack-liteCD500" if ($ultra eq "Sun Fire V100"); | ||
4130 | 3923 | $familypn="N19"; | ||
4131 | 3924 | $untested=0; | ||
4132 | 3925 | $simmrangex=($cpufreq > 520) ? "00000400" : "00000200"; | ||
4133 | 3926 | $simmbanks=4; | ||
4134 | 3927 | $simmsperbank=1; | ||
4135 | 3928 | @simmsizes=(128,256,512); | ||
4136 | 3929 | @socketstr=("DIMM0".."DIMM3"); | ||
4137 | 3930 | } | ||
4138 | 3931 | if ($ultra eq "Netra T1 200" || $ultra eq "Sun Fire V120" || $ultra eq "Netra 120") { | ||
4139 | 3932 | # Netra T1 200, Sun Fire V120, Netra 120, UltraAX-i2 | ||
4140 | 3933 | # Accepts up to 4 256MB, 512MB or 1GB PC133 DIMMs for 4GB maximum | ||
4141 | 3934 | # Sun Fire V120 is 550MHz or 650MHz | ||
4142 | 3935 | # Netra 120 is same platform as Sun Fire V120, but is 650MHz only | ||
4143 | 3936 | # Memory is SDRAM PC133 CL=3 ECC registered | ||
4144 | 3937 | # The minimum memory requirement is one DIMM in Slot 0 | ||
4145 | 3938 | # The memory installation sequence is Slot 0, 1, 2, 3 | ||
4146 | 3939 | # Each DIMM slot addresses 512MB of memory with 500MHz UltraSPARC IIe | ||
4147 | 3940 | # Each DIMM slot addresses 1GB of memory with >= 550MHz UltraSPARC IIe | ||
4148 | 3941 | # When equal size DIMMs are installed, the lowest slot number is | ||
4149 | 3942 | # mapped to the lowest address range. | ||
4150 | 3943 | # When mixed size DIMMs are installed, the slot number with the largest | ||
4151 | 3944 | # size DIMM is mapped to the lowest address range. | ||
4152 | 3945 | if ($ultra eq "Netra T1 200") { | ||
4153 | 3946 | $devname="Flapjack2"; | ||
4154 | 3947 | $familypn="N21"; | ||
4155 | 3948 | } | ||
4156 | 3949 | if ($ultra eq "Sun Fire V120" || $ultra eq "Netra 120") { | ||
4157 | 3950 | $devname="Flapjack2+"; | ||
4158 | 3951 | $familypn="N25"; | ||
4159 | 3952 | } | ||
4160 | 3953 | $untested=0; | ||
4161 | 3954 | $simmrangex=($cpufreq > 520) ? "00000400" : "00000200"; | ||
4162 | 3955 | $simmbanks=4; | ||
4163 | 3956 | $simmsperbank=1; | ||
4164 | 3957 | @simmsizes=(256,512,1024); | ||
4165 | 3958 | @socketstr=("DIMM0".."DIMM3"); | ||
4166 | 3959 | } | ||
4167 | 3960 | if ($banner =~ /\bCP2000\b/ || $ultra =~ /^CP2[01]\d0$/) { | ||
4168 | 3961 | # Netra CP2000/CP2100 Series CompactPCI Boards (UltraSPARC-IIe) | ||
4169 | 3962 | # CP2040 (SUNW,UltraSPARC-IIe-NetraCT-40) supports 256MB, 512MB, and 1GB | ||
4170 | 3963 | # CP2060 (SUNW,UltraSPARC-IIe-NetraCT-60) has non-expandable 512MB | ||
4171 | 3964 | # CP2080 (SUNW,UltraSPARCengine_CP-80) supports 256MB, 512MB, and 1GB | ||
4172 | 3965 | # CP2140 (SUNW,UltraSPARCengine_CP-40) supports 512MB, 1GB and 2GB | ||
4173 | 3966 | # CP2160 (SUNW,UltraSPARCengine_CP-60) supports 1GB and 2GB | ||
4174 | 3967 | # 256MB Single-Wide module 375-3024 | ||
4175 | 3968 | # 512MB Single-Wide module 375-3025 | ||
4176 | 3969 | # 1GB Double-Wide module 375-3026 | ||
4177 | 3970 | # 1GB Single-Wide module 375-3125 | ||
4178 | 3971 | # 2GB Double-Wide module 375-3114 | ||
4179 | 3972 | # Max number of stacked memory boards is two | ||
4180 | 3973 | # Install double wide memory first, then single wide memory | ||
4181 | 3974 | $devname="Othello" if ($ultra eq "CP2040"); | ||
4182 | 3975 | $devname="Sputnik Bluesky" if ($ultra eq "CP2060"); | ||
4183 | 3976 | $devname="Sputnik Orion" if ($ultra eq "CP2080"); | ||
4184 | 3977 | $devname="Othello+" if ($ultra eq "CP2140"); | ||
4185 | 3978 | $devname="Sputnik+" if ($ultra eq "CP2160"); | ||
4186 | 3979 | $untested=1; | ||
4187 | 3980 | $untested=0 if ($ultra eq "CP2140"); | ||
4188 | 3981 | if ($ultra eq "CP2060") { | ||
4189 | 3982 | $memtype="embedded memory"; | ||
4190 | 3983 | $sockettype=""; | ||
4191 | 3984 | $simmrangex="00001000"; | ||
4192 | 3985 | $simmbanks=1; | ||
4193 | 3986 | $simmsperbank=1; | ||
4194 | 3987 | @simmsizes=(512); | ||
4195 | 3988 | } else { | ||
4196 | 3989 | $memtype="memory card"; | ||
4197 | 3990 | $sockettype=""; | ||
4198 | 3991 | $simmrangex="00001000"; | ||
4199 | 3992 | $simmbanks=2; | ||
4200 | 3993 | $simmsperbank=1; | ||
4201 | 3994 | if ($ultra eq "CP2140") { | ||
4202 | 3995 | @simmsizes=(512,1024,2048); | ||
4203 | 3996 | } elsif ($ultra eq "CP2160") { | ||
4204 | 3997 | @simmsizes=(1024,2048); | ||
4205 | 3998 | } else { | ||
4206 | 3999 | @simmsizes=(256,512,1024); | ||
4207 | 4000 | } | ||
4208 | 4001 | @socketstr=("base mezzanine board","additional mezzanine board"); | ||
4209 | 4002 | @orderstr=("lower board","upper board"); | ||
4210 | 4003 | $sortslots=0; | ||
4211 | 4004 | } | ||
4212 | 4005 | } | ||
4213 | 4006 | |||
4214 | 4007 | # | ||
4215 | 4008 | # Clones: most do not have verbose output since I don't have any socket data | ||
4216 | 4009 | # on them | ||
4217 | 4010 | # | ||
4218 | 4011 | if ($ultra eq "axus250" || $modelmore =~ /Ultra-250/) { | ||
4219 | 4012 | # AXUS Microsystems, Inc. http://www.axus.com.tw | ||
4220 | 4013 | # AXUS 250 clone | ||
4221 | 4014 | # accepts up to 128MB DIMMs on motherboard | ||
4222 | 4015 | $untested=0; | ||
4223 | 4016 | $simmrangex="00000200"; | ||
4224 | 4017 | $simmbanks=4; | ||
4225 | 4018 | $simmsperbank=4; | ||
4226 | 4019 | @simmsizes=(8,16,32,64,128); | ||
4227 | 4020 | @socketstr=("U0501","U0601","U0701","U0801","U0502","U0602","U0702","U0802","U0503","U0603","U0703","U0803","U0504","U0604","U0704","U0804"); | ||
4228 | 4021 | @bankstr=(0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3); | ||
4229 | 4022 | } | ||
4230 | 4023 | if ($model =~ /SPARC CPU-/ || $model =~ /SPARC CPCI-/) { | ||
4231 | 4024 | # Force Computers, http://www.forcecomputers.com | ||
4232 | 4025 | # model format: "SPARC CPU-5V/64-110-X" for 64MB w/ 110MHz CPU | ||
4233 | 4026 | $untested=1; | ||
4234 | 4027 | $untested=0 if ($model =~ /SPARC CPU-/); | ||
4235 | 4028 | if ($model =~ /\/${installed_memory}-/) { | ||
4236 | 4029 | $totmem=$installed_memory; | ||
4237 | 4030 | push(@simmsizesfound, "$totmem"); | ||
4238 | 4031 | $buffer="motherboard contains ${totmem}MB on-board memory\n"; | ||
4239 | 4032 | &finish; | ||
4240 | 4033 | } | ||
4241 | 4034 | } | ||
4242 | 4035 | if ($model =~ /Axil/) { | ||
4243 | 4036 | # RAVE Computer Association, http://rave.com | ||
4244 | 4037 | $untested=1; | ||
4245 | 4038 | $untested=0 if ($model =~ /Axil-245/); | ||
4246 | 4039 | $untested=0 if ($model =~ /Axil-255/); | ||
4247 | 4040 | $untested=0 if ($model =~ /Axil-311/); | ||
4248 | 4041 | $untested=0 if ($model =~ /Axil-320/); | ||
4249 | 4042 | } | ||
4250 | 4043 | if ($manufacturer =~ /Tadpole/) { | ||
4251 | 4044 | # Tadpole RDI, http://www.tadpole.com | ||
4252 | 4045 | $untested=1; | ||
4253 | 4046 | $untested=0 if ($banner =~ /Tadpole S3/); | ||
4254 | 4047 | $untested=0 if ($model =~ /PowerLite-170/); | ||
4255 | 4048 | $untested=0 if ($banner =~ /\bVoyagerIIi\b/); | ||
4256 | 4049 | $untested=0 if ($banner =~ /\bCycleQUAD\b/); | ||
4257 | 4050 | if ($ultra eq "UP-20") { | ||
4258 | 4051 | # Cycle UP-20 to upgrade SPARCstation 5/20 motherboards | ||
4259 | 4052 | # Accepts 16MB, 32MB and 64MB SIMMs from SPARCstation 20 | ||
4260 | 4053 | # Install SIMMs in pairs to form each bank | ||
4261 | 4054 | $untested=1; | ||
4262 | 4055 | $simmrangex="00000040"; | ||
4263 | 4056 | $simmbanks=4; | ||
4264 | 4057 | $simmsperbank=2; | ||
4265 | 4058 | @simmsizes=(16,32,64); | ||
4266 | 4059 | @bankstr=(0,0,1,1,2,2,3,3); | ||
4267 | 4060 | } | ||
4268 | 4061 | if ($ultra eq "UP-520IIi") { | ||
4269 | 4062 | # Cycle UP-520-IIi to upgrade SPARCstation 5/20 motherboards | ||
4270 | 4063 | # Accepts 8MB, 16MB, 32MB, 64MB, 128MB and 256MB DIMMs | ||
4271 | 4064 | $untested=0; | ||
4272 | 4065 | $simmrangex="00000200"; | ||
4273 | 4066 | $simmbanks=4; | ||
4274 | 4067 | $simmsperbank=2; | ||
4275 | 4068 | @simmsizes=(8,16,32,64,128,256); | ||
4276 | 4069 | @socketstr=("J301".."J304"); | ||
4277 | 4070 | @bankstr=(0,0,1,1); | ||
4278 | 4071 | } | ||
4279 | 4072 | if ($banner =~ /\bSPARCLE\b/) { | ||
4280 | 4073 | # UltraSPARC-IIe at 440MHz, 500MHz, or 650MHz | ||
4281 | 4074 | # 256MB - 2GB ECC SDRAM, two slots, PC-133, 144-pin SO-DIMMs | ||
4282 | 4075 | $untested=0; | ||
4283 | 4076 | $simmbanks=2; | ||
4284 | 4077 | $simmsperbank=1; | ||
4285 | 4078 | @simmsizes=(128,256,512,1024); | ||
4286 | 4079 | @socketstr=("DIMM0","DIMM1"); | ||
4287 | 4080 | $memtype="SO-DIMM"; | ||
4288 | 4081 | } | ||
4289 | 4082 | } | ||
4290 | 4083 | if ($manufacturer eq "Auspex") { | ||
4291 | 4084 | # Auspex Netserver, http://www.auspex.com | ||
4292 | 4085 | $memtype="Memory Module"; | ||
4293 | 4086 | $untested=1; | ||
4294 | 4087 | $untested=0 if ($model eq "SPARC Processor"); | ||
4295 | 4088 | if ($osrel =~ /^5./) { | ||
4296 | 4089 | $untested=1; # Untested with Solaris 2.X | ||
4297 | 4090 | $untested_type="OS"; | ||
4298 | 4091 | } | ||
4299 | 4092 | } | ||
4300 | 4093 | if ($manufacturer =~ /Fujitsu/) { | ||
4301 | 4094 | # Hal Computer Systems, a Fujitsu Company, http://www.hal.com | ||
4302 | 4095 | # Fujitsu Siemens, http://www.fujitsu-siemens.com | ||
4303 | 4096 | $untested=1; | ||
4304 | 4097 | $untested=0 if ($model =~ /S-4\/10H/ || $model =~ /S-4\/20[ABLH]/); | ||
4305 | 4098 | if ($banner =~ /GP7000\b/ || $banner =~ /GP7000F\b/) { | ||
4306 | 4099 | $untested=0; | ||
4307 | 4100 | if ($slotname0 =~ /SLOT[0-9]/) { | ||
4308 | 4101 | # M200 | ||
4309 | 4102 | # Up to 4GB of memory | ||
4310 | 4103 | # System board has 16 DIMM slots, #00 - #15 | ||
4311 | 4104 | # Banks - 0,0,1,1,2,2,2,2,3,3,3,3,4,4,4,4 | ||
4312 | 4105 | # First Modules installed in Bank 0, slots 0-1 | ||
4313 | 4106 | # Second Modules Installed in Bank 1, slots 2-3 | ||
4314 | 4107 | # Modules in Bank 0 and 1 must be same size | ||
4315 | 4108 | # Subsequent memory expansion installed in sets of four | ||
4316 | 4109 | # modules in Bank 2 - 4 (Slots 4-7, 8-11, 12-15) | ||
4317 | 4110 | @socketstr=("SLOT0".."SLOT9","SLOT10".."SLOT15"); | ||
4318 | 4111 | } | ||
4319 | 4112 | if ($slotname0 =~ /SLOT[AB][0-9]/) { | ||
4320 | 4113 | # M400 and M600 | ||
4321 | 4114 | # Up to 4GB of memory | ||
4322 | 4115 | # System board has 32 DIMM slots, #00 - #15 Group A & B | ||
4323 | 4116 | # Banks - 0,0,1,1,2,2,2,2,3,3,3,3,4,4,4,4 | ||
4324 | 4117 | # First Modules installed in Bank 0 Group A, slots 0-1 | ||
4325 | 4118 | # Second Modules installed in Bank 0 Group B, slots 0-1 | ||
4326 | 4119 | # Modules in Group A and B must be same size | ||
4327 | 4120 | # Next memory expansion installs in Bank 1 Group A & B, | ||
4328 | 4121 | # slots 2-3 using modules of same size as Bank 0 | ||
4329 | 4122 | # Subsequent memory expansion installed in sets of eight | ||
4330 | 4123 | # modules in Bank 2 - 4 (Slots 4-7, 8-11, 12-15) in | ||
4331 | 4124 | # both Group A and B | ||
4332 | 4125 | @socketstr=("SLOTA0".."SLOTA9","SLOTA10".."SLOTA15","SLOTB0".."SLOTB9","SLOTB10".."SLOTB15"); | ||
4333 | 4126 | } | ||
4334 | 4127 | } | ||
4335 | 4128 | if ($banner =~ /PRIMEPOWER *100N?\b/) { | ||
4336 | 4129 | # PRIMEPOWER100N, 1U rack mount | ||
4337 | 4130 | # Up to 2GB of memory | ||
4338 | 4131 | # 4 memory module slots | ||
4339 | 4132 | # 100MHz SDRAM ECC | ||
4340 | 4133 | # Mount memory modules in order from memory module slot 0 | ||
4341 | 4134 | $untested=1; | ||
4342 | 4135 | } | ||
4343 | 4136 | if ($banner =~ /PRIMEPOWER *[246]00\b/) { | ||
4344 | 4137 | # Up to 8GB of memory | ||
4345 | 4138 | # Each system board has 16 DIMM slots, #00 - #15 | ||
4346 | 4139 | # Four banks of 4 (0-3,4-7,8-11,12-15) | ||
4347 | 4140 | # PrimePower 200 and 400 use 1 system board | ||
4348 | 4141 | # PrimePower 600 uses 2 system boards (00, 01) | ||
4349 | 4142 | $untested=0; | ||
4350 | 4143 | foreach $brd ("00","01") { | ||
4351 | 4144 | if ($gotcpuboards =~ /\b$brd\b/) { | ||
4352 | 4145 | if ($gotmodulenames =~ /${brd}-SLOT[0-9]/) { | ||
4353 | 4146 | foreach $i (0..15) { | ||
4354 | 4147 | push(@socketstr, ("${brd}-SLOT$i")); | ||
4355 | 4148 | } | ||
4356 | 4149 | } | ||
4357 | 4150 | } | ||
4358 | 4151 | } | ||
4359 | 4152 | } | ||
4360 | 4153 | if ($banner =~ /PRIMEPOWER *800\b/ || $banner =~ /PRIMEPOWER *1000\b/ || $banner =~ /PRIMEPOWER *2000\b/) { | ||
4361 | 4154 | # 1-4 SPARC64 GP CPUs / system board | ||
4362 | 4155 | # PrimePower 800 can have 4 system boards per system | ||
4363 | 4156 | # PrimePower 1000 can have 8 system boards per system | ||
4364 | 4157 | # PrimePower 2000 can have 32 system boards per system | ||
4365 | 4158 | # Minimum Memory: 1GB / system board, 2GB / system | ||
4366 | 4159 | # Maximum Memory: 8GB / system board, 32GB / system | ||
4367 | 4160 | # 32 or 16 memory modules per system board, installed in quads | ||
4368 | 4161 | $untested=0; | ||
4369 | 4162 | @simmsizes=(128,256,512); | ||
4370 | 4163 | foreach $brd ("00".."77") { | ||
4371 | 4164 | if ($gotcpuboards =~ /\b$brd\b/) { | ||
4372 | 4165 | if ($gotmodulenames =~ /${brd}-SLOT#[AB][0-9]/) { | ||
4373 | 4166 | foreach $j ("A","B") { | ||
4374 | 4167 | foreach $i ("00".."03","10".."13","20".."23","30".."33") { | ||
4375 | 4168 | push(@socketstr, ("${brd}-SLOT#$j$i")); | ||
4376 | 4169 | } | ||
4377 | 4170 | } | ||
4378 | 4171 | } | ||
4379 | 4172 | } | ||
4380 | 4173 | } | ||
4381 | 4174 | } | ||
4382 | 4175 | if ($banner =~ /PRIMEPOWER *250\b/) { | ||
4383 | 4176 | # Pedestal, 2U or 4U rack mount | ||
4384 | 4177 | # 1-2 SPARC64 V processors at 1.1GHz, 1.32GHz, 1.87GHz | ||
4385 | 4178 | # 1GB-16GB DDR-SDRAM memory with ECC, 2-way, 8 DIMM slots | ||
4386 | 4179 | $untested=0; | ||
4387 | 4180 | @simmsizes=(256,512,1024,2048); | ||
4388 | 4181 | foreach $i ("00".."07") { | ||
4389 | 4182 | push(@socketstr, ("SLOT#$i")); | ||
4390 | 4183 | } | ||
4391 | 4184 | } | ||
4392 | 4185 | if ($banner =~ /PRIMEPOWER *450\b/) { | ||
4393 | 4186 | # Pedestal, 4U or 7U rack mount | ||
4394 | 4187 | # 1-4 SPARC64 V processors at 1.1GHz, 1.32GHz, 1.87GHz | ||
4395 | 4188 | # 1GB-32GB DDR-SDRAM memory with ECC, 4-way, 16 DIMM slots | ||
4396 | 4189 | $untested=0; | ||
4397 | 4190 | @simmsizes=(256,512,1024,2048); | ||
4398 | 4191 | foreach $i ("00".."15") { | ||
4399 | 4192 | push(@socketstr, ("SLOT#$i")); | ||
4400 | 4193 | } | ||
4401 | 4194 | } | ||
4402 | 4195 | if ($banner =~ /PRIMEPOWER *[68]50\b/) { | ||
4403 | 4196 | # PrimePower 650: 2-8 SPARC64 V processors at 1.1GHz or faster | ||
4404 | 4197 | # 2GB-64GB memory, 8-way, 1 system board, 8U rack mount | ||
4405 | 4198 | # PrimePower 850: 4-16 SPARC64 V processors at 1.1GHz or faster | ||
4406 | 4199 | # 2GB-128GB memory, 16-way, 2 system boards, 16U rack mount | ||
4407 | 4200 | # Uses DDR SDRAM ECC memory in 256MB, 512MB and 1GB sizes | ||
4408 | 4201 | # Each system board has 32 memory module slots, layed out | ||
4409 | 4202 | # with 4 DIMMs on 8 DIMM riser cards. | ||
4410 | 4203 | $untested=0; | ||
4411 | 4204 | @simmsizes=(256,512,1024,2048); | ||
4412 | 4205 | foreach $brd ("C0S00","C0S01") { | ||
4413 | 4206 | if ($gotcpuboards =~ /\b$brd\b/) { | ||
4414 | 4207 | if ($gotmodulenames =~ /${brd}-SLOT#[A-D][0-9]/) { | ||
4415 | 4208 | foreach $j ("A".."D") { | ||
4416 | 4209 | foreach $i ("00".."07") { | ||
4417 | 4210 | push(@socketstr, ("${brd}-SLOT#$j$i")); | ||
4418 | 4211 | } | ||
4419 | 4212 | } | ||
4420 | 4213 | } | ||
4421 | 4214 | } | ||
4422 | 4215 | } | ||
4423 | 4216 | } | ||
4424 | 4217 | if ($banner =~ /PRIMEPOWER *HPC2500\b/ || $banner =~ /PRIMEPOWER *900\b/ || $banner =~ /PRIMEPOWER *[12]500\b/) { | ||
4425 | 4218 | # SPARC64 V CPUs at 1.3GHz or 1.89GHz | ||
4426 | 4219 | # PRIMEPOWER HPC2500 / 2500 | ||
4427 | 4220 | # 2-8 CPUs / system board, 64-128 / system | ||
4428 | 4221 | # Up to 16 8-way system boards / system | ||
4429 | 4222 | # Up to 1024GB DDR-SDRAM memory with ECC, 128-way | ||
4430 | 4223 | # Minimum Memory: 4GB / system board, 4GB / system | ||
4431 | 4224 | # Maximum Memory: 64GB / system board, 1024GB / system | ||
4432 | 4225 | # PRIMEPOWER 900 | ||
4433 | 4226 | # 17U rack mount | ||
4434 | 4227 | # 1-8 CPUs / system board, 1-16 / system | ||
4435 | 4228 | # Up to 2 8-way system boards / system | ||
4436 | 4229 | # Up to 128GB DDR-SDRAM memory with ECC, 8-way | ||
4437 | 4230 | # Minimum Memory: 2GB / system board, 2GB / system | ||
4438 | 4231 | # Maximum Memory: 64GB / system board, 128GB / system | ||
4439 | 4232 | # PRIMEPOWER 1500 | ||
4440 | 4233 | # 1-8 CPUs / system board, 1-32 / system | ||
4441 | 4234 | # Up to 4 8-way system boards / system | ||
4442 | 4235 | # Up to 256GB DDR-SDRAM memory with ECC, 8-way | ||
4443 | 4236 | # Minimum Memory: 2GB / system board, 2GB / system | ||
4444 | 4237 | # Maximum Memory: 64GB / system board, 256GB / system | ||
4445 | 4238 | $untested=0; | ||
4446 | 4239 | @simmsizes=(256,512,1024,2048); | ||
4447 | 4240 | foreach $cab ("C0S","C1S") { | ||
4448 | 4241 | foreach $brd ("00".."07") { | ||
4449 | 4242 | if ($gotcpuboards =~ /\b$cab$brd\b/) { | ||
4450 | 4243 | foreach $j ("A","B") { | ||
4451 | 4244 | foreach $i ("00".."15") { | ||
4452 | 4245 | push(@socketstr, ("$cab${brd}-SLOT#$j$i")); | ||
4453 | 4246 | } | ||
4454 | 4247 | } | ||
4455 | 4248 | } | ||
4456 | 4249 | } | ||
4457 | 4250 | } | ||
4458 | 4251 | } | ||
4459 | 4252 | } | ||
4460 | 4253 | if ($model =~ /COMPstation.10/) { | ||
4461 | 4254 | # Tatung Science and Technology, http://www.tsti.com | ||
4462 | 4255 | # Accepts 16MB and 64MB SIMMs on motherboard | ||
4463 | 4256 | # Bank 0 must be filled first | ||
4464 | 4257 | # Layout is like SPARCstation-10, but I don't know if it can accept | ||
4465 | 4258 | # 32MB SIMMs or NVSIMMs | ||
4466 | 4259 | $untested=0; | ||
4467 | 4260 | $simmrangex="00000040"; | ||
4468 | 4261 | $simmbanks=8; | ||
4469 | 4262 | $simmsperbank=1; | ||
4470 | 4263 | @simmsizes=(16,64); | ||
4471 | 4264 | @socketstr=("J0201","J0203","J0302","J0304","J0202","J0301","J0303","J0305"); | ||
4472 | 4265 | @bankstr=(0,2,4,6,1,3,5,7); | ||
4473 | 4266 | } | ||
4474 | 4267 | if ($model =~ /COMPstation-20A\b/) { | ||
4475 | 4268 | # Tatung Science and Technology, http://www.tsti.com | ||
4476 | 4269 | # Accepts 16MB, 32MB and 64MB SIMMs on motherboard | ||
4477 | 4270 | $untested=1; | ||
4478 | 4271 | $simmrangex="00000040"; | ||
4479 | 4272 | $simmbanks=8; | ||
4480 | 4273 | $simmsperbank=1; | ||
4481 | 4274 | @simmsizes=(16,32,64); | ||
4482 | 4275 | @socketstr=("J0201","J0304","J0203","J0302","J0303","J0301","J0305","J0202"); | ||
4483 | 4276 | @orderstr=("1st","2nd","3rd","4th","5th","6th","7th","8th"); | ||
4484 | 4277 | @bankstr=(1..8); | ||
4485 | 4278 | } | ||
4486 | 4279 | if ($model =~ /COMPstation-20AL/) { | ||
4487 | 4280 | # Tatung Science and Technology, http://www.tsti.com | ||
4488 | 4281 | # Accepts 16MB, 32MB and 64MB SIMMs on motherboard | ||
4489 | 4282 | $untested=0; | ||
4490 | 4283 | $simmrangex="00000040"; | ||
4491 | 4284 | $simmbanks=8; | ||
4492 | 4285 | $simmsperbank=1; | ||
4493 | 4286 | @simmsizes=(16,32,64); | ||
4494 | 4287 | @socketstr=("J0201","J0203","J0302","J0304","J0202","J0301","J0303","J0305"); | ||
4495 | 4288 | @orderstr=("1st","2nd","3rd","4th","5th","6th","7th","8th"); | ||
4496 | 4289 | @bankstr=(0..7); | ||
4497 | 4290 | } | ||
4498 | 4291 | if ($banner =~ /COMPstation_U60_Series/ || $banner =~ /COMPstation_U80D_Series/) { | ||
4499 | 4292 | # Tatung Science and Technology, http://www.tsti.com | ||
4500 | 4293 | # Accepts 16MB, 32MB, 64MB, 128MB or 256MB DIMMs on motherboard | ||
4501 | 4294 | # 4 banks with 4 DIMMs per bank | ||
4502 | 4295 | $untested=0; | ||
4503 | 4296 | if ($banner =~ /COMPstation_U60_Series/) { | ||
4504 | 4297 | $simmrangex="00000200"; # use "00000400" with 256MB DIMMs | ||
4505 | 4298 | $simmbanks=6; # Count the skipped address range | ||
4506 | 4299 | } else { | ||
4507 | 4300 | $simmrangex="00000400"; | ||
4508 | 4301 | $simmbanks=4; | ||
4509 | 4302 | } | ||
4510 | 4303 | $simmsperbank=4; | ||
4511 | 4304 | @simmsizes=(16,32,64,128,256); | ||
4512 | 4305 | } | ||
4513 | 4306 | if ($model =~ /\bVoyagerIIi\b/) { | ||
4514 | 4307 | # Tadpole Voyager IIi has 8 DIMM slots, but otherwise appears | ||
4515 | 4308 | # to look like an Ultra 5. It allows 256MB to 1GB of memory. | ||
4516 | 4309 | $untested=0; | ||
4517 | 4310 | $simmrangex="00000100"; | ||
4518 | 4311 | $simmbanks=4; | ||
4519 | 4312 | $simmsperbank=2; | ||
4520 | 4313 | @simmsizes=(16,32,64,128); | ||
4521 | 4314 | @socketstr=("DIMM1","DIMM2","DIMM5","DIMM6","DIMM3","DIMM4","DIMM7","DIMM8"); | ||
4522 | 4315 | $sortslots=1; | ||
4523 | 4316 | } | ||
4524 | 4317 | |||
4525 | 4318 | # | ||
4526 | 4319 | # systems below may have memory information available in prtdiag output | ||
4527 | 4320 | # | ||
4528 | 4321 | if ($model eq "SPARCserver-1000" || $model eq "SPARCcenter-2000") { | ||
4529 | 4322 | $devname="Scorpion" if ($model eq "SPARCserver-1000"); | ||
4530 | 4323 | $devname="Scorpion+" if ($banner =~ "1000E"); | ||
4531 | 4324 | $devname="Dragon" if ($model eq "SPARCcenter-2000"); | ||
4532 | 4325 | $devname="Dragon+" if ($banner =~ "2000E"); | ||
4533 | 4326 | # Accepts 8MB and 32MB SIMMs on motherboard | ||
4534 | 4327 | $untested=0; | ||
4535 | 4328 | @simmsizes=(8,32); | ||
4536 | 4329 | $prtdiag_has_mem=1; | ||
4537 | 4330 | &check_prtdiag; | ||
4538 | 4331 | if ($boardfound_mem) { | ||
4539 | 4332 | foreach $line (@boards_mem) { | ||
4540 | 4333 | if ($line =~ /Board/) { | ||
4541 | 4334 | $boardslot_mem=substr($line,5,1); | ||
4542 | 4335 | $simmsize=int substr($line,46,3) / 4; | ||
4543 | 4336 | if ($simmsize == 0) { | ||
4544 | 4337 | &found_empty_bank("Group 0"); | ||
4545 | 4338 | } elsif ($simmsize == 1) { | ||
4546 | 4339 | &found_nvsimm_bank("Group 0"); | ||
4547 | 4340 | } else { | ||
4548 | 4341 | push(@simmsizesfound, "$simmsize"); | ||
4549 | 4342 | } | ||
4550 | 4343 | $simmsize=int substr($line,54,3) / 4; | ||
4551 | 4344 | if ($simmsize == 0) { | ||
4552 | 4345 | &found_empty_bank("Group 1"); | ||
4553 | 4346 | } elsif ($simmsize == 1) { | ||
4554 | 4347 | &found_nvsimm_bank("Group 1"); | ||
4555 | 4348 | } else { | ||
4556 | 4349 | push(@simmsizesfound, "$simmsize"); | ||
4557 | 4350 | } | ||
4558 | 4351 | $simmsize=int substr($line,62,3) / 4; | ||
4559 | 4352 | if ($simmsize == 0) { | ||
4560 | 4353 | &found_empty_bank("Group 2"); | ||
4561 | 4354 | } elsif ($simmsize == 1) { | ||
4562 | 4355 | &found_nvsimm_bank("Group 2"); | ||
4563 | 4356 | } else { | ||
4564 | 4357 | push(@simmsizesfound, "$simmsize"); | ||
4565 | 4358 | } | ||
4566 | 4359 | $simmsize=int substr($line,70,3) / 4; | ||
4567 | 4360 | if ($simmsize == 0) { | ||
4568 | 4361 | &found_empty_bank("Group 3"); | ||
4569 | 4362 | } elsif ($simmsize == 1) { | ||
4570 | 4363 | &found_nvsimm_bank("Group 3"); | ||
4571 | 4364 | } else { | ||
4572 | 4365 | push(@simmsizesfound, "$simmsize"); | ||
4573 | 4366 | } | ||
4574 | 4367 | } | ||
4575 | 4368 | } | ||
4576 | 4369 | &show_header; | ||
4577 | 4370 | print @boards_mem; | ||
4578 | 4371 | print "Each memory unit group is comprised of 4 SIMMs\n"; | ||
4579 | 4372 | $empty_banks=" None" if ($empty_banks eq ""); | ||
4580 | 4373 | print "empty memory groups:$empty_banks\n"; | ||
4581 | 4374 | } else { | ||
4582 | 4375 | &show_header; | ||
4583 | 4376 | $recognized=0; | ||
4584 | 4377 | } | ||
4585 | 4378 | $totmem=$installed_memory; | ||
4586 | 4379 | &finish; | ||
4587 | 4380 | exit; | ||
4588 | 4381 | } | ||
4589 | 4382 | if ($model eq "Ultra-4" || $ultra eq 450 || $model eq "Ultra-4FT" || $ultra eq "Netra ft1800") { | ||
4590 | 4383 | # Accepts 32MB, 64MB, 128MB or 256MB DIMMs on motherboard | ||
4591 | 4384 | # 16MB DIMMs are not supported and may cause correctable ECC errors | ||
4592 | 4385 | # 501-2622 (32MB), 501-2480 or 501-5691 (64MB), 501-3136 (128MB), | ||
4593 | 4386 | # 501-4743 or 501-5896 (256MB) | ||
4594 | 4387 | # 200-pin 60ns Fast Page Mode ECC | ||
4595 | 4388 | # Netra ft1800 is based on Ultra 450 | ||
4596 | 4389 | $devname="Tazmo (Tazmax/Tazmin)"; | ||
4597 | 4390 | $familypn="A20, A25"; | ||
4598 | 4391 | $familypn="N05" if ($model eq "Ultra-4FT" || $ultra eq "Netra ft1800"); | ||
4599 | 4392 | $untested=0; | ||
4600 | 4393 | $simmrangex="00000400"; | ||
4601 | 4394 | $simmbanks=4; | ||
4602 | 4395 | $simmsperbank=4; | ||
4603 | 4396 | @simmsizes=(16,32,64,128,256); | ||
4604 | 4397 | @socketstr=("U1901".."U1904","U1801".."U1804","U1701".."U1704","U1601".."U1604"); | ||
4605 | 4398 | @groupstr=("A","A","A","A","B","B","B","B","C","C","C","C","D","D","D","D"); | ||
4606 | 4399 | @bankstr=(2,2,2,2,3,3,3,3,0,0,0,0,1,1,1,1); | ||
4607 | 4400 | } | ||
4608 | 4401 | if ($model eq "Ultra-250" || $ultra eq 250) { | ||
4609 | 4402 | # Accepts 16MB, 32MB, 64MB, or 128MB DIMMs on motherboard | ||
4610 | 4403 | # 501-2479 (16MB), 501-2622 (32MB), 501-2480 or 501-5691 (64MB), | ||
4611 | 4404 | # 501-3136 (128MB) | ||
4612 | 4405 | # 200-pin 60ns Fast Page Mode ECC | ||
4613 | 4406 | $devname="Javelin"; | ||
4614 | 4407 | $familypn="A26"; | ||
4615 | 4408 | $untested=0; | ||
4616 | 4409 | $simmrangex="00000200"; | ||
4617 | 4410 | $simmbanks=4; | ||
4618 | 4411 | $simmsperbank=4; | ||
4619 | 4412 | @simmsizes=(16,32,64,128); | ||
4620 | 4413 | @socketstr=("U0701","U0801","U0901","U1001","U0702","U0802","U0902","U1002","U0703","U0803","U0903","U1003","U0704","U0804","U0904","U1004"); | ||
4621 | 4414 | @bankstr=("A","A","A","A","B","B","B","B","C","C","C","C","D","D","D","D"); | ||
4622 | 4415 | } | ||
4623 | 4416 | if ($model eq "Ultra-80" || $ultra eq 80 || $ultra eq "420R" || $ultra eq "Netra t140x") { | ||
4624 | 4417 | # Accepts 64MB or 256MB DIMMs | ||
4625 | 4418 | # 501-5691 (64MB), 501-4743 501-5936 501-6005 501-6056 (256MB) | ||
4626 | 4419 | # 200-pin 60ns 5V Fast Page Mode ECC, 576 bits data width | ||
4627 | 4420 | # 64MB DIMMs same as in Ultra-60, 256MB DIMMs same as in Enterprise-450 | ||
4628 | 4421 | # U0403,U0404,U1403,U1404 bank 3 address 0xc0000000-0xffffffff | ||
4629 | 4422 | # U0303,U0304,U1303,U1304 bank 2 address 0x80000000-0xbfffffff | ||
4630 | 4423 | # U0401,U0402,U1401,U1402 bank 1 address 0x40000000-0x7fffffff | ||
4631 | 4424 | # U0301,U0302,U1301,U1302 bank 0 address 0x00000000-0x3fffffff | ||
4632 | 4425 | # The minimum requirement is four DIMMs in any bank. The recommended | ||
4633 | 4426 | # installation sequence is Bank 0,2,1,3. DIMMs are required on both the | ||
4634 | 4427 | # Riser Board (U0[34]0?) and the System Board (U1[34]0?). Two-way and | ||
4635 | 4428 | # four-way memory bank interleaving is supported. Memory is 2-way | ||
4636 | 4429 | # interleaved when the same size DIMMs are installed in Banks 0 and 1. | ||
4637 | 4430 | # Memory is 4-way interleaved when the same size DIMMs are installed in | ||
4638 | 4431 | # Banks 0, 1, 2 and 3. | ||
4639 | 4432 | # | ||
4640 | 4433 | # prtconf does not reliably show the size of DIMMs in each slot when | ||
4641 | 4434 | # 1GB of total memory is installed. It shows this: | ||
4642 | 4435 | # reg: 00000000.00000000.00000000.40000000 | ||
4643 | 4436 | # A system with 1GB is reported as having 4 256MB DIMMs, but may be | ||
4644 | 4437 | # using 16 64MB DIMMs in a 4-way interleave. | ||
4645 | 4438 | # This is an issue that Sun could fix in the OBP. | ||
4646 | 4439 | # It is broken with OBP 3.33.0 2003/10/07 (patch 109082-06) and older. | ||
4647 | 4440 | # prtfru (Solaris 8 and later) also does not work. | ||
4648 | 4441 | # | ||
4649 | 4442 | # Sun shipped U80 1GB configurations w/ 4x256MB DIMMs | ||
4650 | 4443 | # Sun shipped U80 256MB configurations w/ 4x64MB DIMMs | ||
4651 | 4444 | # Sun shipped E420R with 501-5936 256MB DIMMs | ||
4652 | 4445 | # 64MB DIMM 501-2480 and 128MB DIMM 501-3136 are not supported. | ||
4653 | 4446 | # 16MB and 32MB DIMMs are not sold for the Ultra 80. | ||
4654 | 4447 | # | ||
4655 | 4448 | $devname="Quasar (U80), Quahog (420R), Lightweight 3 (Netra t140x)"; | ||
4656 | 4449 | $familypn="A27 (U80), A33 (420R), N14 (Netra t1405), N15 (Netra t1400)"; | ||
4657 | 4450 | if ($ultra eq 80) { | ||
4658 | 4451 | $devname="Quasar"; | ||
4659 | 4452 | $familypn="A27"; | ||
4660 | 4453 | } | ||
4661 | 4454 | if ($ultra eq "420R") { | ||
4662 | 4455 | $devname="Quahog"; | ||
4663 | 4456 | $familypn="A33"; | ||
4664 | 4457 | } | ||
4665 | 4458 | if ($ultra eq "Netra t140x") { | ||
4666 | 4459 | $devname="Lightweight 3"; | ||
4667 | 4460 | $familypn="N14 (Netra t1405), N15 (Netra t1400)"; | ||
4668 | 4461 | } | ||
4669 | 4462 | $untested=0; | ||
4670 | 4463 | $simmrangex="00000400"; | ||
4671 | 4464 | $simmbanks=4; | ||
4672 | 4465 | $simmsperbank=4; | ||
4673 | 4466 | @simmsizes=(64,256); # Sun only supports 64MB and 256MB DIMMs | ||
4674 | 4467 | @socketstr=("U0301","U0302","U1301","U1302","U0401","U0402","U1401","U1402","U0303","U0304","U1303","U1304","U0403","U0404","U1403","U1404"); | ||
4675 | 4468 | @bankstr=(0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3); | ||
4676 | 4469 | } | ||
4677 | 4470 | if ($ultra eq "Sun Blade 1000" || $ultra eq "Sun Blade 2000" || $ultra eq "Sun Fire 280R" || $ultra eq "Netra 20") { | ||
4678 | 4471 | # Accepts up to 8 128MB, 256MB, 512MB, 1GB or 2GB DIMMs installed in | ||
4679 | 4472 | # groups of four DIMMs per bank on motherboard | ||
4680 | 4473 | # Uses 232-pin 3.3V ECC 7ns SDRAM | ||
4681 | 4474 | # J0407 Group 1 Bank 1/3 address 0x0fa000000 - 0x1f3ffffff | ||
4682 | 4475 | # J0406 Group 0 Bank 0/2 address 0x000000000 - 0x0f9ffffff | ||
4683 | 4476 | # J0305 Group 1 Bank 1/3 address 0x0fa000000 - 0x1f3ffffff | ||
4684 | 4477 | # J0304 Group 0 Bank 0/2 address 0x000000000 - 0x0f9ffffff | ||
4685 | 4478 | # J0203 Group 1 Bank 1/3 address 0x0fa000000 - 0x1f3ffffff | ||
4686 | 4479 | # J0202 Group 0 Bank 0/2 address 0x000000000 - 0x0f9ffffff | ||
4687 | 4480 | # J0101 Group 1 Bank 1/3 address 0x0fa000000 - 0x1f3ffffff | ||
4688 | 4481 | # J0100 Group 0 Bank 0/2 address 0x000000000 - 0x0f9ffffff | ||
4689 | 4482 | # The minimum memory requirement is four DIMMs in any Group | ||
4690 | 4483 | # DIMMs can be installed in any group order | ||
4691 | 4484 | # Each group addresses 4GB of memory | ||
4692 | 4485 | # Memory slots (Jxxxx) map to same-numbered DIMMs (Uxxxx) | ||
4693 | 4486 | # For maximum 4-way interleaving, install 8 DIMMs of identical sizes | ||
4694 | 4487 | $devname="Excalibur (Sun Blade 1000), Littleneck (Sun Fire 280R), Lightweight 2+ (Netra 20/Netra T4), Sun Blade 2000 (Sun Blade 2000)"; | ||
4695 | 4488 | $familypn="A28 (Sun Blade 1000), A35 (Sun Fire 280R), N28 (Netra 20/Netra T4), A29 (Sun Blade 2000)"; | ||
4696 | 4489 | if ($ultra eq "Sun Blade 1000") { | ||
4697 | 4490 | $devname="Excalibur (Sun Blade 1000), Sun Blade 2000 (Sun Blade 2000)"; | ||
4698 | 4491 | $familypn="A28 (Sun Blade 1000), A29 (Sun Blade 2000)"; | ||
4699 | 4492 | } | ||
4700 | 4493 | if ($ultra eq "Sun Fire 280R") { | ||
4701 | 4494 | $devname="Littleneck"; | ||
4702 | 4495 | $familypn="A35"; | ||
4703 | 4496 | } | ||
4704 | 4497 | if ($ultra eq "Netra 20") { | ||
4705 | 4498 | $devname="Lightweight 2+"; | ||
4706 | 4499 | $familypn="N28"; | ||
4707 | 4500 | } | ||
4708 | 4501 | if ($ultra eq "Sun Blade 2000") { | ||
4709 | 4502 | $devname="Sun Blade 2000"; | ||
4710 | 4503 | $familypn="A29"; | ||
4711 | 4504 | } | ||
4712 | 4505 | $untested=0; | ||
4713 | 4506 | # SB1000/2000 uses 501-4143, 501-5938, 501-6230 or 501-6560 motherboards | ||
4714 | 4507 | # SB1000 can use 600, 750 and 900MHz UltraSPARC-III CPUs | ||
4715 | 4508 | # SB1000 can use 900MHz and faster UltraSPARC-III+ Cu CPUs | ||
4716 | 4509 | # SB2000 only shipped with 900MHz and faster UltraSPARC-III+ Cu CPUs | ||
4717 | 4510 | # SB2000 can use any of the SB1000 motherboards | ||
4718 | 4511 | if ($ultra eq "Sun Blade 1000") { | ||
4719 | 4512 | $modelmore=$banner; | ||
4720 | 4513 | $modelmore=~s/Sun-Blade-1000/or Sun-Blade-2000/g; | ||
4721 | 4514 | while (($cf,$cnt)=each(%cpucnt)) { | ||
4722 | 4515 | $cf=~/^(.*) (\d*)$/; | ||
4723 | 4516 | $cfreq=$2; | ||
4724 | 4517 | $modelmore=~s/\)/ ${cfreq}MHz\)/g if ($cfreq); | ||
4725 | 4518 | } | ||
4726 | 4519 | } | ||
4727 | 4520 | $prtdiag_has_mem=1; | ||
4728 | 4521 | $simmrangex="00001000"; | ||
4729 | 4522 | $simmbanks=2; | ||
4730 | 4523 | $simmsperbank=4; | ||
4731 | 4524 | @simmsizes=(128,256,512,1024,2048); | ||
4732 | 4525 | @socketstr=("J0100","J0202","J0304","J0406","J0101","J0203","J0305","J0407"); | ||
4733 | 4526 | @bankstr=(0,0,0,0,1,1,1,1); | ||
4734 | 4527 | } | ||
4735 | 4528 | if ($model eq "Sun-Blade-100" || $ultra eq "Sun Blade 100" || $ultra eq "Sun Blade 150") { | ||
4736 | 4529 | # Accepts 128MB, 256MB or 512MB DIMMs on motherboard | ||
4737 | 4530 | # Uses 168-pin 3.3V ECC PC133 CL=3 SDRAM | ||
4738 | 4531 | # U5 DIMM3 address 0x60000000 - 0x7fffffff or 0xc0000000 - 0xffffffff | ||
4739 | 4532 | # U4 DIMM2 address 0x40000000 - 0x5fffffff or 0x80000000 - 0xbfffffff | ||
4740 | 4533 | # U3 DIMM1 address 0x20000000 - 0x3fffffff or 0x40000000 - 0x7fffffff | ||
4741 | 4534 | # U2 DIMM0 address 0x00000000 - 0x1fffffff or 0x00000000 - 0x3fffffff | ||
4742 | 4535 | # The minimum memory requirement is one DIMM in U2 | ||
4743 | 4536 | # The memory installation sequence is U2, U3, U4, U5 | ||
4744 | 4537 | # Each bank addresses 512MB of memory with 500MHz UltraSPARC | ||
4745 | 4538 | # Each bank addresses 1GB of memory with >= 550MHz UltraSPARC | ||
4746 | 4539 | if ($model eq "Sun-Blade-100" || $ultra eq "Sun Blade 100") { | ||
4747 | 4540 | $devname="Grover"; | ||
4748 | 4541 | $familypn="A36"; | ||
4749 | 4542 | } | ||
4750 | 4543 | if ($ultra eq "Sun Blade 150") { | ||
4751 | 4544 | $devname="Grover+"; | ||
4752 | 4545 | $familypn="A41"; | ||
4753 | 4546 | } | ||
4754 | 4547 | $untested=0; | ||
4755 | 4548 | $prtdiag_has_mem=1; | ||
4756 | 4549 | $simmrangex=($cpufreq > 520) ? "00000400" : "00000200"; | ||
4757 | 4550 | $simmbanks=4; | ||
4758 | 4551 | $simmsperbank=1; | ||
4759 | 4552 | @simmsizes=(128,256,512); | ||
4760 | 4553 | @socketstr=("DIMM0".."DIMM3"); | ||
4761 | 4554 | @bankstr=(0..3); | ||
4762 | 4555 | } | ||
4763 | 4556 | if ($ultra eq "Sun Fire" || $ultra eq "Sun Fire 15K" || $ultra eq "Sun Fire 12K" || $ultra =~ /Sun Fire [346]8[01]0\b/ || $ultra =~ /Sun Fire E[246]900\b/ || $ultra =~ /Sun Fire E2[05]K\b/) { | ||
4764 | 4557 | # Sun Fire 3800 system | ||
4765 | 4558 | # 2-8 UltraSPARC-III processors | ||
4766 | 4559 | # Up to 2 CPU/Memory boards | ||
4767 | 4560 | # Sun Fire 4800, 4810 and 6800 system | ||
4768 | 4561 | # 2-12 UltraSPARC-III processors | ||
4769 | 4562 | # Up to 3 CPU/Memory boards | ||
4770 | 4563 | # Sun Fire 6800 system | ||
4771 | 4564 | # 2-24 UltraSPARC-III processors | ||
4772 | 4565 | # Up to 6 CPU/Memory boards | ||
4773 | 4566 | # Sun Fire 15K system | ||
4774 | 4567 | # 16-106 UltraSPARC-III+, IV or IV+ processors | ||
4775 | 4568 | # Up to 18 CPU/Memory boards | ||
4776 | 4569 | # Sun Fire 12K system | ||
4777 | 4570 | # up to 56 UltraSPARC-III+, IV or IV+ processors and 288GB memory | ||
4778 | 4571 | # Sun Fire E2900 & E4900 system | ||
4779 | 4572 | # 4, 8, or 12 UltraSPARC-IV or IV+ processors, up to 3 Uniboards | ||
4780 | 4573 | # E4900 adds dynamic system domains when compared to E2900 | ||
4781 | 4574 | # Sun Fire E6900 system | ||
4782 | 4575 | # 4-24 UltraSPARC-IV or IV+ processors, up to 6 Uniboards | ||
4783 | 4576 | # Sun Fire E20K system | ||
4784 | 4577 | # 4-36 UltraSPARC-IV or IV+ processors, up to 9 Uniboards | ||
4785 | 4578 | # Sun Fire E25K system | ||
4786 | 4579 | # Up to 72 UltraSPARC-IV or IV+ processors, up to 18 Uniboards | ||
4787 | 4580 | # Each CPU/Memory board holds up to 4 processors and up to 32GB memory | ||
4788 | 4581 | # (32 DIMMs per board, 8 banks of 4 DIMMs) | ||
4789 | 4582 | # Accepts 256MB, 512MB or 1GB DIMMs | ||
4790 | 4583 | # 1GB DIMM not supported at 750MHz | ||
4791 | 4584 | # 256MB DIMM only supported on US-III | ||
4792 | 4585 | # 2GB DIMMs supported on 48x0/6800/E2900/E4900/E6900/E20K/E25K | ||
4793 | 4586 | # System Board slots are labeled SB0 and higher | ||
4794 | 4587 | # A populated DIMM bank requires an UltraSPARC CPU. | ||
4795 | 4588 | # DIMMs are 232-pin 3.3V ECC 7ns SDRAM | ||
4796 | 4589 | # prtdiag output shows the memory installed. | ||
4797 | 4590 | # | ||
4798 | 4591 | # CPU1 and CPU0 Memory CPU3 and CPU2 Memory | ||
4799 | 4592 | # -------------------- -------------------- | ||
4800 | 4593 | # Socket CPU Bank DIMM Socket CPU Bank DIMM | ||
4801 | 4594 | # ------ --- ---- ---- ------ --- ---- ---- | ||
4802 | 4595 | # J14600 P1 B0 D3 J16600 P3 B0 D3 | ||
4803 | 4596 | # J14601 P1 B1 D3 J16601 P3 B1 D3 | ||
4804 | 4597 | # J14500 P1 B0 D2 J16500 P3 B0 D2 | ||
4805 | 4598 | # J14501 P1 B1 D2 J16501 P3 B1 D2 | ||
4806 | 4599 | # J14400 P1 B0 D1 J16400 P3 B0 D1 | ||
4807 | 4600 | # J14401 P1 B1 D1 J16401 P3 B1 D1 | ||
4808 | 4601 | # J14300 P1 B0 D0 J16300 P3 B0 D0 | ||
4809 | 4602 | # J14301 P1 B1 D0 J16301 P3 B1 D0 | ||
4810 | 4603 | # J13600 P0 B0 D3 J15600 P2 B0 D3 | ||
4811 | 4604 | # J13601 P0 B1 D3 J15601 P2 B1 D3 | ||
4812 | 4605 | # J13500 P0 B0 D2 J15500 P2 B0 D2 | ||
4813 | 4606 | # J13501 P0 B1 D2 J15501 P2 B1 D2 | ||
4814 | 4607 | # J13400 P0 B0 D1 J15400 P2 B0 D1 | ||
4815 | 4608 | # J13401 P0 B1 D1 J15401 P2 B1 D1 | ||
4816 | 4609 | # J13300 P0 B0 D0 J15300 P2 B0 D0 | ||
4817 | 4610 | # J13301 P0 B1 D0 J15301 P2 B1 D0 | ||
4818 | 4611 | # | ||
4819 | 4612 | $devname="Serengeti" if ($ultra eq "Sun Fire"); | ||
4820 | 4613 | if ($banner =~ /Sun Fire 3800\b/ || $diagbanner =~ /Sun Fire 3800\b/) { | ||
4821 | 4614 | $devname="Serengeti8, SF3800 or SP"; | ||
4822 | 4615 | $familypn="F3800"; | ||
4823 | 4616 | } | ||
4824 | 4617 | if ($banner =~ /Sun Fire 4800\b/ || $diagbanner =~ /Sun Fire 4800\b/) { | ||
4825 | 4618 | $devname="Serengeti12, SF4800 or MD"; | ||
4826 | 4619 | $familypn="F4800"; | ||
4827 | 4620 | } | ||
4828 | 4621 | if ($banner =~ /Sun Fire 4810\b/ || $diagbanner =~ /Sun Fire 4810\b/) { | ||
4829 | 4622 | $devname="Serengeti12i, SF4810 or ME"; | ||
4830 | 4623 | $familypn="F4810"; | ||
4831 | 4624 | } | ||
4832 | 4625 | if ($banner =~ /Sun Fire 6800\b/ || $diagbanner =~ /Sun Fire 6800\b/) { | ||
4833 | 4626 | $devname="Serengeti24, SF6800 or DC"; | ||
4834 | 4627 | $familypn="F6800"; | ||
4835 | 4628 | } | ||
4836 | 4629 | if ($ultra eq "Sun Fire 15K") { | ||
4837 | 4630 | $devname="Starcat, Serengeti72"; | ||
4838 | 4631 | $familypn="F15K"; | ||
4839 | 4632 | } | ||
4840 | 4633 | $devname="Starkitty" if ($ultra eq "Sun Fire 12K"); | ||
4841 | 4634 | if ($banner =~ /Sun Fire E2900\b/ || $diagbanner eq "Sun Fire E2900") { | ||
4842 | 4635 | $devname="Amazon 2"; | ||
4843 | 4636 | $familypn="E29"; | ||
4844 | 4637 | } | ||
4845 | 4638 | if ($banner =~ /Sun Fire E4900\b/ || $diagbanner eq "Sun Fire E4900") { | ||
4846 | 4639 | $devname="Amazon 4"; | ||
4847 | 4640 | $familypn="E49"; | ||
4848 | 4641 | } | ||
4849 | 4642 | $devname="Amazon 6" if ($banner =~ /Sun Fire E6900\b/ || $diagbanner eq "Sun Fire E6900"); | ||
4850 | 4643 | $devname="Amazon 20" if ($banner =~ /Sun Fire E20K\b/ || $diagbanner eq "Sun Fire E20K"); | ||
4851 | 4644 | $devname="Amazon 25" if ($banner =~ /Sun Fire E25K\b/ || $diagbanner eq "Sun Fire E25K"); | ||
4852 | 4645 | $untested=0; | ||
4853 | 4646 | $prtdiag_has_mem=1; | ||
4854 | 4647 | @simmsizes=(256,512,1024); | ||
4855 | 4648 | @simmsizes=(256,512,1024,2048) if ($ultra =~ /Sun Fire [46]8[01]0\b/ || $ultra =~ /Sun Fire E[246]900\b/ || $ultra =~ /Sun Fire E2[05]K\b/); | ||
4856 | 4649 | } | ||
4857 | 4650 | if ($ultra eq "Sun Fire V880") { | ||
4858 | 4651 | # Accepts 128MB, 256MB, 512MB or 1GB DIMMs in groups of four per CPU | ||
4859 | 4652 | # 128MB DIMMs only supported on 750MHz CPU/memory boards | ||
4860 | 4653 | # 1GB DIMMs only supported on 900MHz or faster CPU/memory boards | ||
4861 | 4654 | # 2-8 UltraSPARC-III processors, 750MHz or faster | ||
4862 | 4655 | # Up to 64GB memory, 8GB max per CPU, 4 DIMMs per CPU, 2 CPUs per board | ||
4863 | 4656 | # DIMMs must be added four-at-a-time within the same group of DIMM | ||
4864 | 4657 | # slots; every fourth slot belongs to the same DIMM group. | ||
4865 | 4658 | # Each CPU/Memory board must be populated with a minimum of eight DIMMs, | ||
4866 | 4659 | # installed in groups A0 and B0. | ||
4867 | 4660 | # For 1050MHz and higher system boards, each CPU/Memory board must be | ||
4868 | 4661 | # populated with all sixteen DIMMs, installed in groups A0,A1,B0,B1. | ||
4869 | 4662 | # Each group used must have four identical DIMMs installed (all four | ||
4870 | 4663 | # DIMMs must be from the same manufacturing vendor and must have the | ||
4871 | 4664 | # same capacity). | ||
4872 | 4665 | # DIMMs are 232-pin 3.3V ECC 7ns SDRAM | ||
4873 | 4666 | # Uses 128-bit-wide path to memory, 150MHz DIMMs, 2.4GB/sec | ||
4874 | 4667 | # bandwidth to processor and an aggregate memory bw of 9.6GB/sec | ||
4875 | 4668 | # prtdiag output shows the memory installed. | ||
4876 | 4669 | # | ||
4877 | 4670 | # CPU CPU/Memory Slot Associated DIMM Group | ||
4878 | 4671 | # --- --------------- --------------------- | ||
4879 | 4672 | # 0 Slot A A0,A1 | ||
4880 | 4673 | # 2 Slot A B0,B1 | ||
4881 | 4674 | # 1 Slot B A0,A1 | ||
4882 | 4675 | # 3 Slot B B0,B1 | ||
4883 | 4676 | # 4 Slot C A0,A1 | ||
4884 | 4677 | # 6 Slot C B0,B1 | ||
4885 | 4678 | # 5 Slot D A0,A1 | ||
4886 | 4679 | # 7 Slot D B0,B1 | ||
4887 | 4680 | # | ||
4888 | 4681 | $devname="Daktari (V880), Nandi (V880z)"; | ||
4889 | 4682 | $familypn="A30 (V880), A47 (V880z)"; | ||
4890 | 4683 | $untested=0; | ||
4891 | 4684 | @simmsizes=($cpufreq < 800) ? (128,256,512) : (256,512,1024,2048); | ||
4892 | 4685 | @banksstr=("A0","A1","B0","B1"); | ||
4893 | 4686 | $prtdiag_has_mem=1; | ||
4894 | 4687 | } | ||
4895 | 4688 | if ($ultra eq "Sun Fire V480") { | ||
4896 | 4689 | # Accepts 256MB, 512MB or 1GB DIMMs in groups of four per CPU | ||
4897 | 4690 | # 2 or 4 UltraSPARC-III processors, 900MHz or faster | ||
4898 | 4691 | # Up to 32GB memory, 8GB max per CPU, 4 DIMMs per CPU, 2 CPUs per board | ||
4899 | 4692 | # Smaller version of Sun Fire V880 above | ||
4900 | 4693 | $devname="Cherrystone"; | ||
4901 | 4694 | $familypn="A37"; | ||
4902 | 4695 | $untested=0; | ||
4903 | 4696 | @simmsizes=(256,512,1024,2048); | ||
4904 | 4697 | @banksstr=("A0","A1","B0","B1"); | ||
4905 | 4698 | $prtdiag_has_mem=1; | ||
4906 | 4699 | } | ||
4907 | 4700 | if ($ultra eq "Sun Fire V490" || $ultra eq "Sun Fire V890") { | ||
4908 | 4701 | # Accepts 512MB or 1GB DIMMs in groups of four per CPU | ||
4909 | 4702 | # 2 or 4 UltraSPARC-III, IV or IV+ processors, 1050MHz or faster | ||
4910 | 4703 | # Up to 32GB memory, 8GB max per CPU, 4 DIMMs per CPU, 2 CPUs per board | ||
4911 | 4704 | # Similar memory contraints as Sun Fire V880 above | ||
4912 | 4705 | if ($ultra eq "Sun Fire V490") { | ||
4913 | 4706 | $devname="Sebring"; | ||
4914 | 4707 | $familypn="A52"; | ||
4915 | 4708 | } | ||
4916 | 4709 | if ($ultra eq "Sun Fire V890") { | ||
4917 | 4710 | $devname="Silverstone"; | ||
4918 | 4711 | $familypn="A53"; | ||
4919 | 4712 | } | ||
4920 | 4713 | $untested=0; | ||
4921 | 4714 | @simmsizes=(512,1024,2048); | ||
4922 | 4715 | @banksstr=("A0","A1","B0","B1"); | ||
4923 | 4716 | $prtdiag_has_mem=1; | ||
4924 | 4717 | } | ||
4925 | 4718 | if ($ultra eq "Netra T12") { | ||
4926 | 4719 | # Sun Fire V1280, Netra 1280 | ||
4927 | 4720 | # Essentially the same as a Sun Fire 4810, but is marketed as a low cost | ||
4928 | 4721 | # single domain system. | ||
4929 | 4722 | # 2-12 UltraSPARC-IIIcu processors using up to 3 CPU/Memory boards | ||
4930 | 4723 | # Each CPU/Memory board holds up to 4 processors and up to 32GB memory | ||
4931 | 4724 | # (32 DIMMs per board, 8 banks of 4 DIMMs) | ||
4932 | 4725 | # Accepts 256MB, 512MB, 1GB or 2GB DIMMs | ||
4933 | 4726 | # System Board slots are labeled SB0 and higher | ||
4934 | 4727 | # A populated DIMM bank requires an UltraSPARC III CPU. | ||
4935 | 4728 | # DIMMs are 232-pin 3.3V ECC 7ns SDRAM | ||
4936 | 4729 | # prtdiag output shows the memory installed. | ||
4937 | 4730 | $devname="Lightweight 8"; | ||
4938 | 4731 | $familypn="A40 (Sun Fire V1280), N40 (Netra 1280)"; | ||
4939 | 4732 | $untested=0; | ||
4940 | 4733 | $prtdiag_has_mem=1; | ||
4941 | 4734 | @simmsizes=(256,512,1024,2048); | ||
4942 | 4735 | } | ||
4943 | 4736 | if ($ultra eq "Enchilada") { | ||
4944 | 4737 | # Sun Fire V210, V240, Netra 210, 240 | ||
4945 | 4738 | # 1-2 UltraSPARC-IIIi (Jalapeno) processors | ||
4946 | 4739 | # UltraSPARC IIIi supports 128MB to 1GB single bank DIMMs. | ||
4947 | 4740 | # UltraSPARC IIIi supports 256MB to 2GB dual bank DIMMs. | ||
4948 | 4741 | # DDR-1 SDRAM PC2100 DIMMs, 8 DIMM slots, 4 DIMMs per processor, | ||
4949 | 4742 | # 2 banks per processor, 2 DIMMs per bank | ||
4950 | 4743 | # V210 accepts 1GB & 2GB DIMMs by installing Fan Upgrade Kit, X7418A | ||
4951 | 4744 | # Mixing DIMM sizes and capacities is not supported. | ||
4952 | 4745 | # prtdiag output can show the memory installed. | ||
4953 | 4746 | $devname="Enchilada"; # Enxs | ||
4954 | 4747 | if ($banner =~ /Sun Fire V210\b/ || $model =~ /Sun-Fire-V210/) { | ||
4955 | 4748 | $devname="Enchilada 1U"; | ||
4956 | 4749 | $familypn="N31"; | ||
4957 | 4750 | } | ||
4958 | 4751 | if ($model =~ /Netra-210\b/) { | ||
4959 | 4752 | $devname="Salsa 19"; | ||
4960 | 4753 | $familypn="N79"; | ||
4961 | 4754 | } | ||
4962 | 4755 | if ($banner =~ /Sun Fire V240\b/ || $model =~ /Sun-Fire-V240/) { | ||
4963 | 4756 | $devname="Enchilada 2U"; | ||
4964 | 4757 | $familypn="N32"; | ||
4965 | 4758 | } | ||
4966 | 4759 | if ($model =~ /Netra-240\b/) { | ||
4967 | 4760 | $devname="Enchilada 19"; | ||
4968 | 4761 | $familypn="N54"; | ||
4969 | 4762 | } | ||
4970 | 4763 | $untested=0 if ($banner =~ /Sun Fire V210\b/ || $model =~ /Sun-Fire-V210/ || $model =~ /Netra-210\b/ || $banner =~ /Sun Fire 240\b/ || $model =~ /Sun-Fire-V240/ || $model =~ /Netra-240\b/); | ||
4971 | 4764 | $prtdiag_has_mem=1; | ||
4972 | 4765 | $prtdiag_banktable_has_dimms=1; | ||
4973 | 4766 | $simmrangex="00002000"; | ||
4974 | 4767 | # Count the skipped address range for dual CPU | ||
4975 | 4768 | $simmbanks=($ncpu > 1) ? 10 : 2; | ||
4976 | 4769 | $simmsperbank=2; | ||
4977 | 4770 | @simmsizes=(128,256,512,1024,2048); | ||
4978 | 4771 | @socketstr=("MB/P0/B0/D0","MB/P0/B0/D1","MB/P0/B1/D0","MB/P0/B1/D1","?","?","?","?","?","?","?","?","?","?","?","?"); | ||
4979 | 4772 | push(@socketstr, "MB/P1/B0/D0","MB/P1/B0/D1","MB/P1/B1/D0","MB/P1/B1/D1") if ($ncpu > 1); | ||
4980 | 4773 | } | ||
4981 | 4774 | if ($ultra eq "Sun Fire V440" || $ultra eq "Netra 440") { | ||
4982 | 4775 | # 1-4 UltraSPARC-IIIi (Jalapeno) processors | ||
4983 | 4776 | # UltraSPARC IIIi supports 128MB to 1GB single bank DIMMs. | ||
4984 | 4777 | # UltraSPARC IIIi supports 256MB to 2GB dual bank DIMMs. | ||
4985 | 4778 | # DDR-1 SDRAM PC2100 DIMMs, 16 DIMM slots, 4 DIMMs per processor, | ||
4986 | 4779 | # 2 banks per processor, 2 DIMMs per bank | ||
4987 | 4780 | # prtdiag output can show the memory installed. | ||
4988 | 4781 | $devname="Chalupa"; | ||
4989 | 4782 | $familypn="A42"; | ||
4990 | 4783 | if ($ultra eq "Netra 440") { | ||
4991 | 4784 | $devname="Chalupa 19"; | ||
4992 | 4785 | $familypn="N42"; | ||
4993 | 4786 | } | ||
4994 | 4787 | $untested=0; | ||
4995 | 4788 | $prtdiag_has_mem=1; | ||
4996 | 4789 | $prtdiag_banktable_has_dimms=1; | ||
4997 | 4790 | $simmrangex="00002000"; | ||
4998 | 4791 | $simmbanks=26; # Count the skipped address range for each CPU | ||
4999 | 4792 | $simmsperbank=2; | ||
5000 | 4793 | @simmsizes=(128,256,512,1024,2048); |
The diff has been truncated for viewing.