1*14b24e2bSVaishali Kulkarni /*
2*14b24e2bSVaishali Kulkarni * CDDL HEADER START
3*14b24e2bSVaishali Kulkarni *
4*14b24e2bSVaishali Kulkarni * The contents of this file are subject to the terms of the
5*14b24e2bSVaishali Kulkarni * Common Development and Distribution License, v.1,  (the "License").
6*14b24e2bSVaishali Kulkarni * You may not use this file except in compliance with the License.
7*14b24e2bSVaishali Kulkarni *
8*14b24e2bSVaishali Kulkarni * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*14b24e2bSVaishali Kulkarni * or http://opensource.org/licenses/CDDL-1.0.
10*14b24e2bSVaishali Kulkarni * See the License for the specific language governing permissions
11*14b24e2bSVaishali Kulkarni * and limitations under the License.
12*14b24e2bSVaishali Kulkarni *
13*14b24e2bSVaishali Kulkarni * When distributing Covered Code, include this CDDL HEADER in each
14*14b24e2bSVaishali Kulkarni * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*14b24e2bSVaishali Kulkarni * If applicable, add the following below this CDDL HEADER, with the
16*14b24e2bSVaishali Kulkarni * fields enclosed by brackets "[]" replaced with your own identifying
17*14b24e2bSVaishali Kulkarni * information: Portions Copyright [yyyy] [name of copyright owner]
18*14b24e2bSVaishali Kulkarni *
19*14b24e2bSVaishali Kulkarni * CDDL HEADER END
20*14b24e2bSVaishali Kulkarni */
21*14b24e2bSVaishali Kulkarni 
22*14b24e2bSVaishali Kulkarni /*
23*14b24e2bSVaishali Kulkarni * Copyright 2014-2017 Cavium, Inc.
24*14b24e2bSVaishali Kulkarni * The contents of this file are subject to the terms of the Common Development
25*14b24e2bSVaishali Kulkarni * and Distribution License, v.1,  (the "License").
26*14b24e2bSVaishali Kulkarni 
27*14b24e2bSVaishali Kulkarni * You may not use this file except in compliance with the License.
28*14b24e2bSVaishali Kulkarni 
29*14b24e2bSVaishali Kulkarni * You can obtain a copy of the License at available
30*14b24e2bSVaishali Kulkarni * at http://opensource.org/licenses/CDDL-1.0
31*14b24e2bSVaishali Kulkarni 
32*14b24e2bSVaishali Kulkarni * See the License for the specific language governing permissions and
33*14b24e2bSVaishali Kulkarni * limitations under the License.
34*14b24e2bSVaishali Kulkarni */
35*14b24e2bSVaishali Kulkarni 
36*14b24e2bSVaishali Kulkarni #ifndef _USER_DBG_FW_FUNCS_H
37*14b24e2bSVaishali Kulkarni #define _USER_DBG_FW_FUNCS_H
38*14b24e2bSVaishali Kulkarni /******************************** Constants **********************************/
39*14b24e2bSVaishali Kulkarni 
40*14b24e2bSVaishali Kulkarni #define MAX_NAME_LEN	16
41*14b24e2bSVaishali Kulkarni 
42*14b24e2bSVaishali Kulkarni 
43*14b24e2bSVaishali Kulkarni /***************************** Public Functions *******************************/
44*14b24e2bSVaishali Kulkarni 
45*14b24e2bSVaishali Kulkarni /**
46*14b24e2bSVaishali Kulkarni  * @brief ecore_dbg_user_set_bin_ptr - Sets a pointer to the binary data with
47*14b24e2bSVaishali Kulkarni  * debug arrays.
48*14b24e2bSVaishali Kulkarni  *
49*14b24e2bSVaishali Kulkarni  * @param bin_ptr - a pointer to the binary data with debug arrays.
50*14b24e2bSVaishali Kulkarni  */
51*14b24e2bSVaishali Kulkarni enum dbg_status ecore_dbg_user_set_bin_ptr(const u8 * const bin_ptr);
52*14b24e2bSVaishali Kulkarni 
53*14b24e2bSVaishali Kulkarni /**
54*14b24e2bSVaishali Kulkarni  * @brief ecore_dbg_get_storm_id - Returns an ID for the specified storm name.
55*14b24e2bSVaishali Kulkarni  *
56*14b24e2bSVaishali Kulkarni  * @param storm_name - Storm name.
57*14b24e2bSVaishali Kulkarni  *
58*14b24e2bSVaishali Kulkarni  * @return an ID for the specified storm name, or NUM_OF_STORMS if not found.
59*14b24e2bSVaishali Kulkarni  */
60*14b24e2bSVaishali Kulkarni enum dbg_storms ecore_dbg_get_storm_id(const char *storm_name);
61*14b24e2bSVaishali Kulkarni 
62*14b24e2bSVaishali Kulkarni /**
63*14b24e2bSVaishali Kulkarni  * @brief ecore_dbg_get_block_id - Returns an ID for the specified block name.
64*14b24e2bSVaishali Kulkarni  *
65*14b24e2bSVaishali Kulkarni  * @param block_name - Block name.
66*14b24e2bSVaishali Kulkarni  *
67*14b24e2bSVaishali Kulkarni  * @return an ID for the specified block name, or NUM_OF_BLOCKS if not found.
68*14b24e2bSVaishali Kulkarni  */
69*14b24e2bSVaishali Kulkarni enum block_id ecore_dbg_get_block_id(const char *block_name);
70*14b24e2bSVaishali Kulkarni 
71*14b24e2bSVaishali Kulkarni /**
72*14b24e2bSVaishali Kulkarni  * @brief ecore_dbg_get_storm_mode_id - Returns an ID for the specified Storm
73*14b24e2bSVaishali Kulkarni  * mode name.
74*14b24e2bSVaishali Kulkarni  *
75*14b24e2bSVaishali Kulkarni  * @param storm_mode_name - Storm mode name.
76*14b24e2bSVaishali Kulkarni  *
77*14b24e2bSVaishali Kulkarni  * @return an ID for the specified Storm mode name, or MAX_DBG_BUS_STORM_MODES
78*14b24e2bSVaishali Kulkarni  * if not found.
79*14b24e2bSVaishali Kulkarni  */
80*14b24e2bSVaishali Kulkarni enum dbg_bus_storm_modes ecore_dbg_get_storm_mode_id(const char *storm_mode_name);
81*14b24e2bSVaishali Kulkarni 
82*14b24e2bSVaishali Kulkarni /**
83*14b24e2bSVaishali Kulkarni  * @brief ecore_dbg_get_constraint_op_id - Returns an ID for the specified
84*14b24e2bSVaishali Kulkarni  * constraint operation name.
85*14b24e2bSVaishali Kulkarni  *
86*14b24e2bSVaishali Kulkarni  * @param op_name - operation name.
87*14b24e2bSVaishali Kulkarni  *
88*14b24e2bSVaishali Kulkarni  * @return an ID for the specified constraint operation name, or
89*14b24e2bSVaishali Kulkarni  * MAX_DBG_BUS_CONSTRAINT_OPS if not found.
90*14b24e2bSVaishali Kulkarni  */
91*14b24e2bSVaishali Kulkarni enum dbg_bus_constraint_ops ecore_dbg_get_constraint_op_id(const char *op_name);
92*14b24e2bSVaishali Kulkarni 
93*14b24e2bSVaishali Kulkarni /**
94*14b24e2bSVaishali Kulkarni  * @brief ecore_dbg_get_status_str - Returns a string for the specified status.
95*14b24e2bSVaishali Kulkarni  *
96*14b24e2bSVaishali Kulkarni  * @param status - a debug status code.
97*14b24e2bSVaishali Kulkarni  *
98*14b24e2bSVaishali Kulkarni  * @return a string for the specified status
99*14b24e2bSVaishali Kulkarni  */
100*14b24e2bSVaishali Kulkarni const char* ecore_dbg_get_status_str(enum dbg_status status);
101*14b24e2bSVaishali Kulkarni 
102*14b24e2bSVaishali Kulkarni /**
103*14b24e2bSVaishali Kulkarni  * @brief ecore_dbg_get_grc_param_id - Returns an ID for the specified GRC
104*14b24e2bSVaishali Kulkarni  * param name.
105*14b24e2bSVaishali Kulkarni  *
106*14b24e2bSVaishali Kulkarni  * @param param_name - GRC param name.
107*14b24e2bSVaishali Kulkarni  *
108*14b24e2bSVaishali Kulkarni  * @return an ID for the specified GRC param name, or NUM_OF_GRC_PARAMS if not
109*14b24e2bSVaishali Kulkarni  * found.
110*14b24e2bSVaishali Kulkarni  */
111*14b24e2bSVaishali Kulkarni enum dbg_grc_params ecore_dbg_get_grc_param_id(const char *param_name);
112*14b24e2bSVaishali Kulkarni 
113*14b24e2bSVaishali Kulkarni /**
114*14b24e2bSVaishali Kulkarni  * @brief ecore_dbg_get_dbg_bus_line - Returns an ID for the specified Debug Bus
115*14b24e2bSVaishali Kulkarni  * line.
116*14b24e2bSVaishali Kulkarni  *
117*14b24e2bSVaishali Kulkarni  * @param block_id - block ID
118*14b24e2bSVaishali Kulkarni  * @param chip_id -  chip ID
119*14b24e2bSVaishali Kulkarni  * @param line -     a string containing a debug line name that belongs to the
120*14b24e2bSVaishali Kulkarni  *		     specified block/chip, or an 8-bit debug line number.
121*14b24e2bSVaishali Kulkarni  *
122*14b24e2bSVaishali Kulkarni  * @return an ID for the specified Debug Bus line name, or -1 if not found.
123*14b24e2bSVaishali Kulkarni  */
124*14b24e2bSVaishali Kulkarni int ecore_dbg_get_dbg_bus_line(enum block_id block_id, enum chip_ids chip_id, const char *line);
125*14b24e2bSVaishali Kulkarni 
126*14b24e2bSVaishali Kulkarni /**
127*14b24e2bSVaishali Kulkarni  * @brief ecore_get_idle_chk_results_buf_size - Returns the required buffer
128*14b24e2bSVaishali Kulkarni  * size for idle check results (in bytes).
129*14b24e2bSVaishali Kulkarni  *
130*14b24e2bSVaishali Kulkarni  * @param p_hwfn -		      HW device data
131*14b24e2bSVaishali Kulkarni  * @param dump_buf -	      idle check dump buffer.
132*14b24e2bSVaishali Kulkarni  * @param num_dumped_dwords - number of dwords that were dumped.
133*14b24e2bSVaishali Kulkarni  * @param results_buf_size -  OUT: required buffer size (in bytes) for the
134*14b24e2bSVaishali Kulkarni  *			      parsed results.
135*14b24e2bSVaishali Kulkarni  *
136*14b24e2bSVaishali Kulkarni  * @return error if the parsing fails, ok otherwise.
137*14b24e2bSVaishali Kulkarni  */
138*14b24e2bSVaishali Kulkarni enum dbg_status ecore_get_idle_chk_results_buf_size(struct ecore_hwfn *p_hwfn,
139*14b24e2bSVaishali Kulkarni 													u32 *dump_buf,
140*14b24e2bSVaishali Kulkarni 													u32 num_dumped_dwords,
141*14b24e2bSVaishali Kulkarni 													u32 *results_buf_size);
142*14b24e2bSVaishali Kulkarni 
143*14b24e2bSVaishali Kulkarni /**
144*14b24e2bSVaishali Kulkarni  * @brief ecore_print_idle_chk_results - Prints idle check results
145*14b24e2bSVaishali Kulkarni  *
146*14b24e2bSVaishali Kulkarni  * @param p_hwfn -			HW device data
147*14b24e2bSVaishali Kulkarni  * @param dump_buf -		idle check dump buffer.
148*14b24e2bSVaishali Kulkarni  * @param num_dumped_dwords -	number of dwords that were dumped.
149*14b24e2bSVaishali Kulkarni  * @param results_buf -		buffer for printing the idle check results.
150*14b24e2bSVaishali Kulkarni  * @param num_errors -		OUT: number of errors found in idle check.
151*14b24e2bSVaishali Kulkarni  * @param num_warnings -	OUT: number of warnings found in idle check.
152*14b24e2bSVaishali Kulkarni  *
153*14b24e2bSVaishali Kulkarni  * @return error if the parsing fails, ok otherwise.
154*14b24e2bSVaishali Kulkarni  */
155*14b24e2bSVaishali Kulkarni enum dbg_status ecore_print_idle_chk_results(struct ecore_hwfn *p_hwfn,
156*14b24e2bSVaishali Kulkarni 											 u32 *dump_buf,
157*14b24e2bSVaishali Kulkarni 											 u32 num_dumped_dwords,
158*14b24e2bSVaishali Kulkarni 											 char *results_buf,
159*14b24e2bSVaishali Kulkarni 											 u32 *num_errors,
160*14b24e2bSVaishali Kulkarni 											 u32 *num_warnings);
161*14b24e2bSVaishali Kulkarni 
162*14b24e2bSVaishali Kulkarni /**
163*14b24e2bSVaishali Kulkarni  * @brief ecore_dbg_mcp_trace_set_meta_data - Sets a pointer to the MCP Trace
164*14b24e2bSVaishali Kulkarni  * meta data.
165*14b24e2bSVaishali Kulkarni  *
166*14b24e2bSVaishali Kulkarni  * Needed in case the MCP Trace dump doesn't contain the meta data (e.g. due to
167*14b24e2bSVaishali Kulkarni  * no NVRAM access).
168*14b24e2bSVaishali Kulkarni  *
169*14b24e2bSVaishali Kulkarni  * @param data - pointer to MCP Trace meta data
170*14b24e2bSVaishali Kulkarni  * @param size - size of MCP Trace meta data in dwords
171*14b24e2bSVaishali Kulkarni  */
172*14b24e2bSVaishali Kulkarni void ecore_dbg_mcp_trace_set_meta_data(u32 *data,
173*14b24e2bSVaishali Kulkarni 									   u32 size);
174*14b24e2bSVaishali Kulkarni 
175*14b24e2bSVaishali Kulkarni /**
176*14b24e2bSVaishali Kulkarni  * @brief ecore_get_mcp_trace_results_buf_size - Returns the required buffer
177*14b24e2bSVaishali Kulkarni  * size for MCP Trace results (in bytes).
178*14b24e2bSVaishali Kulkarni  *
179*14b24e2bSVaishali Kulkarni  * @param p_hwfn -		      HW device data
180*14b24e2bSVaishali Kulkarni  * @param dump_buf -	      MCP Trace dump buffer.
181*14b24e2bSVaishali Kulkarni  * @param num_dumped_dwords - number of dwords that were dumped.
182*14b24e2bSVaishali Kulkarni  * @param results_buf_size -  OUT: required buffer size (in bytes) for the
183*14b24e2bSVaishali Kulkarni  *			      parsed results.
184*14b24e2bSVaishali Kulkarni  *
185*14b24e2bSVaishali Kulkarni  * @return error if the parsing fails, ok otherwise.
186*14b24e2bSVaishali Kulkarni  */
187*14b24e2bSVaishali Kulkarni enum dbg_status ecore_get_mcp_trace_results_buf_size(struct ecore_hwfn *p_hwfn,
188*14b24e2bSVaishali Kulkarni 													 u32 *dump_buf,
189*14b24e2bSVaishali Kulkarni 													 u32 num_dumped_dwords,
190*14b24e2bSVaishali Kulkarni 													 u32 *results_buf_size);
191*14b24e2bSVaishali Kulkarni 
192*14b24e2bSVaishali Kulkarni 
193*14b24e2bSVaishali Kulkarni /**
194*14b24e2bSVaishali Kulkarni  * @brief ecore_print_mcp_trace_results - Prints MCP Trace results
195*14b24e2bSVaishali Kulkarni  *
196*14b24e2bSVaishali Kulkarni  * @param p_hwfn -		      HW device data
197*14b24e2bSVaishali Kulkarni  * @param dump_buf -	      mcp trace dump buffer, starting from the header.
198*14b24e2bSVaishali Kulkarni  * @param num_dumped_dwords - number of dwords that were dumped.
199*14b24e2bSVaishali Kulkarni  * @param results_buf -	      buffer for printing the mcp trace results.
200*14b24e2bSVaishali Kulkarni  *
201*14b24e2bSVaishali Kulkarni  * @return error if the parsing fails, ok otherwise.
202*14b24e2bSVaishali Kulkarni  */
203*14b24e2bSVaishali Kulkarni enum dbg_status ecore_print_mcp_trace_results(struct ecore_hwfn *p_hwfn,
204*14b24e2bSVaishali Kulkarni 											  u32 *dump_buf,
205*14b24e2bSVaishali Kulkarni 											  u32 num_dumped_dwords,
206*14b24e2bSVaishali Kulkarni 											  char *results_buf);
207*14b24e2bSVaishali Kulkarni 
208*14b24e2bSVaishali Kulkarni /**
209*14b24e2bSVaishali Kulkarni  * @brief ecore_get_reg_fifo_results_buf_size - Returns the required buffer
210*14b24e2bSVaishali Kulkarni  * size for reg_fifo results (in bytes).
211*14b24e2bSVaishali Kulkarni  *
212*14b24e2bSVaishali Kulkarni  * @param p_hwfn -		      HW device data
213*14b24e2bSVaishali Kulkarni  * @param dump_buf -	      reg fifo dump buffer.
214*14b24e2bSVaishali Kulkarni  * @param num_dumped_dwords - number of dwords that were dumped.
215*14b24e2bSVaishali Kulkarni  * @param results_buf_size -  OUT: required buffer size (in bytes) for the
216*14b24e2bSVaishali Kulkarni  *			      parsed results.
217*14b24e2bSVaishali Kulkarni  *
218*14b24e2bSVaishali Kulkarni  * @return error if the parsing fails, ok otherwise.
219*14b24e2bSVaishali Kulkarni  */
220*14b24e2bSVaishali Kulkarni enum dbg_status ecore_get_reg_fifo_results_buf_size(struct ecore_hwfn *p_hwfn,
221*14b24e2bSVaishali Kulkarni 													u32 *dump_buf,
222*14b24e2bSVaishali Kulkarni 													u32 num_dumped_dwords,
223*14b24e2bSVaishali Kulkarni 													u32 *results_buf_size);
224*14b24e2bSVaishali Kulkarni 
225*14b24e2bSVaishali Kulkarni /**
226*14b24e2bSVaishali Kulkarni  * @brief ecore_print_reg_fifo_results - Prints reg fifo results
227*14b24e2bSVaishali Kulkarni  *
228*14b24e2bSVaishali Kulkarni  * @param p_hwfn -			HW device data
229*14b24e2bSVaishali Kulkarni  * @param dump_buf -		reg fifo dump buffer, starting from the header.
230*14b24e2bSVaishali Kulkarni  * @param num_dumped_dwords -	number of dwords that were dumped.
231*14b24e2bSVaishali Kulkarni  * @param results_buf -		buffer for printing the reg fifo results.
232*14b24e2bSVaishali Kulkarni  *
233*14b24e2bSVaishali Kulkarni  * @return error if the parsing fails, ok otherwise.
234*14b24e2bSVaishali Kulkarni  */
235*14b24e2bSVaishali Kulkarni enum dbg_status ecore_print_reg_fifo_results(struct ecore_hwfn *p_hwfn,
236*14b24e2bSVaishali Kulkarni 											 u32 *dump_buf,
237*14b24e2bSVaishali Kulkarni 											 u32 num_dumped_dwords,
238*14b24e2bSVaishali Kulkarni 											 char *results_buf);
239*14b24e2bSVaishali Kulkarni 
240*14b24e2bSVaishali Kulkarni /**
241*14b24e2bSVaishali Kulkarni  * @brief ecore_get_igu_fifo_results_buf_size - Returns the required buffer size
242*14b24e2bSVaishali Kulkarni  * for igu_fifo results (in bytes).
243*14b24e2bSVaishali Kulkarni  *
244*14b24e2bSVaishali Kulkarni  * @param p_hwfn -		      HW device data
245*14b24e2bSVaishali Kulkarni  * @param dump_buf -	      IGU fifo dump buffer.
246*14b24e2bSVaishali Kulkarni  * @param num_dumped_dwords - number of dwords that were dumped.
247*14b24e2bSVaishali Kulkarni  * @param results_buf_size -  OUT: required buffer size (in bytes) for the
248*14b24e2bSVaishali Kulkarni  *			      parsed results.
249*14b24e2bSVaishali Kulkarni  *
250*14b24e2bSVaishali Kulkarni  * @return error if the parsing fails, ok otherwise.
251*14b24e2bSVaishali Kulkarni  */
252*14b24e2bSVaishali Kulkarni enum dbg_status ecore_get_igu_fifo_results_buf_size(struct ecore_hwfn *p_hwfn,
253*14b24e2bSVaishali Kulkarni 													u32 *dump_buf,
254*14b24e2bSVaishali Kulkarni 													u32 num_dumped_dwords,
255*14b24e2bSVaishali Kulkarni 													u32 *results_buf_size);
256*14b24e2bSVaishali Kulkarni 
257*14b24e2bSVaishali Kulkarni /**
258*14b24e2bSVaishali Kulkarni * @brief ecore_print_igu_fifo_results - Prints IGU fifo results
259*14b24e2bSVaishali Kulkarni *
260*14b24e2bSVaishali Kulkarni * @param p_hwfn -		     HW device data
261*14b24e2bSVaishali Kulkarni * @param dump_buf -	     IGU fifo dump buffer, starting from the header.
262*14b24e2bSVaishali Kulkarni * @param num_dumped_dwords - number of dwords that were dumped.
263*14b24e2bSVaishali Kulkarni * @param results_buf -	     buffer for printing the IGU fifo results.
264*14b24e2bSVaishali Kulkarni *
265*14b24e2bSVaishali Kulkarni * @return error if the parsing fails, ok otherwise.
266*14b24e2bSVaishali Kulkarni */
267*14b24e2bSVaishali Kulkarni enum dbg_status ecore_print_igu_fifo_results(struct ecore_hwfn *p_hwfn,
268*14b24e2bSVaishali Kulkarni 											 u32 *dump_buf,
269*14b24e2bSVaishali Kulkarni 											 u32 num_dumped_dwords,
270*14b24e2bSVaishali Kulkarni 											 char *results_buf);
271*14b24e2bSVaishali Kulkarni 
272*14b24e2bSVaishali Kulkarni /**
273*14b24e2bSVaishali Kulkarni  * @brief ecore_get_protection_override_results_buf_size - Returns the required
274*14b24e2bSVaishali Kulkarni  * buffer size for protection override results (in bytes).
275*14b24e2bSVaishali Kulkarni  *
276*14b24e2bSVaishali Kulkarni  * @param p_hwfn -		      HW device data
277*14b24e2bSVaishali Kulkarni  * @param dump_buf -	      protection override dump buffer.
278*14b24e2bSVaishali Kulkarni  * @param num_dumped_dwords - number of dwords that were dumped.
279*14b24e2bSVaishali Kulkarni  * @param results_buf_size -  OUT: required buffer size (in bytes) for the parsed results.
280*14b24e2bSVaishali Kulkarni  *
281*14b24e2bSVaishali Kulkarni  * @return error if the parsing fails, ok otherwise.
282*14b24e2bSVaishali Kulkarni  */
283*14b24e2bSVaishali Kulkarni enum dbg_status ecore_get_protection_override_results_buf_size(struct ecore_hwfn *p_hwfn,
284*14b24e2bSVaishali Kulkarni 															   u32 *dump_buf,
285*14b24e2bSVaishali Kulkarni 															   u32 num_dumped_dwords,
286*14b24e2bSVaishali Kulkarni 															   u32 *results_buf_size);
287*14b24e2bSVaishali Kulkarni 
288*14b24e2bSVaishali Kulkarni /*
289*14b24e2bSVaishali Kulkarni  * @brief ecore_print_protection_override_results - Prints protection override
290*14b24e2bSVaishali Kulkarni  * results.
291*14b24e2bSVaishali Kulkarni  *
292*14b24e2bSVaishali Kulkarni  * @param p_hwfn -               HW device data
293*14b24e2bSVaishali Kulkarni  * @param dump_buf -          protection override dump buffer, starting from
294*14b24e2bSVaishali Kulkarni  *			      the header.
295*14b24e2bSVaishali Kulkarni  * @param num_dumped_dwords - number of dwords that were dumped.
296*14b24e2bSVaishali Kulkarni  * @param results_buf -       buffer for printing the reg fifo results.
297*14b24e2bSVaishali Kulkarni  *
298*14b24e2bSVaishali Kulkarni  * @return error if the parsing fails, ok otherwise.
299*14b24e2bSVaishali Kulkarni  */
300*14b24e2bSVaishali Kulkarni enum dbg_status ecore_print_protection_override_results(struct ecore_hwfn *p_hwfn,
301*14b24e2bSVaishali Kulkarni 														u32 *dump_buf,
302*14b24e2bSVaishali Kulkarni 														u32 num_dumped_dwords,
303*14b24e2bSVaishali Kulkarni 														char *results_buf);
304*14b24e2bSVaishali Kulkarni 
305*14b24e2bSVaishali Kulkarni /**
306*14b24e2bSVaishali Kulkarni  * @brief ecore_get_fw_asserts_results_buf_size - Returns the required buffer
307*14b24e2bSVaishali Kulkarni  * size for FW Asserts results (in bytes).
308*14b24e2bSVaishali Kulkarni  *
309*14b24e2bSVaishali Kulkarni  * @param p_hwfn -		      HW device data
310*14b24e2bSVaishali Kulkarni  * @param dump_buf -	      FW Asserts dump buffer.
311*14b24e2bSVaishali Kulkarni  * @param num_dumped_dwords - number of dwords that were dumped.
312*14b24e2bSVaishali Kulkarni  * @param results_buf_size -  OUT: required buffer size (in bytes) for the
313*14b24e2bSVaishali Kulkarni  *			      parsed results.
314*14b24e2bSVaishali Kulkarni  *
315*14b24e2bSVaishali Kulkarni  * @return error if the parsing fails, ok otherwise.
316*14b24e2bSVaishali Kulkarni */
317*14b24e2bSVaishali Kulkarni enum dbg_status ecore_get_fw_asserts_results_buf_size(struct ecore_hwfn *p_hwfn,
318*14b24e2bSVaishali Kulkarni 													  u32 *dump_buf,
319*14b24e2bSVaishali Kulkarni 													  u32 num_dumped_dwords,
320*14b24e2bSVaishali Kulkarni 													  u32 *results_buf_size);
321*14b24e2bSVaishali Kulkarni 
322*14b24e2bSVaishali Kulkarni /**
323*14b24e2bSVaishali Kulkarni * @brief ecore_print_fw_asserts_results - Prints FW Asserts results
324*14b24e2bSVaishali Kulkarni *
325*14b24e2bSVaishali Kulkarni * @param p_hwfn -		     HW device data
326*14b24e2bSVaishali Kulkarni * @param dump_buf -	     FW Asserts dump buffer, starting from the header.
327*14b24e2bSVaishali Kulkarni * @param num_dumped_dwords - number of dwords that were dumped.
328*14b24e2bSVaishali Kulkarni * @param results_buf -	     buffer for printing the FW Asserts results.
329*14b24e2bSVaishali Kulkarni *
330*14b24e2bSVaishali Kulkarni * @return error if the parsing fails, ok otherwise.
331*14b24e2bSVaishali Kulkarni */
332*14b24e2bSVaishali Kulkarni enum dbg_status ecore_print_fw_asserts_results(struct ecore_hwfn *p_hwfn,
333*14b24e2bSVaishali Kulkarni 											   u32 *dump_buf,
334*14b24e2bSVaishali Kulkarni 											   u32 num_dumped_dwords,
335*14b24e2bSVaishali Kulkarni 											   char *results_buf);
336*14b24e2bSVaishali Kulkarni 
337*14b24e2bSVaishali Kulkarni /**
338*14b24e2bSVaishali Kulkarni  * @brief ecore_dbg_parse_attn - Parses and prints attention registers values in
339*14b24e2bSVaishali Kulkarni  * the specified results struct.
340*14b24e2bSVaishali Kulkarni  *
341*14b24e2bSVaishali Kulkarni  * @param p_hwfn -	    HW device data
342*14b24e2bSVaishali Kulkarni  * @param results - Pointer to the attention read results
343*14b24e2bSVaishali Kulkarni  *
344*14b24e2bSVaishali Kulkarni  * @return error if one of the following holds:
345*14b24e2bSVaishali Kulkarni  *	- the version wasn't set
346*14b24e2bSVaishali Kulkarni  * Otherwise, returns ok.
347*14b24e2bSVaishali Kulkarni  */
348*14b24e2bSVaishali Kulkarni enum dbg_status ecore_dbg_parse_attn(struct ecore_hwfn *p_hwfn,
349*14b24e2bSVaishali Kulkarni 									 struct dbg_attn_block_result *results);
350*14b24e2bSVaishali Kulkarni 
351*14b24e2bSVaishali Kulkarni 
352*14b24e2bSVaishali Kulkarni #endif
353