1 2 #ifndef __MICROCODE_CONSTANTS_H_ 3 #define __MICROCODE_CONSTANTS_H_ 4 5 /* This file defines HSI constants common to all microcode flows */ 6 7 /* offset in bits of protocol in the state context parameter */ 8 #define PROTOCOL_STATE_BIT_OFFSET 6 9 10 //state value to bitwise or for protocol 11 #define ETH_STATE (ETH_CONNECTION_TYPE << PROTOCOL_STATE_BIT_OFFSET) 12 #define TOE_STATE (TOE_CONNECTION_TYPE << PROTOCOL_STATE_BIT_OFFSET) 13 #define RDMA_STATE (RDMA_CONNECTION_TYPE << PROTOCOL_STATE_BIT_OFFSET) 14 15 /* microcode fixed page page size 4K (chains and ring segments) */ 16 #define MC_PAGE_SIZE 4096 17 18 /* Number of indices per slow-path SB */ 19 #define HC_SP_SB_MAX_INDICES 16 /* The Maximum of all */ 20 21 /* Number of indices per SB */ 22 #define HC_SB_MAX_INDICES_E1X 8 /* Multiple of 4 */ 23 #define HC_SB_MAX_INDICES_E2 8 /* Multiple of 4 */ 24 25 /* Number of SB */ 26 #define HC_SB_MAX_SB_E1X 32 27 #define HC_SB_MAX_SB_E2 136 /* include PF */ 28 29 /* ID of slow path status block */ 30 #define HC_SP_SB_ID 0xde 31 32 /* Num of State machines */ 33 #define HC_SB_MAX_SM 2 /* Fixed */ 34 35 /* Num of dynamic indices */ 36 #define HC_SB_MAX_DYNAMIC_INDICES 4 /* 0..3 fixed */ 37 38 /* max number of slow path commands per port */ 39 #define MAX_RAMRODS_PER_PORT 8 40 41 42 /**** DEFINES FOR TIMERS/CLOCKS RESOLUTIONS ****/ 43 44 /* chip timers frequency constants */ 45 #define TIMERS_TICK_SIZE_CHIP (1e-3) 46 47 /* used in toe: TsRecentAge, MaxRt, and temporarily RTT */ 48 #define TSEMI_CLK1_RESUL_CHIP (1e-3) 49 50 /* temporarily used for RTT */ 51 #define XSEMI_CLK1_RESUL_CHIP (1e-3) 52 53 /* used for Host Coallescing */ 54 #define SDM_TIMER_TICK_RESUL_CHIP (4 * (1e-6)) 55 #define TSDM_TIMER_TICK_RESUL_CHIP (1 * (1e-6)) 56 57 /**** END DEFINES FOR TIMERS/CLOCKS RESOLUTIONS ****/ 58 59 #define XSTORM_IP_ID_ROLL_HALF 0x8000 60 #define XSTORM_IP_ID_ROLL_ALL 0 61 62 /* assert list: number of entries */ 63 #define FW_LOG_LIST_SIZE 50 64 65 #define NUM_OF_SAFC_BITS 16 66 #define MAX_COS_NUMBER 4 67 #define MAX_TRAFFIC_TYPES 8 68 #define MAX_PFC_PRIORITIES 8 69 70 /* used by array traffic_type_to_priority[] to mark traffic type that is not mapped to priority*/ 71 #define LLFC_TRAFFIC_TYPE_TO_PRIORITY_UNMAPPED 0xFF 72 73 /* Event Ring definitions */ 74 #define C_ERES_PER_PAGE ( PAGE_SIZE / BITS_TO_BYTES(STRUCT_SIZE(event_ring_elem)) ) 75 #define C_ERE_PER_PAGE_MASK ( C_ERES_PER_PAGE - 1 ) 76 77 /* number of statistic command */ 78 #define STATS_QUERY_CMD_COUNT 16 79 80 /* niv list table size */ 81 #define AFEX_LIST_TABLE_SIZE 4096 82 83 /* invalid VNIC Id. used in VNIC classification */ 84 #define INVALID_VNIC_ID 0xFF 85 86 /* used for indicating an undefined RAM offset in the IRO arrays */ 87 #define UNDEF_IRO 0x80000000 88 89 /* used for defining the amount of FCoE tasks supported for PF */ 90 #define MAX_FCOE_FUNCS_PER_ENGINE 2 91 #define MAX_NUM_FCOE_TASKS_PER_ENGINE 4096 /*Each port can have at max 1 function*/ 92 93 #endif /*__MICROCODE_CONSTANTS_H_*/ 94