30#ifndef __CUDBG_ENTITY_H__
31#define __CUDBG_ENTITY_H__
34#define ATTRIBUTE_UNUSED __attribute__ ((unused))
36#define ATTRIBUTE_UNUSED
44#define NUM_PCIE_CONFIG_REGS 0x61
45#define CUDBG_CTXT_SIZE_BYTES 24
46#define CUDBG_MAX_INGRESS_QIDS 65536
47#define CUDBG_MAX_FL_QIDS 2048
48#define CUDBG_MAX_CNM_QIDS 1024
49#define CUDBG_LOWMEM_MAX_CTXT_QIDS 256
51#define CUDBG_MAX_RPLC_SIZE 128
52#define CUDBG_NUM_REQ_REGS 17
53#define CUDBG_MAX_TCAM_TID 0x800
54#define CUDBG_NUM_ULPTX 11
55#define CUDBG_NUM_ULPTX_READ 512
57#define SN_REG_ADDR 0x183f
58#define BN_REG_ADDR 0x1819
59#define NA_REG_ADDR 0x185a
60#define MN_REG_ADDR 0x1803
62#define A_MPS_VF_RPLCT_MAP0 0x1111c
63#define A_MPS_VF_RPLCT_MAP1 0x11120
64#define A_MPS_VF_RPLCT_MAP2 0x11124
65#define A_MPS_VF_RPLCT_MAP3 0x11128
66#define A_MPS_VF_RPLCT_MAP4 0x11300
67#define A_MPS_VF_RPLCT_MAP5 0x11304
68#define A_MPS_VF_RPLCT_MAP6 0x11308
69#define A_MPS_VF_RPLCT_MAP7 0x1130c
71#define PORT_TYPE_ADDR 0x1869
72#define PORT_TYPE_LEN 8
75#define SN_T6_ADDR 0x83f
76#define BN_T6_ADDR 0x819
77#define NA_T6_ADDR 0x85a
78#define MN_T6_ADDR 0x803
84#define MAX_VPD_DATA_LEN 32
86#define VPD_VER_ADDR 0x18c7
88#define SCFG_VER_ADDR 0x06
91#define CUDBG_CIM_BUSY_BIT (1 << 17)
93#define CUDBG_CHAC_PBT_ADDR 0x2800
94#define CUDBG_CHAC_PBT_LRF 0x3000
95#define CUDBG_CHAC_PBT_DATA 0x3800
96#define CUDBG_PBT_DYNAMIC_ENTRIES 8
97#define CUDBG_PBT_STATIC_ENTRIES 16
98#define CUDBG_LRF_ENTRIES 8
99#define CUDBG_PBT_DATA_ENTRIES 512
101#define CUDBG_ENTITY_SIGNATURE 0xCCEDB001
102#define CUDBG_TID_INFO_REV 1
103#define CUDBG_MAC_STATS_REV 1
106#define ARRAY_SIZE(_a) (sizeof((_a)) / sizeof((_a)[0]))
147struct cudbg_mbox_log {
148 struct mbox_cmd entry;
300#ifndef __NO_DRIVER_OCQ_SUPPORT__
306 "DBQ contexts:",
"IMSG contexts:",
"FLM cache:",
"TCBs:",
307 "Pstructs:",
"Timers:",
"Rx FL:",
"Tx FL:",
"Pstruct FL:",
308 "Tx payload:",
"Rx payload:",
"LE hash:",
"iSCSI region:",
309 "TDDP region:",
"TPT region:",
"STAG region:",
"RQ region:",
310 "RQUDP region:",
"PBL region:",
"TXPBL region:",
311 "DBVFIFO region:",
"ULPRX state:",
"ULPTX state:",
312#ifndef __NO_DRIVER_OCQ_SUPPORT__
367#pragma warning(disable : 4200)
762 {0x7e40, 0x7e44, 0x020, 28},
763 {0x7e40, 0x7e44, 0x040, 10},
764 {0x7e40, 0x7e44, 0x050, 10},
765 {0x7e40, 0x7e44, 0x060, 14},
766 {0x7e40, 0x7e44, 0x06F, 1},
767 {0x7e40, 0x7e44, 0x070, 6},
768 {0x7e40, 0x7e44, 0x130, 18},
769 {0x7e40, 0x7e44, 0x145, 19},
770 {0x7e40, 0x7e44, 0x160, 1},
771 {0x7e40, 0x7e44, 0x230, 25},
772 {0x7e40, 0x7e44, 0x24a, 3},
773 {0x7e40, 0x7e44, 0x8C0, 1}
777 {0x7e40, 0x7e44, 0x020, 28},
778 {0x7e40, 0x7e44, 0x040, 19},
779 {0x7e40, 0x7e44, 0x054, 2},
780 {0x7e40, 0x7e44, 0x060, 13},
781 {0x7e40, 0x7e44, 0x06F, 1},
782 {0x7e40, 0x7e44, 0x120, 4},
783 {0x7e40, 0x7e44, 0x12b, 2},
784 {0x7e40, 0x7e44, 0x12f, 21},
785 {0x7e40, 0x7e44, 0x145, 19},
786 {0x7e40, 0x7e44, 0x230, 25},
787 {0x7e40, 0x7e44, 0x8C0, 1}
791 {0x78f8, 0x78fc, 0xa000, 23},
792 {0x78f8, 0x78fc, 0xa400, 30},
793 {0x78f8, 0x78fc, 0xa800, 20}
797 {0x78f8, 0x78fc, 0xe400, 17},
798 {0x78f8, 0x78fc, 0xe640, 13}
802 {0x51320, 0x51324, 0xa000, 32}
805 {0x5a04, 0x5a0c, 0x00, 0x20},
806 {0x5a04, 0x5a0c, 0x21, 0x20},
807 {0x5a04, 0x5a0c, 0x41, 0x10},
828 {0x5a10, 0x5a18, 0x00, 0x20},
829 {0x5a10, 0x5a18, 0x21, 0x18},
833 {0x7e18, 0x7e1c, 0x0, 12}
837 {0x7e18, 0x7e1c, 0x0, 12}
841 {0x8FD0, 0x8FD4, 0x10000, 0x20},
842 {0x8FD0, 0x8FD4, 0x10021, 0x0D},
846 {0x8FF0, 0x8FF4, 0x10000, 0x20},
847 {0x8FF0, 0x8FF4, 0x10021, 0x1D},
851 {0x7e50, 0x7e54, 0x0, 13},
852 {0x7e50, 0x7e54, 0x10, 6},
853 {0x7e50, 0x7e54, 0x18, 21},
854 {0x7e50, 0x7e54, 0x30, 32},
855 {0x7e50, 0x7e54, 0x50, 22},
856 {0x7e50, 0x7e54, 0x68, 12}
860 {0x7e50, 0x7e54, 0x0, 13},
861 {0x7e50, 0x7e54, 0x10, 6},
862 {0x7e50, 0x7e54, 0x18, 8},
863 {0x7e50, 0x7e54, 0x20, 13},
864 {0x7e50, 0x7e54, 0x30, 16},
865 {0x7e50, 0x7e54, 0x40, 16},
866 {0x7e50, 0x7e54, 0x50, 16},
867 {0x7e50, 0x7e54, 0x60, 6},
868 {0x7e50, 0x7e54, 0x68, 4}
872 {0x10cc, 0x10d0, 0x0, 16},
873 {0x10cc, 0x10d4, 0x0, 16},
877 {0x7b50, 0x7b54, 0x2000, 0x20},
878 {0x7b50, 0x7b54, 0x2080, 0x1d},
879 {0x7b50, 0x7b54, 0x00, 0x20},
880 {0x7b50, 0x7b54, 0x80, 0x20},
881 {0x7b50, 0x7b54, 0x100, 0x11},
882 {0x7b50, 0x7b54, 0x200, 0x10},
883 {0x7b50, 0x7b54, 0x240, 0x2},
884 {0x7b50, 0x7b54, 0x250, 0x2},
885 {0x7b50, 0x7b54, 0x260, 0x2},
886 {0x7b50, 0x7b54, 0x270, 0x2},
887 {0x7b50, 0x7b54, 0x280, 0x20},
888 {0x7b50, 0x7b54, 0x300, 0x20},
889 {0x7b50, 0x7b54, 0x380, 0x14},
894 {0x7b50, 0x7b54, 0x2000, 0x20},
895 {0x7b50, 0x7b54, 0x2080, 0x19},
896 {0x7b50, 0x7b54, 0x00, 0x20},
897 {0x7b50, 0x7b54, 0x80, 0x20},
898 {0x7b50, 0x7b54, 0x100, 0x11},
899 {0x7b50, 0x7b54, 0x200, 0x10},
900 {0x7b50, 0x7b54, 0x240, 0x2},
901 {0x7b50, 0x7b54, 0x250, 0x2},
902 {0x7b50, 0x7b54, 0x260, 0x2},
903 {0x7b50, 0x7b54, 0x270, 0x2},
904 {0x7b50, 0x7b54, 0x280, 0x20},
905 {0x7b50, 0x7b54, 0x300, 0x20},
906 {0x7b50, 0x7b54, 0x380, 0x14},
#define CUDBG_LRF_ENTRIES
static u32 ATTRIBUTE_UNUSED t5_pcie_config_array[][2]
#define CUDBG_NUM_ULPTX_READ
static u32 ATTRIBUTE_UNUSED t5_pm_rx_array[][4]
static u32 ATTRIBUTE_UNUSED t5_up_cim_reg_array[][4]
static const char *const region[]
static u32 ATTRIBUTE_UNUSED t5_tp_mib_index_array[9][4]
static u32 ATTRIBUTE_UNUSED t5_pcie_cdbg_array[][4]
static u32 ATTRIBUTE_UNUSED t5_pcie_pdbg_array[][4]
static u32 ATTRIBUTE_UNUSED t6_tp_pio_array[][4]
#define CUDBG_PBT_DATA_ENTRIES
static u32 ATTRIBUTE_UNUSED t5_pm_tx_array[][4]
#define CUDBG_PBT_DYNAMIC_ENTRIES
static u32 ATTRIBUTE_UNUSED t5_tp_pio_array[][4]
static u32 ATTRIBUTE_UNUSED t5_tp_tm_pio_array[1][4]
static u32 ATTRIBUTE_UNUSED t6_ma_ireg_array[][4]
static u32 ATTRIBUTE_UNUSED t6_up_cim_reg_array[][4]
#define CUDBG_PBT_STATIC_ENTRIES
static u32 ATTRIBUTE_UNUSED t6_tp_tm_pio_array[1][4]
static u32 ATTRIBUTE_UNUSED t6_ma_ireg_array2[][4]
#define CUDBG_NUM_REQ_REGS
static u32 ATTRIBUTE_UNUSED t6_hma_ireg_array[][4]
static u32 ATTRIBUTE_UNUSED t6_tp_mib_index_array[6][4]
static u32 ATTRIBUTE_UNUSED t5_sge_dbg_index_array[9][4]
uint32_t data[SGE_CTXT_SIZE/4]
u32 lrf_table[CUDBG_LRF_ENTRIES]
u32 pbt_static[CUDBG_PBT_STATIC_ENTRIES]
u32 pbt_dynamic[CUDBG_PBT_DYNAMIC_ENTRIES]
u32 pbt_data[CUDBG_PBT_DATA_ENTRIES]
u32 data[CUDBG_NUM_REQ_REGS]
u16 base[CIM_NUM_IBQ+CIM_NUM_OBQ_T5]
u32 stat[4 *(CIM_NUM_IBQ+CIM_NUM_OBQ_T5)]
u16 size[CIM_NUM_IBQ+CIM_NUM_OBQ_T5]
u32 obq_wr[2 *CIM_NUM_OBQ_T5]
struct lb_port_stats s[0]
struct cudbg_ver_hdr ver_hdr
struct port_stats stats[4]
struct port_stats stats[4]
u32 loopback_alloc[NCHAN]
struct struct_mem_desc mem[ARRAY_SIZE(region)+3]
struct struct_port_usage port_data[4]
struct struct_mem_desc avail[4]
struct tp_tcp_stats v4 v6
struct tp_cpl_stats stats
struct tp_err_stats stats
struct tp_fcoe_stats stats[4]
u32 data[ULPRX_LA_SIZE *8]
u32 wrptr[CUDBG_NUM_ULPTX]
u32 rddata[CUDBG_NUM_ULPTX]
u32 rd_data[CUDBG_NUM_ULPTX][CUDBG_NUM_ULPTX_READ]
u32 rdptr[CUDBG_NUM_ULPTX]
struct cudbg_ver_hdr ver_hdr
struct tid_info_region tid
struct tp_mib_type TP_MIB_FCOE_BYTE_3_LO
struct tp_mib_type TP_MIB_TNL_LPBK_0
struct tp_mib_type TP_MIB_CPL_IN_REQ_2
struct tp_mib_type TP_MIB_TNL_CNG_DROP_2
struct tp_mib_type TP_MIB_FCOE_BYTE_3_HI
struct tp_mib_type TP_MIB_TNL_DROP_3
struct tp_mib_type TP_MIB_USM_BYTES_LO
struct tp_mib_type TP_MIB_TNL_IN_PKT_3
struct tp_mib_type TP_MIB_TCP_OUT_SEG_HI
struct tp_mib_type TP_MIB_OFD_CHN_DROP_1
struct tp_mib_type TP_MIB_TCP_V6RXT_SEG_LO
struct tp_mib_type TP_MIB_TNL_LPBK_1
struct tp_mib_type TP_MIB_TCP_V6IN_ERR_1
struct tp_mib_type TP_MIB_CPL_IN_REQ_0
struct tp_mib_type TP_MIB_TCP_IN_SEG_LO
struct tp_mib_type TP_MIB_HDR_IN_ERR_1
struct tp_mib_type TP_MIB_TCP_V6OUT_RST
struct tp_mib_type TP_MIB_TCP_V6RXT_SEG_HI
struct tp_mib_type TP_MIB_TCP_V6IN_ERR_0
struct tp_mib_type TP_MIB_FCOE_DROP_3
struct tp_mib_type TP_MIB_TCP_V6OUT_SEG_HI
struct tp_mib_type TP_MIB_TCP_RXT_SEG_HI
struct tp_mib_type TP_MIB_CPL_IN_REQ_3
struct tp_mib_type TP_MIB_MAC_IN_ERR_0
struct tp_mib_type TP_MIB_TNL_OUT_PKT_3
struct tp_mib_type TP_MIB_OFD_CHN_DROP_2
struct tp_mib_type TP_MIB_TID_ACT
struct tp_mib_type TP_MIB_USM_PKTS
struct tp_mib_type TP_MIB_TNL_LPBK_3
struct tp_mib_type TP_MIB_TNL_CNG_DROP_0
struct tp_mib_type TP_MIB_TNL_CNG_DROP_3
struct tp_mib_type TP_MIB_TNL_CNG_DROP_1
struct tp_mib_type TP_MIB_CPL_OUT_RSP_2
struct tp_mib_type TP_MIB_FCOE_DROP_1
struct tp_mib_type TP_MIB_USM_DROP
struct tp_mib_type TP_MIB_HDR_IN_ERR_2
struct tp_mib_type TP_MIB_TCP_IN_ERR_0
struct tp_mib_type TP_MIB_TCP_OUT_SEG_LO
struct tp_mib_type TP_MIB_CPL_OUT_RSP_1
struct tp_mib_type TP_MIB_TID_INV
struct tp_mib_type TP_MIB_TNL_OUT_PKT_0
struct tp_mib_type TP_MIB_OFD_DFR_DROP
struct tp_mib_type TP_MIB_FCOE_BYTE_0_LO
struct tp_mib_type TP_MIB_MAC_IN_ERR_3
struct tp_mib_type TP_MIB_USM_BYTES_HI
struct tp_mib_type TP_MIB_TNL_LPBK_2
struct tp_mib_type TP_MIB_OFD_VLN_DROP_2
struct tp_mib_type TP_MIB_CPL_OUT_RSP_3
struct tp_mib_type TP_MIB_TCP_OUT_RST
struct tp_mib_type TP_MIB_TNL_IN_PKT_2
struct tp_mib_type TP_MIB_FCOE_DDP_2
struct tp_mib_type TP_MIB_TCP_IN_SEG_HI
struct tp_mib_type TP_MIB_MAC_IN_ERR_2
struct tp_mib_type TP_MIB_HDR_IN_ERR_3
struct tp_mib_type TP_MIB_TCP_IN_ERR_1
struct tp_mib_type TP_MIB_TCP_V6IN_ERR_2
struct tp_mib_type TP_MIB_TNL_IN_PKT_1
struct tp_mib_type TP_MIB_OFD_CHN_DROP_3
struct tp_mib_type TP_MIB_TNL_DROP_1
struct tp_mib_type TP_MIB_TNL_OUT_PKT_1
struct tp_mib_type TP_MIB_OFD_ARP_DROP
struct tp_mib_type TP_MIB_FCOE_DDP_1
struct tp_mib_type TP_MIB_TCP_V6OUT_SEG_LO
struct tp_mib_type TP_MIB_HDR_IN_ERR_0
struct tp_mib_type TP_MIB_TNL_OUT_PKT_2
struct tp_mib_type TP_MIB_CPL_OUT_RSP_0
struct tp_mib_type TP_MIB_TCP_V6IN_ERR_3
struct tp_mib_type TP_MIB_FCOE_BYTE_2_HI
struct tp_mib_type TP_MIB_FCOE_BYTE_0_HI
struct tp_mib_type TP_MIB_OFD_VLN_DROP_1
struct tp_mib_type TP_MIB_TID_DEL
struct tp_mib_type TP_MIB_TID_PAS
struct tp_mib_type TP_MIB_MAC_IN_ERR_1
struct tp_mib_type TP_MIB_TCP_V6IN_SEG_LO
struct tp_mib_type TP_MIB_TNL_DROP_0
struct tp_mib_type TP_MIB_FCOE_BYTE_1_LO
struct tp_mib_type TP_MIB_RQE_DFR_MOD
struct tp_mib_type TP_MIB_CPL_IN_REQ_1
struct tp_mib_type TP_MIB_TCP_IN_ERR_2
struct tp_mib_type TP_MIB_FCOE_DDP_0
struct tp_mib_type TP_MIB_OFD_VLN_DROP_0
struct tp_mib_type TP_MIB_OFD_CHN_DROP_0
struct tp_mib_type TP_MIB_RQE_DFR_PKT
struct tp_mib_type TP_MIB_OFD_VLN_DROP_3
struct tp_mib_type TP_MIB_TNL_DROP_2
struct tp_mib_type TP_MIB_TNL_IN_PKT_0
struct tp_mib_type TP_MIB_FCOE_DROP_2
struct tp_mib_type TP_MIB_TCP_RXT_SEG_LO
struct tp_mib_type TP_MIB_FCOE_BYTE_1_HI
struct tp_mib_type TP_MIB_FCOE_BYTE_2_LO
struct tp_mib_type TP_MIB_TCP_V6IN_SEG_HI
struct tp_mib_type TP_MIB_FCOE_DROP_0
struct tp_mib_type TP_MIB_FCOE_DDP_3
struct tp_mib_type TP_MIB_TCP_IN_ERR_3
struct wtp_type_2 sge_debug_data_high_index_6
struct wtp_type_1 sge_cim
struct wtp_type_2 sge_debug_data_high_indx7
struct wtp_type_2 pcie_cmd_stat2
struct wtp_type_2 sge_debug_data_high_index_3
struct wtp_type_2 rx_xgm_xgm
struct wtp_type_2 pcie_dma1_stat2_core
struct wtp_type_2 mac_porrx_aframestra_ok
struct wtp_type_1 mac_porrx_etherstatspkts
struct wtp_type_2 pcie_t5_dma_stat3
struct wtp_type_2 sge_pcie_dma_req
struct wtp_type_2 tpeside_pld
struct wtp_data::_xgm_mps xgm_mps
struct wtp_type_2 pcie_core_dmaw
struct wtp_type_2 tpcside_pm
struct wtp_type_2 utx_sge_dma_req
struct wtp_type_2 ulprx_tpcside
struct wtp_type_2 tpcside_rxcpl
struct wtp_type_1 core_pcie_cmd_rsp
struct wtp_type_2 tpcside_uturn
struct wtp_type_1 pcie_core_cmd_req
struct wtp_type_2 mps_tpeside
struct wtp_type_1 sge_debug_data_high_indx9
struct wtp_type_1 sge_debug_data_high_indx1
struct wtp_type_2 pcie_core_dmai
struct wtp_type_2 pcie_sge_dma_rsp
struct wtp_type_2 pcie_dma1_stat2
struct wtp_type_2 tpcside_txcpl
struct wtp_type_2 tpeside_mps
struct wtp_type_2 mac_portx_pkt_count
struct wtp_type_2 sge_pcie
struct wtp_type_2 tpeside_pm
struct wtp_type_2 sge_debug_data_high_indx5
struct wtp_type_1 mac_portx_etherstatspkts
struct wtp_type_2 wire_xgm
struct wtp_type_2 core_pcie_dma_rsp
struct wtp_type_1 tpeside_pmrx
struct wtp_type_2 pmrx_ulprx
struct wtp_type_1 pcie_sge_cmd_rsp
struct wtp_type_2 tpcside_rxarb
struct wtp_type_0 le_db_rsp_cnt
struct wtp_type_1 utx_tpcside_tx
struct wtp_type_1 sge_work_req_pkt
struct wtp_type_1 csw_sge
struct wtp_type_2 pcie_cmd_stat3
struct wtp_type_3 mps_xgm
struct wtp_type_2 pcie_core_dma_req
struct wtp_type_2 tp_dbg_eside_pktx
struct wtp_type_2 ulp_se_cnt_chx
struct wtp_type_1 sge_pcie_cmd_req
struct wtp_type_2 mac_portx_aframestra_ok
struct wtp_type_2 utx_tpcside
struct wtp_type_2 mac_porrx_pkt_count
struct wtp_type_2 tpcside_rxpld
struct wtp_type_2 xgm_wire
struct wtp_type_2 tpcside_csw
struct wtp_type_2 sge_utx
struct wtp_type_2 tx_xgm_xgm
struct wtp_type_2 sge_pcie_ints