1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2019-2021 Broadcom
6 #ifndef _TF_DEVICE_P58_H_
7 #define _TF_DEVICE_P58_H_
9 #include "cfa_resource_types.h"
12 #include "tf_if_tbl.h"
13 #include "tf_global_cfg.h"
15 struct tf_rm_element_cfg tf_ident_p58[TF_IDENT_TYPE_MAX] = {
16 [TF_IDENT_TYPE_L2_CTXT_HIGH] = {
17 TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P58_L2_CTXT_REMAP_HIGH,
20 [TF_IDENT_TYPE_L2_CTXT_LOW] = {
21 TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P58_L2_CTXT_REMAP_LOW,
24 [TF_IDENT_TYPE_PROF_FUNC] = {
25 TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P58_PROF_FUNC,
28 [TF_IDENT_TYPE_WC_PROF] = {
29 TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P58_WC_TCAM_PROF_ID,
32 [TF_IDENT_TYPE_EM_PROF] = {
33 TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P58_EM_PROF_ID,
38 struct tf_rm_element_cfg tf_tcam_p58[TF_TCAM_TBL_TYPE_MAX] = {
39 [TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH] = {
40 TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_HIGH,
43 [TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW] = {
44 TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_LOW,
47 [TF_TCAM_TBL_TYPE_PROF_TCAM] = {
48 TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P58_PROF_TCAM,
51 [TF_TCAM_TBL_TYPE_WC_TCAM] = {
52 TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P58_WC_TCAM,
55 [TF_TCAM_TBL_TYPE_VEB_TCAM] = {
56 TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P58_VEB_TCAM,
61 struct tf_rm_element_cfg tf_tbl_p58[TF_TBL_TYPE_MAX] = {
62 [TF_TBL_TYPE_EM_FKB] = {
63 TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P58_EM_FKB,
66 [TF_TBL_TYPE_WC_FKB] = {
67 TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P58_WC_FKB,
70 [TF_TBL_TYPE_METER_PROF] = {
71 TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P58_METER_PROF,
74 [TF_TBL_TYPE_METER_INST] = {
75 TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P58_METER,
78 [TF_TBL_TYPE_METER_DROP_CNT] = {
79 TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P58_METER_DROP_CNT,
82 [TF_TBL_TYPE_MIRROR_CONFIG] = {
83 TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P58_MIRROR,
86 [TF_TBL_TYPE_METADATA] = {
87 TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P58_METADATA,
90 /* Policy - ARs in bank 1 */
91 [TF_TBL_TYPE_FULL_ACT_RECORD] = {
92 .cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_PARENT,
93 .hcapi_type = CFA_RESOURCE_TYPE_P58_SRAM_BANK_1,
96 [TF_TBL_TYPE_COMPACT_ACT_RECORD] = {
97 .cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_CHILD,
98 .parent_subtype = TF_TBL_TYPE_FULL_ACT_RECORD,
99 .hcapi_type = CFA_RESOURCE_TYPE_P58_SRAM_BANK_1,
102 /* Policy - Encaps in bank 2 */
103 [TF_TBL_TYPE_ACT_ENCAP_8B] = {
104 .cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_PARENT,
105 .hcapi_type = CFA_RESOURCE_TYPE_P58_SRAM_BANK_2,
108 [TF_TBL_TYPE_ACT_ENCAP_16B] = {
109 .cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_CHILD,
110 .parent_subtype = TF_TBL_TYPE_ACT_ENCAP_8B,
111 .hcapi_type = CFA_RESOURCE_TYPE_P58_SRAM_BANK_2,
114 [TF_TBL_TYPE_ACT_ENCAP_32B] = {
115 .cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_CHILD,
116 .parent_subtype = TF_TBL_TYPE_ACT_ENCAP_8B,
117 .hcapi_type = CFA_RESOURCE_TYPE_P58_SRAM_BANK_2,
120 [TF_TBL_TYPE_ACT_ENCAP_64B] = {
121 .cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_CHILD,
122 .parent_subtype = TF_TBL_TYPE_ACT_ENCAP_8B,
123 .hcapi_type = CFA_RESOURCE_TYPE_P58_SRAM_BANK_2,
126 /* Policy - Modify in bank 2 with Encaps */
127 [TF_TBL_TYPE_ACT_MODIFY_8B] = {
128 .cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_CHILD,
129 .parent_subtype = TF_TBL_TYPE_ACT_ENCAP_8B,
130 .hcapi_type = CFA_RESOURCE_TYPE_P58_SRAM_BANK_2,
133 [TF_TBL_TYPE_ACT_MODIFY_16B] = {
134 .cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_CHILD,
135 .parent_subtype = TF_TBL_TYPE_ACT_ENCAP_8B,
136 .hcapi_type = CFA_RESOURCE_TYPE_P58_SRAM_BANK_2,
139 [TF_TBL_TYPE_ACT_MODIFY_32B] = {
140 .cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_CHILD,
141 .parent_subtype = TF_TBL_TYPE_ACT_ENCAP_8B,
142 .hcapi_type = CFA_RESOURCE_TYPE_P58_SRAM_BANK_2,
145 [TF_TBL_TYPE_ACT_MODIFY_64B] = {
146 .cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_CHILD,
147 .parent_subtype = TF_TBL_TYPE_ACT_ENCAP_8B,
148 .hcapi_type = CFA_RESOURCE_TYPE_P58_SRAM_BANK_2,
151 /* Policy - SP in bank 0 */
152 [TF_TBL_TYPE_ACT_SP_SMAC] = {
153 .cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_PARENT,
154 .hcapi_type = CFA_RESOURCE_TYPE_P58_SRAM_BANK_0,
157 [TF_TBL_TYPE_ACT_SP_SMAC_IPV4] = {
158 .cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_CHILD,
159 .parent_subtype = TF_TBL_TYPE_ACT_SP_SMAC,
160 .hcapi_type = CFA_RESOURCE_TYPE_P58_SRAM_BANK_0,
163 [TF_TBL_TYPE_ACT_SP_SMAC_IPV6] = {
164 .cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_CHILD,
165 .parent_subtype = TF_TBL_TYPE_ACT_SP_SMAC,
166 .hcapi_type = CFA_RESOURCE_TYPE_P58_SRAM_BANK_0,
169 /* Policy - Stats in bank 3 */
170 [TF_TBL_TYPE_ACT_STATS_64] = {
171 .cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_PARENT,
172 .hcapi_type = CFA_RESOURCE_TYPE_P58_SRAM_BANK_3,
177 struct tf_rm_element_cfg tf_em_int_p58[TF_EM_TBL_TYPE_MAX] = {
178 [TF_EM_TBL_TYPE_EM_RECORD] = {
179 TF_RM_ELEM_CFG_HCAPI, CFA_RESOURCE_TYPE_P58_EM_REC,
184 struct tf_if_tbl_cfg tf_if_tbl_p58[TF_IF_TBL_TYPE_MAX] = {
185 [TF_IF_TBL_TYPE_PROF_PARIF_DFLT_ACT_REC_PTR] = {
186 TF_IF_TBL_CFG, CFA_P58_TBL_PROF_PARIF_DFLT_ACT_REC_PTR},
187 [TF_IF_TBL_TYPE_PROF_PARIF_ERR_ACT_REC_PTR] = {
188 TF_IF_TBL_CFG, CFA_P58_TBL_PROF_PARIF_ERR_ACT_REC_PTR},
189 [TF_IF_TBL_TYPE_ILT] = {
190 TF_IF_TBL_CFG, CFA_P58_TBL_ILT},
191 [TF_IF_TBL_TYPE_VSPT] = {
192 TF_IF_TBL_CFG, CFA_P58_TBL_VSPT},
195 struct tf_global_cfg_cfg tf_global_cfg_p58[TF_GLOBAL_CFG_TYPE_MAX] = {
196 [TF_TUNNEL_ENCAP] = {
197 TF_GLOBAL_CFG_CFG_HCAPI, TF_TUNNEL_ENCAP
199 [TF_ACTION_BLOCK] = {
200 TF_GLOBAL_CFG_CFG_HCAPI, TF_ACTION_BLOCK
203 TF_GLOBAL_CFG_CFG_HCAPI, TF_COUNTER_CFG
206 TF_GLOBAL_CFG_CFG_HCAPI, TF_METER_CFG
208 [TF_METER_INTERVAL_CFG] = {
209 TF_GLOBAL_CFG_CFG_HCAPI, TF_METER_INTERVAL_CFG
212 #endif /* _TF_DEVICE_P58_H_ */