bcm56045sanity.soc (5180B)
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 # Ranger+ BCM56046 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 pbmhg 0x1fe00000 22 if $?BCM56046_B0 \ 23 'local pbmge 0x2;\ 24 local pbmxe 0x1ffe0; \ 25 local pbmport 0x001fe1ffe2' 26 if $?BCM56045_B0 \ 27 'local pbmge 0x2000000000; \ 28 local pbmxe 0x1ffe; \ 29 local pbmport 0x21ffe01ffe' 30 31 # Turn off Mem cache and Parity checks for mem tests 32 config add mem_cache_enable=0 33 config add parity_enable=0 34 35 if "expr !$bcm56640_3x40_2x42 + 0" \ 36 'local xlport0 1; local clport0 1; local clport1 1' 37 if "expr $bcm56640_3x40_2x42 + 0" \ 38 'local xlport0 1; local clport0 1; local clport1 1; local xtport0 1; local xtport1 1; local xtport2 1; local xtport3 1' 39 40 if "expr !$bcm56640_3x40_3x42 + 0" \ 41 'local xlport0 1; local clport0 1; local clport1 1; \ 42 local pbmhg 0x1ffe00000; \ 43 local pbmport 0x1fe1ffe2' 44 if $?BCM56045_B0 && !$bcm56640_3x40_3x42 \ 45 'local xlport0 1; local clport1 1; local xtport0 1; local xtport1 1; local xtport2 1; local xtport3 1; \ 46 local pbmhg 0x1ffe00000; \ 47 local pbmport 0x21ffe01ffe' 48 49 echo "testsuite: started: Ranger+ sanity" 50 rcload rc.soc 51 counter off 52 l2mode off 53 54 # We need to print out port status since any cabling effects results. 55 *:ps 56 57 if $?1 'local full_test 1' 58 59 # Avoid link messages while testing 60 linkscan off 61 ibodsync off 62 init 63 init misc 64 65 local done 'echo " Done"' 66 67 #Display some useful information 68 date 69 ver 70 soc 71 72 #Start Test 73 echo "Running PCI Compliance ..." 74 tr 2 75 $done 76 77 echo "Running PCI S-Channel Buf ..." 78 tr 4 79 $done 80 81 init soc 82 debug -warn 83 echo "Running Register reset defaults ..." 84 tr 1 85 $done 86 87 echo "Running Register read/write ..." 88 tr 3 mask64 89 $done 90 debug +warn 91 92 rcload rc.soc 93 counter off 94 l2mode off 95 echo "Running CPU Benchmarks (No Mem Cache) ..." 96 tr 21 97 $done 98 99 ranger_plus_mem.soc 100 101 # Re-initialize to clean up of various read/writes to MMU memories 102 rcload rc.soc 103 counter off 104 l2mode off 105 linkscan off 106 107 echo "Running counter width verification test ..." 108 tr 30 109 $done 110 111 echo "Running counter read/write test ..." 112 tr 31 113 $done 114 115 #Hashing tests - TBD 116 #tr 55 117 118 echo "Running MDIO Linkscan test" 119 tr 60 120 $done 121 122 #echo "Testing CPU DMA loopback ..." 123 #tr 17 124 $done 125 126 #echo "Testing CPU DMA, Scatter/Gather Reload ..." 127 #tr 22 128 #$done 129 130 #echo "Testing CPU DMA, Scatter/Gather Simple ..." 131 #tr 23 132 $done 133 134 #echo "Testing CPU DMA, Scatter/Gather Random ..." 135 #tr 24 136 $done 137 138 #MAC Loopback 139 echo "Testing MAC Loopback - 1 Gb/s all GE ports" 140 tr 18 PortBitMap=$pbmge Speed=1000 141 $done 142 143 echo "Testing MAC Loopback - 10 Gb/s all XE ports" 144 tr 18 PortBitMap=$pbmxe Speed=10G 145 $done 146 147 echo "Testing MAC Loopback - 11 Gb/s all HG ports" 148 tr 18 PortBitMap=$pbmhg Speed=11G 149 $done 150 151 #PHY Loopback 152 echo "Testing PHY Loopback - 1 Gb/s all GE ports" 153 tr 19 PortBitMap=$pbmge Speed=1000 154 $done 155 156 echo "Testing PHY Loopback - 10 Gb/s all XE ports" 157 tr 19 PortBitMap=$pbmxe Speed=10G 158 $done 159 160 echo "Testing PHY Loopback - 11 Gb/s all HG42 ports" 161 tr 19 PortBitMap=$pbmhg Speed=11G 162 $done 163 164 echo "Running MAC loopback V2 on all ports ..." 165 tr 48 pbm=$pbmport 166 $done 167 168 echo "Running PHY loopback V2 on all ports ..." 169 tr 49 pbm=$pbmport 170 $done 171 172 #Internal snake Loopback 173 echo "Running internal snake on GE ports, MAC loopback ..." 174 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=$pbmge 175 $done 176 177 echo "Running internal snake on GE ports, PHY loopback ..." 178 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=$pbmge 179 $done 180 181 echo "Running internal snake on XE ports, MAC loopback ..." 182 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=$pbmxe 183 $done 184 185 echo "Running internal snake on XE ports, PHY loopback ..." 186 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=$pbmxe 187 $done 188 189 #Traffic Test 190 echo "Running Traffic Test on GE ports in MAC mode ..." 191 tr 72 RunMode=MAC PortBitMap=$pbmge c=10 sp=1000 192 $done 193 194 echo "Running Traffic Test on GE ports in PHY mode ..." 195 tr 72 RunMode=PHY PortBitMap=$pbmge c=10 sp=1000 196 $done 197 198 echo "Running Traffic Test on XE ports in MAC mode ..." 199 tr 72 RunMode=MAC PortBitMap=$pbmxe c=10 sp=10G 200 $done 201 202 echo "Running Traffic Test on XE ports in PHY mode ..." 203 tr 72 RunMode=PHY PortBitMap=$pbmxe c=10 sp=10G 204 $done 205 206 echo "Running Traffic Test on HG ports in MAC mode ..." 207 tr 72 RunMode=MAC PortBitMap=$pbmhg c=10 sp=max 208 $done 209 210 echo "Running Traffic Test on HG ports in PHY mode ..." 211 tr 72 RunMode=PHY PortBitMap=$pbmhg c=10 sp=max 212 $done 213 214 date 215 tl 216 local returnCode $? 217 218 echo Tests Complete. Reinitializing ... 219 config refresh 220 rcload rc.soc 221 counter off 222 l2mode off 223 224 # We want to show the return code from the tl command which 225 # lists the results. The automated test infrastructure keys off of this 226 # value 227 echo "testsuite: finished: sanity: $returnCode"