bcm56644sanity.soc (6170B)
1 # 2 # This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 3 # 4 # Copyright 2007-2019 Broadcom Inc. All rights reserved. 5 # 6 # Triumph3 BCM56640 Sanity 7 # 8 # Script to run all available tests as quickly as possible. 9 # For testing basic sanity of new drivers, simulators, chips, etc. 10 # 11 12 # Set run command script not to fail on errors reported by commands 13 # this allows the script to continue if a test fails 14 set rcerror=false 15 16 # Set up test mode: don't stop on errors, show progress on each test 17 tm -stoponerror +progress 18 # Unselect all 19 ts -* 20 21 local pbmge 0x3c3fffffffffe 22 23 if $?BCM56644_A0 \ 24 'local pbmport $pbmge' 25 if $?BCM56644_A1 || $?BCM56644_B0 \ 26 'local pbmhg 0x3c000000000000; local pbmport 0x3fc3fffffffffe' 27 28 # Turn off Mem cache and Parity checks for mem tests 29 config add mem_cache_enable=0 30 config add parity_enable=0 31 32 echo "testsuite: started: sanity" 33 rcload rc.soc 34 counter off 35 l2mode off 36 37 # We need to print out port status since any cabling effects results. 38 *:ps 39 40 if $?1 'local full_test 1' 41 42 # Avoid link messages while testing 43 linkscan off 44 ibodsync off 45 init 46 init misc 47 48 local done 'echo " Done"' 49 50 #Display some useful information 51 date 52 ver 53 soc 54 55 #Start Test 56 echo "Running PCI Compliance ..." 57 tr 2 58 $done 59 60 echo "Running PCI S-Channel Buf ..." 61 tr 4 62 $done 63 64 init soc 65 debug -warn 66 echo "Running Register reset defaults ..." 67 tr 1 68 $done 69 70 echo "Running Register read/write ..." 71 tr 3 mask64 72 $done 73 debug +warn 74 75 rcload rc.soc 76 counter off 77 l2mode off 78 echo "Running CPU Benchmarks (No Mem Cache) ..." 79 tr 21 80 $done 81 82 tr3_mem.soc 83 84 # Re-initialize to clean up of various read/writes to MMU memories 85 rcload rc.soc 86 counter off 87 l2mode off 88 linkscan off 89 90 echo "Running counter width verification test ..." 91 tr 30 92 $done 93 94 echo "Running counter read/write test ..." 95 tr 31 96 $done 97 98 #Hashing tests - TBD 99 #tr 55 100 101 echo "Running MDIO Linkscan test" 102 tr 60 103 $done 104 105 echo "Testing CPU DMA loopback ..." 106 #tr 17 107 $done 108 109 #echo "Testing CPU DMA, Scatter/Gather Reload ..." 110 #tr 22 111 #$done 112 113 echo "Testing CPU DMA, Scatter/Gather Simple ..." 114 #tr 23 115 $done 116 117 echo "Testing CPU DMA, Scatter/Gather Random ..." 118 #tr 24 119 $done 120 121 #MAC Loopback 122 echo "Testing MAC Loopback - 1 Gb/s all GE ports" 123 tr 18 PortBitMap=$pbmge Speed=1000 124 $done 125 126 if !"expr $pbmxe + 0" \ 127 'echo "Testing MAC Loopback - 10 Gb/s all XE ports"; \ 128 tr 18 PortBitMap=$pbmxe Speed=10G; $done' 129 130 if !"expr $pbmhg + 0" \ 131 'echo "Testing MAC Loopback - 30 Gb/s all HG ports"; \ 132 tr 18 PortBitMap=$pbmhg Speed=30G; $done' 133 134 #PHY Loopback 135 echo "Testing PHY Loopback - 1 Gb/s all GE ports" 136 tr 19 PortBitMap=$pbmge Speed=1000 137 $done 138 139 if !"expr $pbmxe + 0" \ 140 'echo "Testing PHY Loopback - 10 Gb/s all XE ports"; \ 141 tr 19 PortBitMap=$pbmxe Speed=10G; $done' 142 143 if !"expr $pbmhg + 0" \ 144 'echo "Testing PHY Loopback - 30 Gb/s all HG ports"; \ 145 tr 19 PortBitMap=$pbmhg Speed=30G; $done' 146 147 echo "Running MAC loopback V2 on all ports ..." 148 tr 48 pbm=$pbmport 149 $done 150 151 echo "Running PHY loopback V2 on all ports ..." 152 tr 49 pbm=$pbmport 153 $done 154 155 #Internal snake Loopback 156 echo "Running internal snake on GE ports, MAC loopback ..." 157 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=$pbmge 158 $done 159 160 echo "Running internal snake on GE ports, PHY loopback ..." 161 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=$pbmge 162 $done 163 164 if !"expr $pbmxe + 0" \ 165 'echo "Running internal snake on XE ports, MAC loopback ..."; \ 166 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=$pbmxe; $done' 167 168 if !"expr $pbmxe + 0" \ 169 'echo "Running internal snake on XE ports, PHY loopback ..."; \ 170 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=$pbmxe; $done' 171 172 #Traffic Test 173 echo "Running Traffic Test on GE ports in MAC mode ..." 174 tr 72 RunMode=MAC PortBitMap=$pbmge c=10 sp=1000 175 $done 176 177 echo "Running Traffic Test on GE ports in PHY mode ..." 178 tr 72 RunMode=PHY PortBitMap=$pbmge c=10 sp=1000 179 $done 180 181 if !"expr $pbmxe + 0" \ 182 'echo "Running Traffic Test on XE ports in MAC mode ..."; \ 183 tr 72 RunMode=MAC PortBitMap=$pbmxe c=10 sp=10G; $done' 184 185 if !"expr $pbmxe + 0" \ 186 'echo "Running Traffic Test on XE ports in PHY mode ..."; \ 187 tr 72 RunMode=PHY PortBitMap=$pbmxe c=10 sp=10G; $done' 188 189 if !"expr $pbmhg + 0" \ 190 'echo "Running Traffic Test on HG ports in MAC mode ..."; \ 191 tr 72 RunMode=MAC PortBitMap=$pbmhg c=10 sp=30G; $done' 192 193 if !"expr $pbmhg + 0" \ 194 'echo "Running Traffic Test on HG ports in PHY mode ..."; \ 195 tr 72 RunMode=PHY PortBitMap=$pbmhg c=10 sp=30G; $done' 196 197 # if you have cable with following paring 198 # xe0-xe4, xe1-xe5, xe2-xe6, xe3-xe7 199 # xe8-xe12, xe9-xe13, xe10-xe14, xe11-xe15 200 # ... 201 # xe56-xe60, xe57-xe61, xe58-xe62, xe59-xe63 202 # 203 # tr 72 rm=external pbm=xe0,xe4 an=f sp=10g 204 # tr 72 rm=external pbm=xe1,xe5 an=f sp=10g 205 # tr 72 rm=external pbm=xe2,xe6 an=f sp=10g 206 # tr 72 rm=external pbm=xe3,xe7 an=f sp=10g 207 # tr 72 rm=external pbm=xe8,xe12 an=f sp=10g 208 # tr 72 rm=external pbm=xe9,xe13 an=f sp=10g 209 # tr 72 rm=external pbm=xe10,xe14 an=f sp=10g 210 # tr 72 rm=external pbm=xe11,xe15 an=f sp=10g 211 # ... 212 # tr 72 rm=external pbm=xe56,xe60 an=f sp=10g 213 # tr 72 rm=external pbm=xe57,xe61 an=f sp=10g 214 # tr 72 rm=external pbm=xe58,xe62 an=f sp=10g 215 # tr 72 rm=external pbm=xe59,xe63 an=f sp=10g 216 217 # if you have cable with following paring 218 # xe0-xe4, xe1-xe5, xem-xe6, xe3-xe7 219 # xe8-xe12, xe9-xe13, xe10-xe14, xe11-xe15 220 # ... 221 # xe56-xe60, xe57-xe61, xe58-xe62, xe59-xe63 222 # echo "Running external loopback ..." 223 # tr 20 tpbm=xe0-xe3 di=4 an=f s=10g 224 # tr 20 tpbm=xe8-xe11 di=4 an=f s=10g 225 # tr 20 tpbm=xe16-xe19 di=4 an=f s=10g 226 # tr 20 tpbm=xe24-xe27 di=4 an=f s=10g 227 # tr 20 tpbm=xe32-xe35 di=4 an=f s=10g 228 # tr 20 tpbm=xe40-xe43 di=4 an=f s=10g 229 # tr 20 tpbm=xe48-xe51 di=4 an=f s=10g 230 # tr 20 tpbm=xe56-xe59 di=4 an=f s=10g 231 # $done 232 233 # Show status 234 date 235 tl 236 local returnCode $? 237 238 echo Tests Complete. Reinitializing ... 239 config refresh 240 rcload rc.soc 241 counter off 242 l2mode off 243 244 # We want to show the return code from the tl command which 245 # lists the results. The automated test infrastructure keys off of this 246 # value 247 echo "testsuite: finished: sanity: $returnCode"