debug.c (2602B)
1 /* 2 * 3 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 4 * 5 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 6 * 7 * socdiag debug commands 8 */ 9 #include <shared/bsl.h> 10 #include <appl/diag/system.h> 11 #include <soc/mem.h> 12 13 #include <soc/devids.h> 14 #include <soc/debug.h> 15 16 #if defined(BCM_ESW_SUPPORT) || defined(BCM_SAND_SUPPORT) 17 #ifdef BROADCOM_DEBUG 18 19 /* 20 * INTERNAL: Slot header format, for chip debug only 21 */ 22 typedef struct slot_header_s { 23 #if defined(LE_HOST) 24 uint32 timestamp:14, /* Timestamp for this Packet */ 25 ipx:1, /* IPX Packet */ 26 ip:1, /* IP Packet */ 27 BCxMC:1, /* This is a Broadcast or Multicast Packet */ 28 O:2, /* Router help bits */ 29 cell_len:6, /* How many bytes are in this cell */ 30 crc:2, /* Tells Egress how to treat CRC */ 31 lc:1, /* Last Cell of Packet */ 32 fc:1, /* First Cell of Packet */ 33 purge:1, /* Purge this packet */ 34 ncl:2; /* Next Cell Length */ 35 uint32 cpu_opcode:4, /* Opcode to help out the CPU */ 36 _pad0:1, /* Reserved */ 37 slot_size:6, /* Slot Size */ 38 copy_count:5, /* How many copies of this slot are valid */ 39 nsp:16; /* Next Slot Pointer */ 40 uint32 ls:1, /* Last Slot in Chain */ 41 src_port:5, /* The source port for this packet */ 42 _pad1:7, /* Reserved */ 43 slot_csum_lo:19; /* Slot Checksum (lower bits) */ 44 uint32 slot_csum_hi; /* Slot Checksum (upper bits) */ 45 #else /* BE host */ 46 uint32 ncl:2, 47 purge:1, 48 fc:1, 49 lc:1, 50 crc:2, 51 cell_len:6, 52 O:2, 53 BCxMC:1, 54 ip:1, 55 ipx:1, 56 timestamp:14; 57 uint32 nsp:16, 58 copy_count:5, 59 slot_size:6, 60 _pad0:1, 61 cpu_opcode:4; 62 uint32 slot_csum_lo:19, 63 _pad1:7, 64 src_port:5, 65 ls:1; 66 uint32 slot_csum_hi; 67 #endif 68 } slot_header_t; 69 70 #endif /* BROADCOM_DEBUG */ 71 #endif /* BCM_ESW_SUPPORT || BCM_SAND_SUPPORT */ 72 73 char bkpmon_usage[] = 74 "Parameters: none\n\t" 75 "Monitors for backpressure discard messages.\n\t" 76 "Displays the gcccount registers when changes occur.\n"; 77 78 cmd_result_t 79 dbg_bkpmon(int unit, args_t *a) 80 { 81 return CMD_NOTIMPL; 82 }