openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

bcm56040sanity.soc (5762B)


      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 BCM56040/41/42 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 
     22 # Enabling all ports; bcm56040 SKU
     23 
     24 if $?BCM56040_A0 || $?BCM56340_A0 \
     25     'local pbmge  0x3e;    local pbmge25 0x0; local pbmmgmt 0x20; local pbmhg 0x180000; \
     26     local pbmport 0x22200; local pbmxe   0x7fe00 '
     27 
     28 if $?BCM56041_A0 \
     29     'local pbmge  0x1e;   local pbmge25 0x0; local pbmmgmt 0x2000; local pbmhg 0x1e0000; \
     30     local pbmport 0x3ffe; local pbmxe   0x1fe00; echo **56041** '
     31 
     32 if $?BCM56042_A0 \
     33     'local pbmge  0x3ffe; local pbmge25 0x3dfc000; local pbmmgmt 0x2000; local pbmhg 0x0; \
     34     local pbmport 0x3ffe; local pbmxe   0x0; echo **56042** '
     35 
     36 # Turn off Mem cache and Parity checks for mem tests
     37 config add mem_cache_enable=0
     38 config add parity_enable=0
     39 
     40 echo "testsuite: started: Ranger sanity"
     41 rcload rc.soc
     42 counter off
     43 l2mode off
     44 
     45 # We need to print out port status since any cabling effects results.
     46 *:ps
     47 
     48 if $?1 'local full_test 1'
     49 
     50 # Avoid link messages while testing
     51 linkscan off
     52 
     53 init
     54 init misc
     55 
     56 local done 'echo "   Done"'
     57 
     58 #Display some useful information
     59 date
     60 ver
     61 soc
     62 
     63 #Start Test
     64 if !$?ihost_mode \
     65     'echo "Running PCI Compliance ...";\
     66      tr 2;\
     67      $done;'
     68 
     69 if !$?ihost_mode \
     70     'echo "Running PCI S-Channel Buf ...";\
     71      tr 4;\
     72      $done;'
     73 
     74 init soc
     75 debug -warn
     76 echo "Running Register reset defaults ..."
     77 tr 1
     78 $done
     79 
     80 echo "Running Register read/write ..."
     81 tr 3 mask64
     82 $done
     83 debug +warn
     84 
     85 rcload rc.soc
     86 counter off
     87 l2mode off
     88 echo "Running CPU Benchmarks (No Mem Cache) ..."
     89 #tr 21
     90 $done
     91 
     92 ranger_mem.soc
     93 
     94 # Re-initialize to clean up of various read/writes to MMU memories
     95 rcload rc.soc
     96 counter off
     97 l2mode off
     98 linkscan off
     99 
    100 echo "Running counter width verification test ..."
    101 tr 30
    102 $done
    103 
    104 echo "Running counter read/write test ..."
    105 tr 31
    106 $done
    107 
    108 #Hashing tests - TBD
    109 #tr 55
    110 
    111 echo "Running MDIO Linkscan test"
    112 tr 60
    113 $done
    114 
    115 echo "Testing CPU DMA loopback ..."
    116 tr 17
    117 $done
    118 
    119 echo "Testing CPU DMA, Scatter/Gather Reload ..."
    120 tr 22
    121 $done
    122 
    123 echo "Testing CPU DMA, Scatter/Gather Simple ..."
    124 tr 23
    125 $done
    126 
    127 echo "Testing CPU DMA, Scatter/Gather Random ..."
    128 tr 24
    129 $done
    130 
    131 ps
    132 
    133 #MAC Loopback
    134 echo "Testing MAC Loopback - 1 Gb/s all GE ports"
    135 tr 18 PortBitMap=$pbmge Speed=1000
    136 $done
    137 
    138 echo "Testing MAC Loopback - 1 Gb/s on Mgmt port"
    139 tr 18 PortBitMap=$pbmmgmt Speed=1000
    140 $done
    141 
    142 echo "Testing MAC Loopback - 2.5 Gb/s GE 2.5 ports"
    143 tr 18 PortBitMap=$pbmge25 Speed=2500
    144 $done
    145 
    146 echo "Testing MAC Loopback - 10 Gb/s all XE ports"
    147 tr 18 PortBitMap=$pbmxe Speed=10G
    148 $done
    149 
    150 echo "Testing MAC Loopback - 11 Gb/s all HG ports"
    151 tr 18 PortBitMap=$pbmhg Speed=11G 
    152 $done
    153 
    154 echo "Testing PHY Loopback - 1 Gb/s all GE ports"
    155 tr 19 PortBitMap=$pbmge Speed=1000
    156 $done
    157 
    158 echo "Testing PHY Loopback - 1 Gb/s on Mgmt port"
    159 tr 19 PortBitMap=$pbmmgmt Speed=1000
    160 $done
    161 
    162 echo "Testing PHY Loopback - 2.5 Gb/s GE 2.5 ports"
    163 tr 19 PortBitMap=$pbmge25 Speed=2500
    164 $done
    165 
    166 echo "Testing PHY Loopback - 10 Gb/s all XE ports"
    167 tr 19 PortBitMap=$pbmxe Speed=10G
    168 $done
    169 
    170 echo "Testing PHY Loopback - 11 Gb/s all HG ports"
    171 tr 19 PortBitMap=$pbmhg Speed=11G
    172 $done
    173 
    174 # tr 48 does not work with mix of port types
    175 echo "Running MAC loopback V2 on GE ports..."
    176 tr 48 pbm=$pbmge
    177 $done
    178 
    179 echo "Running MAC loopback V2 on XE ports ..."
    180 tr 48 pbm=$pbmxe
    181 $done
    182 
    183 echo "Running MAC loopback V2 on HG ports ..."
    184 tr 48 pbm=$pbmhg
    185 $done
    186 
    187 # tr 49 does not work with mix of port types
    188 echo "Running PHY loopback V2 on GE ports ..."
    189 tr 49 pbm=$pbmge
    190 $done
    191 
    192 echo "Running PHY loopback V2 on XE ports ..."
    193 tr 49 pbm=$pbmxe
    194 $done
    195 
    196 echo "Running PHY loopback V2 on HG ports ..."
    197 tr 49 pbm=$pbmhg
    198 $done
    199 
    200 #Internal snake Loopback
    201 echo "Running internal snake on GE ports, MAC loopback ..."
    202 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=$pbmge
    203 $done
    204 
    205 echo "Running internal snake on GE ports, PHY loopback ..."
    206 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=$pbmge
    207 $done
    208 
    209 #echo "Running internal snake on XE ports, MAC loopback ..."
    210 #tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=$pbmxe
    211 #$done
    212 
    213 #echo "Running internal snake on XE ports, PHY loopback ..."
    214 #tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=$pbmxe
    215 #$done
    216 
    217 #Traffic Test
    218 echo "Running Traffic Test on GE ports in MAC mode ..."
    219 tr 72 RunMode=MAC PortBitMap=$pbmge c=10 sp=1000
    220 $done
    221 
    222 #Traffic Test
    223 echo "Running Traffic Test on GE 2.5 ports in MAC mode ..."
    224 tr 72 RunMode=MAC PortBitMap=$pbmge25 c=10 sp=2500
    225 $done
    226 
    227 echo "Running Traffic Test on GE ports in PHY mode ..."
    228 tr 72 RunMode=PHY PortBitMap=$pbmge c=10 sp=1000
    229 $done
    230 
    231 echo "Running Traffic Test on XE ports in MAC mode ..."
    232 tr 72 RunMode=MAC PortBitMap=$pbmxe c=10 sp=10G
    233 $done
    234 
    235 echo "Running Traffic Test on XE ports in PHY mode ..."
    236 tr 72 RunMode=PHY PortBitMap=$pbmxe c=10 sp=10G
    237 $done
    238 
    239 echo "Running Traffic Test on HG ports in MAC mode ..."
    240 tr 72 RunMode=MAC PortBitMap=$pbmhg c=10 sp=11G
    241 $done
    242 
    243 echo "Running Traffic Test on HG ports in PHY mode ..."
    244 tr 72 RunMode=PHY PortBitMap=$pbmhg c=10 sp=11G
    245 $done
    246 
    247 # Show status
    248 date
    249 tl
    250 local returnCode $?
    251 
    252 echo Tests Complete.  Reinitializing ...
    253 config refresh
    254 rcload rc.soc
    255 counter off
    256 l2mode off
    257 
    258 # We want to show the return code from the tl command which
    259 # lists the results. The automated test infrastructure keys off of this
    260 # value
    261 echo "testsuite: finished: sanity: $returnCode"