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

bcm56344sanity.soc (4964B)


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