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