1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (c) 2020 Marvell Semiconductor Inc.
10 /* Forward Declaration */
12 enum ecore_dbg_features;
14 int qed_dbg_grc(struct ecore_dev *edev, void *buffer, u32 *num_dumped_bytes);
15 int qed_dbg_grc_size(struct ecore_dev *edev);
16 int qed_dbg_idle_chk(struct ecore_dev *edev, void *buffer,
17 u32 *num_dumped_bytes);
18 int qed_dbg_idle_chk_size(struct ecore_dev *edev);
19 int qed_dbg_reg_fifo(struct ecore_dev *edev, void *buffer,
20 u32 *num_dumped_bytes);
21 int qed_dbg_reg_fifo_size(struct ecore_dev *edev);
22 int qed_dbg_igu_fifo(struct ecore_dev *edev, void *buffer,
23 u32 *num_dumped_bytes);
24 int qed_dbg_igu_fifo_size(struct ecore_dev *edev);
25 int qed_dbg_protection_override(struct ecore_dev *edev, void *buffer,
26 u32 *num_dumped_bytes);
27 int qed_dbg_protection_override_size(struct ecore_dev *edev);
28 int qed_dbg_fw_asserts(struct ecore_dev *edev, void *buffer,
29 u32 *num_dumped_bytes);
30 int qed_dbg_fw_asserts_size(struct ecore_dev *edev);
31 int qed_dbg_ilt(struct ecore_dev *edev, void *buffer, u32 *num_dumped_bytes);
32 int qed_dbg_ilt_size(struct ecore_dev *edev);
33 int qed_dbg_mcp_trace(struct ecore_dev *edev, void *buffer,
34 u32 *num_dumped_bytes);
35 int qed_dbg_mcp_trace_size(struct ecore_dev *edev);
36 int qed_dbg_all_data(struct ecore_dev *edev, void *buffer);
37 int qed_dbg_all_data_size(struct ecore_dev *edev);
38 u8 qed_get_debug_engine(struct ecore_dev *edev);
39 void qed_set_debug_engine(struct ecore_dev *edev, int engine_number);
40 int qed_dbg_feature(struct ecore_dev *edev, void *buffer,
41 enum ecore_dbg_features feature, u32 *num_dumped_bytes);
43 qed_dbg_feature_size(struct ecore_dev *edev, enum ecore_dbg_features feature);
45 void qed_dbg_pf_init(struct ecore_dev *edev);
46 void qed_dbg_pf_exit(struct ecore_dev *edev);
48 /***************************** Public Functions *******************************/
51 * @brief qed_dbg_set_bin_ptr - Sets a pointer to the binary data with debug
54 * @param p_hwfn - HW device data
55 * @param bin_ptr - a pointer to the binary data with debug arrays.
57 enum dbg_status qed_dbg_set_bin_ptr(struct ecore_hwfn *p_hwfn,
58 const u8 * const bin_ptr);
61 * @brief qed_dbg_set_app_ver - Sets the version of the calling app.
63 * The application should call this function with the TOOLS_VERSION
64 * it compiles with. Must be called before all other debug functions.
66 * @return error if one of the following holds:
67 * - the specified app version is not supported
68 * Otherwise, returns ok.
70 enum dbg_status qed_dbg_set_app_ver(u32 ver);
73 * @brief qed_read_regs - Reads registers into a buffer (using GRC).
75 * @param p_hwfn - HW device data
76 * @param p_ptt - Ptt window used for writing the registers.
77 * @param buf - Destination buffer.
78 * @param addr - Source GRC address in dwords.
79 * @param len - Number of registers to read.
81 void qed_read_regs(struct ecore_hwfn *p_hwfn,
82 struct ecore_ptt *p_ptt, u32 *buf, u32 addr, u32 len);
85 * @brief qed_read_fw_info - Reads FW info from the chip.
87 * The FW info contains FW-related information, such as the FW version,
88 * FW image (main/L2B/kuku), FW timestamp, etc.
89 * The FW info is read from the internal RAM of the first Storm that is not in
92 * @param p_hwfn - HW device data
93 * @param p_ptt - Ptt window used for writing the registers.
94 * @param fw_info - Out: a pointer to write the FW info into.
96 * @return true if the FW info was read successfully from one of the Storms,
97 * or false if all Storms are in reset.
99 bool qed_read_fw_info(struct ecore_hwfn *p_hwfn,
100 struct ecore_ptt *p_ptt, struct fw_info *fw_info);
102 * @brief qed_dbg_grc_config - Sets the value of a GRC parameter.
104 * @param p_hwfn - HW device data
105 * @param grc_param - GRC parameter
106 * @param val - Value to set.
108 * @return error if one of the following holds:
109 * - the version wasn't set
110 * - grc_param is invalid
111 * - val is outside the allowed boundaries
113 enum dbg_status qed_dbg_grc_config(struct ecore_hwfn *p_hwfn,
114 enum dbg_grc_params grc_param, u32 val);
117 * @brief qed_dbg_grc_set_params_default - Reverts all GRC parameters to their
120 * @param p_hwfn - HW device data
122 void qed_dbg_grc_set_params_default(struct ecore_hwfn *p_hwfn);
124 * @brief qed_dbg_grc_get_dump_buf_size - Returns the required buffer size for
127 * @param p_hwfn - HW device data
128 * @param p_ptt - Ptt window used for writing the registers.
129 * @param buf_size - OUT: required buffer size (in dwords) for the GRC Dump
132 * @return error if one of the following holds:
133 * - the version wasn't set
134 * Otherwise, returns ok.
136 enum dbg_status qed_dbg_grc_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
137 struct ecore_ptt *p_ptt,
141 * @brief qed_dbg_grc_dump - Dumps GRC data into the specified buffer.
143 * @param p_hwfn - HW device data
144 * @param p_ptt - Ptt window used for writing the registers.
145 * @param dump_buf - Pointer to write the collected GRC data into.
146 * @param buf_size_in_dwords - Size of the specified buffer in dwords.
147 * @param num_dumped_dwords - OUT: number of dumped dwords.
149 * @return error if one of the following holds:
150 * - the version wasn't set
151 * - the specified dump buffer is too small
152 * Otherwise, returns ok.
154 enum dbg_status qed_dbg_grc_dump(struct ecore_hwfn *p_hwfn,
155 struct ecore_ptt *p_ptt,
157 u32 buf_size_in_dwords,
158 u32 *num_dumped_dwords);
160 * @brief qed_dbg_idle_chk_get_dump_buf_size - Returns the required buffer size
161 * for idle check results.
163 * @param p_hwfn - HW device data
164 * @param p_ptt - Ptt window used for writing the registers.
165 * @param buf_size - OUT: required buffer size (in dwords) for the idle check
168 * @return error if one of the following holds:
169 * - the version wasn't set
170 * Otherwise, returns ok.
172 enum dbg_status qed_dbg_idle_chk_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
173 struct ecore_ptt *p_ptt,
177 * @brief qed_dbg_idle_chk_dump - Performs idle check and writes the results
178 * into the specified buffer.
180 * @param p_hwfn - HW device data
181 * @param p_ptt - Ptt window used for writing the registers.
182 * @param dump_buf - Pointer to write the idle check data into.
183 * @param buf_size_in_dwords - Size of the specified buffer in dwords.
184 * @param num_dumped_dwords - OUT: number of dumped dwords.
186 * @return error if one of the following holds:
187 * - the version wasn't set
188 * - the specified buffer is too small
189 * Otherwise, returns ok.
191 enum dbg_status qed_dbg_idle_chk_dump(struct ecore_hwfn *p_hwfn,
192 struct ecore_ptt *p_ptt,
194 u32 buf_size_in_dwords,
195 u32 *num_dumped_dwords);
198 * @brief qed_dbg_mcp_trace_get_dump_buf_size - Returns the required buffer size
199 * for mcp trace results.
201 * @param p_hwfn - HW device data
202 * @param p_ptt - Ptt window used for writing the registers.
203 * @param buf_size - OUT: required buffer size (in dwords) for mcp trace data.
205 * @return error if one of the following holds:
206 * - the version wasn't set
207 * - the trace data in MCP scratchpad contain an invalid signature
208 * - the bundle ID in NVRAM is invalid
209 * - the trace meta data cannot be found (in NVRAM or image file)
210 * Otherwise, returns ok.
212 enum dbg_status qed_dbg_mcp_trace_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
213 struct ecore_ptt *p_ptt,
217 * @brief qed_dbg_mcp_trace_dump - Performs mcp trace and writes the results
218 * into the specified buffer.
220 * @param p_hwfn - HW device data
221 * @param p_ptt - Ptt window used for writing the registers.
222 * @param dump_buf - Pointer to write the mcp trace data into.
223 * @param buf_size_in_dwords - Size of the specified buffer in dwords.
224 * @param num_dumped_dwords - OUT: number of dumped dwords.
226 * @return error if one of the following holds:
227 * - the version wasn't set
228 * - the specified buffer is too small
229 * - the trace data in MCP scratchpad contain an invalid signature
230 * - the bundle ID in NVRAM is invalid
231 * - the trace meta data cannot be found (in NVRAM or image file)
232 * - the trace meta data cannot be read (from NVRAM or image file)
233 * Otherwise, returns ok.
235 enum dbg_status qed_dbg_mcp_trace_dump(struct ecore_hwfn *p_hwfn,
236 struct ecore_ptt *p_ptt,
238 u32 buf_size_in_dwords,
239 u32 *num_dumped_dwords);
242 * @brief qed_dbg_reg_fifo_get_dump_buf_size - Returns the required buffer size
243 * for grc trace fifo results.
245 * @param p_hwfn - HW device data
246 * @param p_ptt - Ptt window used for writing the registers.
247 * @param buf_size - OUT: required buffer size (in dwords) for reg fifo data.
249 * @return error if one of the following holds:
250 * - the version wasn't set
251 * Otherwise, returns ok.
253 enum dbg_status qed_dbg_reg_fifo_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
254 struct ecore_ptt *p_ptt,
258 * @brief qed_dbg_reg_fifo_dump - Reads the reg fifo and writes the results into
259 * the specified buffer.
261 * @param p_hwfn - HW device data
262 * @param p_ptt - Ptt window used for writing the registers.
263 * @param dump_buf - Pointer to write the reg fifo data into.
264 * @param buf_size_in_dwords - Size of the specified buffer in dwords.
265 * @param num_dumped_dwords - OUT: number of dumped dwords.
267 * @return error if one of the following holds:
268 * - the version wasn't set
269 * - the specified buffer is too small
270 * - DMAE transaction failed
271 * Otherwise, returns ok.
273 enum dbg_status qed_dbg_reg_fifo_dump(struct ecore_hwfn *p_hwfn,
274 struct ecore_ptt *p_ptt,
276 u32 buf_size_in_dwords,
277 u32 *num_dumped_dwords);
280 * @brief qed_dbg_igu_fifo_get_dump_buf_size - Returns the required buffer size
281 * for the IGU fifo results.
283 * @param p_hwfn - HW device data
284 * @param p_ptt - Ptt window used for writing the registers.
285 * @param buf_size - OUT: required buffer size (in dwords) for the IGU fifo
288 * @return error if one of the following holds:
289 * - the version wasn't set
290 * Otherwise, returns ok.
292 enum dbg_status qed_dbg_igu_fifo_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
293 struct ecore_ptt *p_ptt,
297 * @brief qed_dbg_igu_fifo_dump - Reads the IGU fifo and writes the results into
298 * the specified buffer.
300 * @param p_hwfn - HW device data
301 * @param p_ptt - Ptt window used for writing the registers.
302 * @param dump_buf - Pointer to write the IGU fifo data into.
303 * @param buf_size_in_dwords - Size of the specified buffer in dwords.
304 * @param num_dumped_dwords - OUT: number of dumped dwords.
306 * @return error if one of the following holds:
307 * - the version wasn't set
308 * - the specified buffer is too small
309 * - DMAE transaction failed
310 * Otherwise, returns ok.
312 enum dbg_status qed_dbg_igu_fifo_dump(struct ecore_hwfn *p_hwfn,
313 struct ecore_ptt *p_ptt,
315 u32 buf_size_in_dwords,
316 u32 *num_dumped_dwords);
319 * @brief qed_dbg_protection_override_get_dump_buf_size - Returns the required
320 * buffer size for protection override window results.
322 * @param p_hwfn - HW device data
323 * @param p_ptt - Ptt window used for writing the registers.
324 * @param buf_size - OUT: required buffer size (in dwords) for protection
327 * @return error if one of the following holds:
328 * - the version wasn't set
329 * Otherwise, returns ok.
332 qed_dbg_protection_override_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
333 struct ecore_ptt *p_ptt,
336 * @brief qed_dbg_protection_override_dump - Reads protection override window
337 * entries and writes the results into the specified buffer.
339 * @param p_hwfn - HW device data
340 * @param p_ptt - Ptt window used for writing the registers.
341 * @param dump_buf - Pointer to write the protection override data into.
342 * @param buf_size_in_dwords - Size of the specified buffer in dwords.
343 * @param num_dumped_dwords - OUT: number of dumped dwords.
345 * @return error if one of the following holds:
346 * - the version wasn't set
347 * - the specified buffer is too small
348 * - DMAE transaction failed
349 * Otherwise, returns ok.
351 enum dbg_status qed_dbg_protection_override_dump(struct ecore_hwfn *p_hwfn,
352 struct ecore_ptt *p_ptt,
354 u32 buf_size_in_dwords,
355 u32 *num_dumped_dwords);
357 * @brief qed_dbg_fw_asserts_get_dump_buf_size - Returns the required buffer
358 * size for FW Asserts results.
360 * @param p_hwfn - HW device data
361 * @param p_ptt - Ptt window used for writing the registers.
362 * @param buf_size - OUT: required buffer size (in dwords) for FW Asserts data.
364 * @return error if one of the following holds:
365 * - the version wasn't set
366 * Otherwise, returns ok.
368 enum dbg_status qed_dbg_fw_asserts_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
369 struct ecore_ptt *p_ptt,
372 * @brief qed_dbg_fw_asserts_dump - Reads the FW Asserts and writes the results
373 * into the specified buffer.
375 * @param p_hwfn - HW device data
376 * @param p_ptt - Ptt window used for writing the registers.
377 * @param dump_buf - Pointer to write the FW Asserts data into.
378 * @param buf_size_in_dwords - Size of the specified buffer in dwords.
379 * @param num_dumped_dwords - OUT: number of dumped dwords.
381 * @return error if one of the following holds:
382 * - the version wasn't set
383 * - the specified buffer is too small
384 * Otherwise, returns ok.
386 enum dbg_status qed_dbg_fw_asserts_dump(struct ecore_hwfn *p_hwfn,
387 struct ecore_ptt *p_ptt,
389 u32 buf_size_in_dwords,
390 u32 *num_dumped_dwords);
393 * @brief qed_dbg_read_attn - Reads the attention registers of the specified
394 * block and type, and writes the results into the specified buffer.
396 * @param p_hwfn - HW device data
397 * @param p_ptt - Ptt window used for writing the registers.
398 * @param block - Block ID.
399 * @param attn_type - Attention type.
400 * @param clear_status - Indicates if the attention status should be cleared.
401 * @param results - OUT: Pointer to write the read results into
403 * @return error if one of the following holds:
404 * - the version wasn't set
405 * Otherwise, returns ok.
407 enum dbg_status qed_dbg_read_attn(struct ecore_hwfn *p_hwfn,
408 struct ecore_ptt *p_ptt,
410 enum dbg_attn_type attn_type,
412 struct dbg_attn_block_result *results);
415 * @brief qed_dbg_print_attn - Prints attention registers values in the
416 * specified results struct.
419 * @param results - Pointer to the attention read results
421 * @return error if one of the following holds:
422 * - the version wasn't set
423 * Otherwise, returns ok.
425 enum dbg_status qed_dbg_print_attn(struct ecore_hwfn *p_hwfn,
426 struct dbg_attn_block_result *results);
428 /******************************* Data Types **********************************/
430 struct mcp_trace_format {
432 #define MCP_TRACE_FORMAT_MODULE_MASK 0x0000ffff
433 #define MCP_TRACE_FORMAT_MODULE_OFFSET 0
434 #define MCP_TRACE_FORMAT_LEVEL_MASK 0x00030000
435 #define MCP_TRACE_FORMAT_LEVEL_OFFSET 16
436 #define MCP_TRACE_FORMAT_P1_SIZE_MASK 0x000c0000
437 #define MCP_TRACE_FORMAT_P1_SIZE_OFFSET 18
438 #define MCP_TRACE_FORMAT_P2_SIZE_MASK 0x00300000
439 #define MCP_TRACE_FORMAT_P2_SIZE_OFFSET 20
440 #define MCP_TRACE_FORMAT_P3_SIZE_MASK 0x00c00000
441 #define MCP_TRACE_FORMAT_P3_SIZE_OFFSET 22
442 #define MCP_TRACE_FORMAT_LEN_MASK 0xff000000
443 #define MCP_TRACE_FORMAT_LEN_OFFSET 24
448 /* MCP Trace Meta data structure */
449 struct mcp_trace_meta {
453 struct mcp_trace_format *formats;
457 /* Debug Tools user data */
458 struct dbg_tools_user_data {
459 struct mcp_trace_meta mcp_trace_meta;
460 const u32 *mcp_trace_user_meta_buf;
463 /******************************** Constants **********************************/
465 #define MAX_NAME_LEN 16
467 /***************************** Public Functions *******************************/
470 * @brief qed_dbg_user_set_bin_ptr - Sets a pointer to the binary data with
473 * @param p_hwfn - HW device data
474 * @param bin_ptr - a pointer to the binary data with debug arrays.
476 enum dbg_status qed_dbg_user_set_bin_ptr(struct ecore_hwfn *p_hwfn,
477 const u8 * const bin_ptr);
480 * @brief qed_dbg_alloc_user_data - Allocates user debug data.
482 * @param p_hwfn - HW device data
483 * @param user_data_ptr - OUT: a pointer to the allocated memory.
485 enum dbg_status qed_dbg_alloc_user_data(struct ecore_hwfn *p_hwfn,
486 void **user_data_ptr);
489 * @brief qed_dbg_get_status_str - Returns a string for the specified status.
491 * @param status - a debug status code.
493 * @return a string for the specified status
495 const char *qed_dbg_get_status_str(enum dbg_status status);
498 * @brief qed_get_idle_chk_results_buf_size - Returns the required buffer size
499 * for idle check results (in bytes).
501 * @param p_hwfn - HW device data
502 * @param dump_buf - idle check dump buffer.
503 * @param num_dumped_dwords - number of dwords that were dumped.
504 * @param results_buf_size - OUT: required buffer size (in bytes) for the parsed
507 * @return error if the parsing fails, ok otherwise.
509 enum dbg_status qed_get_idle_chk_results_buf_size(struct ecore_hwfn *p_hwfn,
511 u32 num_dumped_dwords,
512 u32 *results_buf_size);
514 * @brief qed_print_idle_chk_results - Prints idle check results
516 * @param p_hwfn - HW device data
517 * @param dump_buf - idle check dump buffer.
518 * @param num_dumped_dwords - number of dwords that were dumped.
519 * @param results_buf - buffer for printing the idle check results.
520 * @param num_errors - OUT: number of errors found in idle check.
521 * @param num_warnings - OUT: number of warnings found in idle check.
523 * @return error if the parsing fails, ok otherwise.
525 enum dbg_status qed_print_idle_chk_results(struct ecore_hwfn *p_hwfn,
527 u32 num_dumped_dwords,
533 * @brief qed_dbg_mcp_trace_set_meta_data - Sets the MCP Trace meta data.
535 * Needed in case the MCP Trace dump doesn't contain the meta data (e.g. due to
538 * @param data - pointer to MCP Trace meta data
539 * @param size - size of MCP Trace meta data in dwords
541 void qed_dbg_mcp_trace_set_meta_data(struct ecore_hwfn *p_hwfn,
542 const u32 *meta_buf);
545 * @brief qed_get_mcp_trace_results_buf_size - Returns the required buffer size
546 * for MCP Trace results (in bytes).
548 * @param p_hwfn - HW device data
549 * @param dump_buf - MCP Trace dump buffer.
550 * @param num_dumped_dwords - number of dwords that were dumped.
551 * @param results_buf_size - OUT: required buffer size (in bytes) for the parsed
554 * @return error if the parsing fails, ok otherwise.
556 enum dbg_status qed_get_mcp_trace_results_buf_size(struct ecore_hwfn *p_hwfn,
558 u32 num_dumped_dwords,
559 u32 *results_buf_size);
562 * @brief qed_print_mcp_trace_results - Prints MCP Trace results
564 * @param p_hwfn - HW device data
565 * @param dump_buf - mcp trace dump buffer, starting from the header.
566 * @param num_dumped_dwords - number of dwords that were dumped.
567 * @param results_buf - buffer for printing the mcp trace results.
569 * @return error if the parsing fails, ok otherwise.
571 enum dbg_status qed_print_mcp_trace_results(struct ecore_hwfn *p_hwfn,
573 u32 num_dumped_dwords,
577 * @brief qed_print_mcp_trace_results_cont - Prints MCP Trace results, and
578 * keeps the MCP trace meta data allocated, to support continuous MCP Trace
579 * parsing. After the continuous parsing ends, mcp_trace_free_meta_data should
580 * be called to free the meta data.
582 * @param p_hwfn - HW device data
583 * @param dump_buf - mcp trace dump buffer, starting from the header.
584 * @param results_buf - buffer for printing the mcp trace results.
586 * @return error if the parsing fails, ok otherwise.
588 enum dbg_status qed_print_mcp_trace_results_cont(struct ecore_hwfn *p_hwfn,
593 * @brief print_mcp_trace_line - Prints MCP Trace results for a single line
595 * @param p_hwfn - HW device data
596 * @param dump_buf - mcp trace dump buffer, starting from the header.
597 * @param num_dumped_bytes - number of bytes that were dumped.
598 * @param results_buf - buffer for printing the mcp trace results.
600 * @return error if the parsing fails, ok otherwise.
602 enum dbg_status qed_print_mcp_trace_line(struct ecore_hwfn *p_hwfn,
604 u32 num_dumped_bytes,
608 * @brief mcp_trace_free_meta_data - Frees the MCP Trace meta data.
609 * Should be called after continuous MCP Trace parsing.
611 * @param p_hwfn - HW device data
613 void qed_mcp_trace_free_meta_data(struct ecore_hwfn *p_hwfn);
616 * @brief qed_get_reg_fifo_results_buf_size - Returns the required buffer size
617 * for reg_fifo results (in bytes).
619 * @param p_hwfn - HW device data
620 * @param dump_buf - reg fifo dump buffer.
621 * @param num_dumped_dwords - number of dwords that were dumped.
622 * @param results_buf_size - OUT: required buffer size (in bytes) for the parsed
625 * @return error if the parsing fails, ok otherwise.
627 enum dbg_status qed_get_reg_fifo_results_buf_size(struct ecore_hwfn *p_hwfn,
629 u32 num_dumped_dwords,
630 u32 *results_buf_size);
633 * @brief qed_print_reg_fifo_results - Prints reg fifo results
635 * @param p_hwfn - HW device data
636 * @param dump_buf - reg fifo dump buffer, starting from the header.
637 * @param num_dumped_dwords - number of dwords that were dumped.
638 * @param results_buf - buffer for printing the reg fifo results.
640 * @return error if the parsing fails, ok otherwise.
642 enum dbg_status qed_print_reg_fifo_results(struct ecore_hwfn *p_hwfn,
644 u32 num_dumped_dwords,
648 * @brief qed_get_igu_fifo_results_buf_size - Returns the required buffer size
649 * for igu_fifo results (in bytes).
651 * @param p_hwfn - HW device data
652 * @param dump_buf - IGU fifo dump buffer.
653 * @param num_dumped_dwords - number of dwords that were dumped.
654 * @param results_buf_size - OUT: required buffer size (in bytes) for the parsed
657 * @return error if the parsing fails, ok otherwise.
659 enum dbg_status qed_get_igu_fifo_results_buf_size(struct ecore_hwfn *p_hwfn,
661 u32 num_dumped_dwords,
662 u32 *results_buf_size);
665 * @brief qed_print_igu_fifo_results - Prints IGU fifo results
667 * @param p_hwfn - HW device data
668 * @param dump_buf - IGU fifo dump buffer, starting from the header.
669 * @param num_dumped_dwords - number of dwords that were dumped.
670 * @param results_buf - buffer for printing the IGU fifo results.
672 * @return error if the parsing fails, ok otherwise.
674 enum dbg_status qed_print_igu_fifo_results(struct ecore_hwfn *p_hwfn,
676 u32 num_dumped_dwords,
680 * @brief qed_get_protection_override_results_buf_size - Returns the required
681 * buffer size for protection override results (in bytes).
683 * @param p_hwfn - HW device data
684 * @param dump_buf - protection override dump buffer.
685 * @param num_dumped_dwords - number of dwords that were dumped.
686 * @param results_buf_size - OUT: required buffer size (in bytes) for the parsed
689 * @return error if the parsing fails, ok otherwise.
692 qed_get_protection_override_results_buf_size(struct ecore_hwfn *p_hwfn,
694 u32 num_dumped_dwords,
695 u32 *results_buf_size);
698 * @brief qed_print_protection_override_results - Prints protection override
701 * @param p_hwfn - HW device data
702 * @param dump_buf - protection override dump buffer, starting from the header.
703 * @param num_dumped_dwords - number of dwords that were dumped.
704 * @param results_buf - buffer for printing the reg fifo results.
706 * @return error if the parsing fails, ok otherwise.
708 enum dbg_status qed_print_protection_override_results(struct ecore_hwfn *p_hwfn,
710 u32 num_dumped_dwords,
714 * @brief qed_get_fw_asserts_results_buf_size - Returns the required buffer size
715 * for FW Asserts results (in bytes).
717 * @param p_hwfn - HW device data
718 * @param dump_buf - FW Asserts dump buffer.
719 * @param num_dumped_dwords - number of dwords that were dumped.
720 * @param results_buf_size - OUT: required buffer size (in bytes) for the parsed
723 * @return error if the parsing fails, ok otherwise.
725 enum dbg_status qed_get_fw_asserts_results_buf_size(struct ecore_hwfn *p_hwfn,
727 u32 num_dumped_dwords,
728 u32 *results_buf_size);
731 * @brief qed_print_fw_asserts_results - Prints FW Asserts results
733 * @param p_hwfn - HW device data
734 * @param dump_buf - FW Asserts dump buffer, starting from the header.
735 * @param num_dumped_dwords - number of dwords that were dumped.
736 * @param results_buf - buffer for printing the FW Asserts results.
738 * @return error if the parsing fails, ok otherwise.
740 enum dbg_status qed_print_fw_asserts_results(struct ecore_hwfn *p_hwfn,
742 u32 num_dumped_dwords,
746 * @brief qed_dbg_parse_attn - Parses and prints attention registers values in
747 * the specified results struct.
749 * @param p_hwfn - HW device data
750 * @param results - Pointer to the attention read results
752 * @return error if one of the following holds:
753 * - the version wasn't set
754 * Otherwise, returns ok.
756 enum dbg_status qed_dbg_parse_attn(struct ecore_hwfn *p_hwfn,
757 struct dbg_attn_block_result *results);