1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2019 Broadcom
10 typedef enum tf_type {
12 TF_TYPE_LAST = TF_TYPE_TRUFLOW,
15 typedef enum tf_subtype {
16 HWRM_TFT_REG_GET = 821,
17 HWRM_TFT_REG_SET = 822,
18 HWRM_TFT_TBL_TYPE_BULK_GET = 825,
19 TF_SUBTYPE_LAST = HWRM_TFT_TBL_TYPE_BULK_GET,
22 /* Request and Response compile time checking */
23 /* u32_t tlv_req_value[26]; */
24 #define TF_MAX_REQ_SIZE 104
25 /* u32_t tlv_resp_value[170]; */
26 #define TF_MAX_RESP_SIZE 680
28 /* Use this to allocate/free any kind of
29 * indexes over HWRM and fill the parms pointer
31 #define TF_BULK_RECV 128
32 #define TF_BULK_SEND 16
35 #define TF_DEV_DATA_TYPE_TF_EM_RULE_INSERT_KEY_DATA 0x2e30UL
37 #define TF_DEV_DATA_TYPE_TF_EM_RULE_DELETE_KEY_DATA 0x2e40UL
38 /* L2 Context DMA Address Type */
39 #define TF_DEV_DATA_TYPE_TF_L2_CTX_DMA_ADDR 0x2fe0UL
40 /* L2 Context Entry */
41 #define TF_DEV_DATA_TYPE_TF_L2_CTX_ENTRY 0x2fe1UL
42 /* Prof tcam DMA Address Type */
43 #define TF_DEV_DATA_TYPE_TF_PROF_TCAM_DMA_ADDR 0x3030UL
45 #define TF_DEV_DATA_TYPE_TF_PROF_TCAM_ENTRY 0x3031UL
46 /* WC DMA Address Type */
47 #define TF_DEV_DATA_TYPE_TF_WC_DMA_ADDR 0x30d0UL
49 #define TF_DEV_DATA_TYPE_TF_WC_ENTRY 0x30d1UL
51 #define TF_DEV_DATA_TYPE_TF_ACTION_DATA 0x3170UL
52 #define TF_DEV_DATA_TYPE_LAST TF_DEV_DATA_TYPE_TF_ACTION_DATA
54 #define TF_BITS2BYTES(x) (((x) + 7) >> 3)
55 #define TF_BITS2BYTES_WORD_ALIGN(x) ((((x) + 31) >> 5) * 4)
57 struct tf_tbl_type_bulk_get_input;
58 struct tf_tbl_type_bulk_get_output;
60 /* Input params for table type get */
61 typedef struct tf_tbl_type_bulk_get_input {
63 uint32_t fw_session_id;
66 /* When set to 0, indicates the get apply to RX */
67 #define TF_TBL_TYPE_BULK_GET_INPUT_FLAGS_DIR_RX (0x0)
68 /* When set to 1, indicates the get apply to TX */
69 #define TF_TBL_TYPE_BULK_GET_INPUT_FLAGS_DIR_TX (0x1)
70 /* When set to 1, indicates the clear entry on read */
71 #define TF_TBL_TYPE_BULK_GET_INPUT_FLAGS_CLEAR_ON_READ (0x2)
72 /* Type of the object to set */
74 /* Starting index to get from */
76 /* Number of entries to get */
78 /* Host memory where data will be stored */
80 } tf_tbl_type_bulk_get_input_t, *ptf_tbl_type_bulk_get_input_t;
82 /* Output params for table type get */
83 typedef struct tf_tbl_type_bulk_get_output {
84 /* Size of the total data read in bytes */
86 } tf_tbl_type_bulk_get_output_t, *ptf_tbl_type_bulk_get_output_t;
88 #endif /* _HWRM_TF_H_ */