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

bcm56049sanity.soc (6049B)


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