]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/dev/qlnx/qlnxe/ecore_hsi_debug_tools.h
Merge ^/head r322398 through r322746.
[FreeBSD/FreeBSD.git] / sys / dev / qlnx / qlnxe / ecore_hsi_debug_tools.h
1 /*
2  * Copyright (c) 2017-2018 Cavium, Inc. 
3  * All rights reserved.
4  *
5  *  Redistribution and use in source and binary forms, with or without
6  *  modification, are permitted provided that the following conditions
7  *  are met:
8  *
9  *  1. Redistributions of source code must retain the above copyright
10  *     notice, this list of conditions and the following disclaimer.
11  *  2. Redistributions in binary form must reproduce the above copyright
12  *     notice, this list of conditions and the following disclaimer in the
13  *     documentation and/or other materials provided with the distribution.
14  *
15  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16  *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17  *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19  *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20  *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21  *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22  *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23  *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24  *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25  *  POSSIBILITY OF SUCH DAMAGE.
26  *
27  * $FreeBSD$
28  *
29  */
30
31 #ifndef __ECORE_HSI_DEBUG_TOOLS__
32 #define __ECORE_HSI_DEBUG_TOOLS__ 
33 /****************************************/
34 /* Debug Tools HSI constants and macros */
35 /****************************************/
36
37
38 enum block_addr
39 {
40         GRCBASE_GRC = 0x50000,
41         GRCBASE_MISCS = 0x9000,
42         GRCBASE_MISC = 0x8000,
43         GRCBASE_DBU = 0xa000,
44         GRCBASE_PGLUE_B = 0x2a8000,
45         GRCBASE_CNIG = 0x218000,
46         GRCBASE_CPMU = 0x30000,
47         GRCBASE_NCSI = 0x40000,
48         GRCBASE_OPTE = 0x53000,
49         GRCBASE_BMB = 0x540000,
50         GRCBASE_PCIE = 0x54000,
51         GRCBASE_MCP = 0xe00000,
52         GRCBASE_MCP2 = 0x52000,
53         GRCBASE_PSWHST = 0x2a0000,
54         GRCBASE_PSWHST2 = 0x29e000,
55         GRCBASE_PSWRD = 0x29c000,
56         GRCBASE_PSWRD2 = 0x29d000,
57         GRCBASE_PSWWR = 0x29a000,
58         GRCBASE_PSWWR2 = 0x29b000,
59         GRCBASE_PSWRQ = 0x280000,
60         GRCBASE_PSWRQ2 = 0x240000,
61         GRCBASE_PGLCS = 0x0,
62         GRCBASE_DMAE = 0xc000,
63         GRCBASE_PTU = 0x560000,
64         GRCBASE_TCM = 0x1180000,
65         GRCBASE_MCM = 0x1200000,
66         GRCBASE_UCM = 0x1280000,
67         GRCBASE_XCM = 0x1000000,
68         GRCBASE_YCM = 0x1080000,
69         GRCBASE_PCM = 0x1100000,
70         GRCBASE_QM = 0x2f0000,
71         GRCBASE_TM = 0x2c0000,
72         GRCBASE_DORQ = 0x100000,
73         GRCBASE_BRB = 0x340000,
74         GRCBASE_SRC = 0x238000,
75         GRCBASE_PRS = 0x1f0000,
76         GRCBASE_TSDM = 0xfb0000,
77         GRCBASE_MSDM = 0xfc0000,
78         GRCBASE_USDM = 0xfd0000,
79         GRCBASE_XSDM = 0xf80000,
80         GRCBASE_YSDM = 0xf90000,
81         GRCBASE_PSDM = 0xfa0000,
82         GRCBASE_TSEM = 0x1700000,
83         GRCBASE_MSEM = 0x1800000,
84         GRCBASE_USEM = 0x1900000,
85         GRCBASE_XSEM = 0x1400000,
86         GRCBASE_YSEM = 0x1500000,
87         GRCBASE_PSEM = 0x1600000,
88         GRCBASE_RSS = 0x238800,
89         GRCBASE_TMLD = 0x4d0000,
90         GRCBASE_MULD = 0x4e0000,
91         GRCBASE_YULD = 0x4c8000,
92         GRCBASE_XYLD = 0x4c0000,
93         GRCBASE_PTLD = 0x5a0000,
94         GRCBASE_YPLD = 0x5c0000,
95         GRCBASE_PRM = 0x230000,
96         GRCBASE_PBF_PB1 = 0xda0000,
97         GRCBASE_PBF_PB2 = 0xda4000,
98         GRCBASE_RPB = 0x23c000,
99         GRCBASE_BTB = 0xdb0000,
100         GRCBASE_PBF = 0xd80000,
101         GRCBASE_RDIF = 0x300000,
102         GRCBASE_TDIF = 0x310000,
103         GRCBASE_CDU = 0x580000,
104         GRCBASE_CCFC = 0x2e0000,
105         GRCBASE_TCFC = 0x2d0000,
106         GRCBASE_IGU = 0x180000,
107         GRCBASE_CAU = 0x1c0000,
108         GRCBASE_RGFS = 0xf00000,
109         GRCBASE_RGSRC = 0x320000,
110         GRCBASE_TGFS = 0xd00000,
111         GRCBASE_TGSRC = 0x322000,
112         GRCBASE_UMAC = 0x51000,
113         GRCBASE_XMAC = 0x210000,
114         GRCBASE_DBG = 0x10000,
115         GRCBASE_NIG = 0x500000,
116         GRCBASE_WOL = 0x600000,
117         GRCBASE_BMBN = 0x610000,
118         GRCBASE_IPC = 0x20000,
119         GRCBASE_NWM = 0x800000,
120         GRCBASE_NWS = 0x700000,
121         GRCBASE_MS = 0x6a0000,
122         GRCBASE_PHY_PCIE = 0x620000,
123         GRCBASE_LED = 0x6b8000,
124         GRCBASE_AVS_WRAP = 0x6b0000,
125         GRCBASE_MISC_AEU = 0x8000,
126         GRCBASE_BAR0_MAP = 0x1c00000,
127         MAX_BLOCK_ADDR
128 };
129
130
131 enum block_id
132 {
133         BLOCK_GRC,
134         BLOCK_MISCS,
135         BLOCK_MISC,
136         BLOCK_DBU,
137         BLOCK_PGLUE_B,
138         BLOCK_CNIG,
139         BLOCK_CPMU,
140         BLOCK_NCSI,
141         BLOCK_OPTE,
142         BLOCK_BMB,
143         BLOCK_PCIE,
144         BLOCK_MCP,
145         BLOCK_MCP2,
146         BLOCK_PSWHST,
147         BLOCK_PSWHST2,
148         BLOCK_PSWRD,
149         BLOCK_PSWRD2,
150         BLOCK_PSWWR,
151         BLOCK_PSWWR2,
152         BLOCK_PSWRQ,
153         BLOCK_PSWRQ2,
154         BLOCK_PGLCS,
155         BLOCK_DMAE,
156         BLOCK_PTU,
157         BLOCK_TCM,
158         BLOCK_MCM,
159         BLOCK_UCM,
160         BLOCK_XCM,
161         BLOCK_YCM,
162         BLOCK_PCM,
163         BLOCK_QM,
164         BLOCK_TM,
165         BLOCK_DORQ,
166         BLOCK_BRB,
167         BLOCK_SRC,
168         BLOCK_PRS,
169         BLOCK_TSDM,
170         BLOCK_MSDM,
171         BLOCK_USDM,
172         BLOCK_XSDM,
173         BLOCK_YSDM,
174         BLOCK_PSDM,
175         BLOCK_TSEM,
176         BLOCK_MSEM,
177         BLOCK_USEM,
178         BLOCK_XSEM,
179         BLOCK_YSEM,
180         BLOCK_PSEM,
181         BLOCK_RSS,
182         BLOCK_TMLD,
183         BLOCK_MULD,
184         BLOCK_YULD,
185         BLOCK_XYLD,
186         BLOCK_PTLD,
187         BLOCK_YPLD,
188         BLOCK_PRM,
189         BLOCK_PBF_PB1,
190         BLOCK_PBF_PB2,
191         BLOCK_RPB,
192         BLOCK_BTB,
193         BLOCK_PBF,
194         BLOCK_RDIF,
195         BLOCK_TDIF,
196         BLOCK_CDU,
197         BLOCK_CCFC,
198         BLOCK_TCFC,
199         BLOCK_IGU,
200         BLOCK_CAU,
201         BLOCK_RGFS,
202         BLOCK_RGSRC,
203         BLOCK_TGFS,
204         BLOCK_TGSRC,
205         BLOCK_UMAC,
206         BLOCK_XMAC,
207         BLOCK_DBG,
208         BLOCK_NIG,
209         BLOCK_WOL,
210         BLOCK_BMBN,
211         BLOCK_IPC,
212         BLOCK_NWM,
213         BLOCK_NWS,
214         BLOCK_MS,
215         BLOCK_PHY_PCIE,
216         BLOCK_LED,
217         BLOCK_AVS_WRAP,
218         BLOCK_MISC_AEU,
219         BLOCK_BAR0_MAP,
220         MAX_BLOCK_ID
221 };
222
223
224 /*
225  * binary debug buffer types
226  */
227 enum bin_dbg_buffer_type
228 {
229         BIN_BUF_DBG_MODE_TREE /* init modes tree */,
230         BIN_BUF_DBG_DUMP_REG /* GRC Dump registers */,
231         BIN_BUF_DBG_DUMP_MEM /* GRC Dump memories */,
232         BIN_BUF_DBG_IDLE_CHK_REGS /* Idle Check registers */,
233         BIN_BUF_DBG_IDLE_CHK_IMMS /* Idle Check immediates */,
234         BIN_BUF_DBG_IDLE_CHK_RULES /* Idle Check rules */,
235         BIN_BUF_DBG_IDLE_CHK_PARSING_DATA /* Idle Check parsing data */,
236         BIN_BUF_DBG_ATTN_BLOCKS /* Attention blocks */,
237         BIN_BUF_DBG_ATTN_REGS /* Attention registers */,
238         BIN_BUF_DBG_ATTN_INDEXES /* Attention indexes */,
239         BIN_BUF_DBG_ATTN_NAME_OFFSETS /* Attention name offsets */,
240         BIN_BUF_DBG_BUS_BLOCKS /* Debug Bus blocks */,
241         BIN_BUF_DBG_BUS_LINES /* Debug Bus lines */,
242         BIN_BUF_DBG_BUS_BLOCKS_USER_DATA /* Debug Bus blocks user data */,
243         BIN_BUF_DBG_BUS_LINE_NAME_OFFSETS /* Debug Bus line name offsets */,
244         BIN_BUF_DBG_PARSING_STRINGS /* Debug Tools parsing strings */,
245         MAX_BIN_DBG_BUFFER_TYPE
246 };
247
248
249 /*
250  * Attention bit mapping
251  */
252 struct dbg_attn_bit_mapping
253 {
254         __le16 data;
255 #define DBG_ATTN_BIT_MAPPING_VAL_MASK                0x7FFF /* The index of an attention in the blocks attentions list (if is_unused_bit_cnt=0), or a number of consecutive unused attention bits (if is_unused_bit_cnt=1) */
256 #define DBG_ATTN_BIT_MAPPING_VAL_SHIFT               0
257 #define DBG_ATTN_BIT_MAPPING_IS_UNUSED_BIT_CNT_MASK  0x1 /* if set, the val field indicates the number of consecutive unused attention bits */
258 #define DBG_ATTN_BIT_MAPPING_IS_UNUSED_BIT_CNT_SHIFT 15
259 };
260
261
262 /*
263  * Attention block per-type data
264  */
265 struct dbg_attn_block_type_data
266 {
267         __le16 names_offset /* Offset of this block attention names in the debug attention name offsets array */;
268         __le16 reserved1;
269         u8 num_regs /* Number of attention registers in this block */;
270         u8 reserved2;
271         __le16 regs_offset /* Offset of this blocks attention registers in the attention registers array (in dbg_attn_reg units) */;
272 };
273
274 /*
275  * Block attentions
276  */
277 struct dbg_attn_block
278 {
279         struct dbg_attn_block_type_data per_type_data[2] /* attention block per-type data. Count must match the number of elements in dbg_attn_type. */;
280 };
281
282
283 /*
284  * Attention register result
285  */
286 struct dbg_attn_reg_result
287 {
288         __le32 data;
289 #define DBG_ATTN_REG_RESULT_STS_ADDRESS_MASK   0xFFFFFF /* STS attention register GRC address (in dwords) */
290 #define DBG_ATTN_REG_RESULT_STS_ADDRESS_SHIFT  0
291 #define DBG_ATTN_REG_RESULT_NUM_REG_ATTN_MASK  0xFF /* Number of attention indexes in this register */
292 #define DBG_ATTN_REG_RESULT_NUM_REG_ATTN_SHIFT 24
293         __le16 block_attn_offset /* The offset of this registers attentions within the blocks attentions list (a value in the range 0..number of block attentions-1) */;
294         __le16 reserved;
295         __le32 sts_val /* Value read from the STS attention register */;
296         __le32 mask_val /* Value read from the MASK attention register */;
297 };
298
299 /*
300  * Attention block result
301  */
302 struct dbg_attn_block_result
303 {
304         u8 block_id /* Registers block ID */;
305         u8 data;
306 #define DBG_ATTN_BLOCK_RESULT_ATTN_TYPE_MASK  0x3 /* Value from dbg_attn_type enum */
307 #define DBG_ATTN_BLOCK_RESULT_ATTN_TYPE_SHIFT 0
308 #define DBG_ATTN_BLOCK_RESULT_NUM_REGS_MASK   0x3F /* Number of registers in the block in which at least one attention bit is set */
309 #define DBG_ATTN_BLOCK_RESULT_NUM_REGS_SHIFT  2
310         __le16 names_offset /* Offset of this registers block attention names in the attention name offsets array */;
311         struct dbg_attn_reg_result reg_results[15] /* result data for each register in the block in which at least one attention bit is set */;
312 };
313
314
315
316 /*
317  * mode header
318  */
319 struct dbg_mode_hdr
320 {
321         __le16 data;
322 #define DBG_MODE_HDR_EVAL_MODE_MASK         0x1 /* indicates if a mode expression should be evaluated (0/1) */
323 #define DBG_MODE_HDR_EVAL_MODE_SHIFT        0
324 #define DBG_MODE_HDR_MODES_BUF_OFFSET_MASK  0x7FFF /* offset (in bytes) in modes expression buffer. valid only if eval_mode is set. */
325 #define DBG_MODE_HDR_MODES_BUF_OFFSET_SHIFT 1
326 };
327
328 /*
329  * Attention register
330  */
331 struct dbg_attn_reg
332 {
333         struct dbg_mode_hdr mode /* Mode header */;
334         __le16 block_attn_offset /* The offset of this registers attentions within the blocks attentions list (a value in the range 0..number of block attentions-1) */;
335         __le32 data;
336 #define DBG_ATTN_REG_STS_ADDRESS_MASK   0xFFFFFF /* STS attention register GRC address (in dwords) */
337 #define DBG_ATTN_REG_STS_ADDRESS_SHIFT  0
338 #define DBG_ATTN_REG_NUM_REG_ATTN_MASK  0xFF /* Number of attention in this register */
339 #define DBG_ATTN_REG_NUM_REG_ATTN_SHIFT 24
340         __le32 sts_clr_address /* STS_CLR attention register GRC address (in dwords) */;
341         __le32 mask_address /* MASK attention register GRC address (in dwords) */;
342 };
343
344
345
346 /*
347  * attention types
348  */
349 enum dbg_attn_type
350 {
351         ATTN_TYPE_INTERRUPT,
352         ATTN_TYPE_PARITY,
353         MAX_DBG_ATTN_TYPE
354 };
355
356
357 /*
358  * Debug Bus block data
359  */
360 struct dbg_bus_block
361 {
362         u8 num_of_lines /* Number of debug lines in this block (excluding signature and latency events). */;
363         u8 has_latency_events /* Indicates if this block has a latency events debug line (0/1). */;
364         __le16 lines_offset /* Offset of this blocks lines in the Debug Bus lines array. */;
365 };
366
367
368 /*
369  * Debug Bus block user data
370  */
371 struct dbg_bus_block_user_data
372 {
373         u8 num_of_lines /* Number of debug lines in this block (excluding signature and latency events). */;
374         u8 has_latency_events /* Indicates if this block has a latency events debug line (0/1). */;
375         __le16 names_offset /* Offset of this blocks lines in the debug bus line name offsets array. */;
376 };
377
378
379 /*
380  * Block Debug line data
381  */
382 struct dbg_bus_line
383 {
384         u8 data;
385 #define DBG_BUS_LINE_NUM_OF_GROUPS_MASK  0xF /* Number of groups in the line (0-3) */
386 #define DBG_BUS_LINE_NUM_OF_GROUPS_SHIFT 0
387 #define DBG_BUS_LINE_IS_256B_MASK        0x1 /* Indicates if this is a 128b line (0) or a 256b line (1). */
388 #define DBG_BUS_LINE_IS_256B_SHIFT       4
389 #define DBG_BUS_LINE_RESERVED_MASK       0x7
390 #define DBG_BUS_LINE_RESERVED_SHIFT      5
391         u8 group_sizes /* Four 2-bit values, indicating the size of each group minus 1 (i.e. value=0 means size=1, value=1 means size=2, etc), starting from lsb. The sizes are in dwords (if is_256b=0) or in qwords (if is_256b=1). */;
392 };
393
394
395 /*
396  * condition header for registers dump
397  */
398 struct dbg_dump_cond_hdr
399 {
400         struct dbg_mode_hdr mode /* Mode header */;
401         u8 block_id /* block ID */;
402         u8 data_size /* size in dwords of the data following this header */;
403 };
404
405
406 /*
407  * memory data for registers dump
408  */
409 struct dbg_dump_mem
410 {
411         __le32 dword0;
412 #define DBG_DUMP_MEM_ADDRESS_MASK       0xFFFFFF /* register address (in dwords) */
413 #define DBG_DUMP_MEM_ADDRESS_SHIFT      0
414 #define DBG_DUMP_MEM_MEM_GROUP_ID_MASK  0xFF /* memory group ID */
415 #define DBG_DUMP_MEM_MEM_GROUP_ID_SHIFT 24
416         __le32 dword1;
417 #define DBG_DUMP_MEM_LENGTH_MASK        0xFFFFFF /* register size (in dwords) */
418 #define DBG_DUMP_MEM_LENGTH_SHIFT       0
419 #define DBG_DUMP_MEM_WIDE_BUS_MASK      0x1 /* indicates if the register is wide-bus */
420 #define DBG_DUMP_MEM_WIDE_BUS_SHIFT     24
421 #define DBG_DUMP_MEM_RESERVED_MASK      0x7F
422 #define DBG_DUMP_MEM_RESERVED_SHIFT     25
423 };
424
425
426 /*
427  * register data for registers dump
428  */
429 struct dbg_dump_reg
430 {
431         __le32 data;
432 #define DBG_DUMP_REG_ADDRESS_MASK   0x7FFFFF /* register address (in dwords) */
433 #define DBG_DUMP_REG_ADDRESS_SHIFT  0
434 #define DBG_DUMP_REG_WIDE_BUS_MASK  0x1 /* indicates if the register is wide-bus */
435 #define DBG_DUMP_REG_WIDE_BUS_SHIFT 23
436 #define DBG_DUMP_REG_LENGTH_MASK    0xFF /* register size (in dwords) */
437 #define DBG_DUMP_REG_LENGTH_SHIFT   24
438 };
439
440
441 /*
442  * split header for registers dump
443  */
444 struct dbg_dump_split_hdr
445 {
446         __le32 hdr;
447 #define DBG_DUMP_SPLIT_HDR_DATA_SIZE_MASK      0xFFFFFF /* size in dwords of the data following this header */
448 #define DBG_DUMP_SPLIT_HDR_DATA_SIZE_SHIFT     0
449 #define DBG_DUMP_SPLIT_HDR_SPLIT_TYPE_ID_MASK  0xFF /* split type ID */
450 #define DBG_DUMP_SPLIT_HDR_SPLIT_TYPE_ID_SHIFT 24
451 };
452
453
454 /*
455  * condition header for idle check
456  */
457 struct dbg_idle_chk_cond_hdr
458 {
459         struct dbg_mode_hdr mode /* Mode header */;
460         __le16 data_size /* size in dwords of the data following this header */;
461 };
462
463
464 /*
465  * Idle Check condition register
466  */
467 struct dbg_idle_chk_cond_reg
468 {
469         __le32 data;
470 #define DBG_IDLE_CHK_COND_REG_ADDRESS_MASK   0x7FFFFF /* Register GRC address (in dwords) */
471 #define DBG_IDLE_CHK_COND_REG_ADDRESS_SHIFT  0
472 #define DBG_IDLE_CHK_COND_REG_WIDE_BUS_MASK  0x1 /* indicates if the register is wide-bus */
473 #define DBG_IDLE_CHK_COND_REG_WIDE_BUS_SHIFT 23
474 #define DBG_IDLE_CHK_COND_REG_BLOCK_ID_MASK  0xFF /* value from block_id enum */
475 #define DBG_IDLE_CHK_COND_REG_BLOCK_ID_SHIFT 24
476         __le16 num_entries /* number of registers entries to check */;
477         u8 entry_size /* size of registers entry (in dwords) */;
478         u8 start_entry /* index of the first entry to check */;
479 };
480
481
482 /*
483  * Idle Check info register
484  */
485 struct dbg_idle_chk_info_reg
486 {
487         __le32 data;
488 #define DBG_IDLE_CHK_INFO_REG_ADDRESS_MASK   0x7FFFFF /* Register GRC address (in dwords) */
489 #define DBG_IDLE_CHK_INFO_REG_ADDRESS_SHIFT  0
490 #define DBG_IDLE_CHK_INFO_REG_WIDE_BUS_MASK  0x1 /* indicates if the register is wide-bus */
491 #define DBG_IDLE_CHK_INFO_REG_WIDE_BUS_SHIFT 23
492 #define DBG_IDLE_CHK_INFO_REG_BLOCK_ID_MASK  0xFF /* value from block_id enum */
493 #define DBG_IDLE_CHK_INFO_REG_BLOCK_ID_SHIFT 24
494         __le16 size /* register size in dwords */;
495         struct dbg_mode_hdr mode /* Mode header */;
496 };
497
498
499 /*
500  * Idle Check register
501  */
502 union dbg_idle_chk_reg
503 {
504         struct dbg_idle_chk_cond_reg cond_reg /* condition register */;
505         struct dbg_idle_chk_info_reg info_reg /* info register */;
506 };
507
508
509 /*
510  * Idle Check result header
511  */
512 struct dbg_idle_chk_result_hdr
513 {
514         __le16 rule_id /* Failing rule index */;
515         __le16 mem_entry_id /* Failing memory entry index */;
516         u8 num_dumped_cond_regs /* number of dumped condition registers */;
517         u8 num_dumped_info_regs /* number of dumped condition registers */;
518         u8 severity /* from dbg_idle_chk_severity_types enum */;
519         u8 reserved;
520 };
521
522
523 /*
524  * Idle Check result register header
525  */
526 struct dbg_idle_chk_result_reg_hdr
527 {
528         u8 data;
529 #define DBG_IDLE_CHK_RESULT_REG_HDR_IS_MEM_MASK  0x1 /* indicates if this register is a memory */
530 #define DBG_IDLE_CHK_RESULT_REG_HDR_IS_MEM_SHIFT 0
531 #define DBG_IDLE_CHK_RESULT_REG_HDR_REG_ID_MASK  0x7F /* register index within the failing rule */
532 #define DBG_IDLE_CHK_RESULT_REG_HDR_REG_ID_SHIFT 1
533         u8 start_entry /* index of the first checked entry */;
534         __le16 size /* register size in dwords */;
535 };
536
537
538 /*
539  * Idle Check rule
540  */
541 struct dbg_idle_chk_rule
542 {
543         __le16 rule_id /* Idle Check rule ID */;
544         u8 severity /* value from dbg_idle_chk_severity_types enum */;
545         u8 cond_id /* Condition ID */;
546         u8 num_cond_regs /* number of condition registers */;
547         u8 num_info_regs /* number of info registers */;
548         u8 num_imms /* number of immediates in the condition */;
549         u8 reserved1;
550         __le16 reg_offset /* offset of this rules registers in the idle check register array (in dbg_idle_chk_reg units) */;
551         __le16 imm_offset /* offset of this rules immediate values in the immediate values array (in dwords) */;
552 };
553
554
555 /*
556  * Idle Check rule parsing data
557  */
558 struct dbg_idle_chk_rule_parsing_data
559 {
560         __le32 data;
561 #define DBG_IDLE_CHK_RULE_PARSING_DATA_HAS_FW_MSG_MASK  0x1 /* indicates if this register has a FW message */
562 #define DBG_IDLE_CHK_RULE_PARSING_DATA_HAS_FW_MSG_SHIFT 0
563 #define DBG_IDLE_CHK_RULE_PARSING_DATA_STR_OFFSET_MASK  0x7FFFFFFF /* Offset of this rules strings in the debug strings array (in bytes) */
564 #define DBG_IDLE_CHK_RULE_PARSING_DATA_STR_OFFSET_SHIFT 1
565 };
566
567
568 /*
569  * idle check severity types
570  */
571 enum dbg_idle_chk_severity_types
572 {
573         IDLE_CHK_SEVERITY_ERROR /* idle check failure should cause an error */,
574         IDLE_CHK_SEVERITY_ERROR_NO_TRAFFIC /* idle check failure should cause an error only if theres no traffic */,
575         IDLE_CHK_SEVERITY_WARNING /* idle check failure should cause a warning */,
576         MAX_DBG_IDLE_CHK_SEVERITY_TYPES
577 };
578
579
580
581 /*
582  * Debug Bus block data
583  */
584 struct dbg_bus_block_data
585 {
586         __le16 data;
587 #define DBG_BUS_BLOCK_DATA_ENABLE_MASK_MASK       0xF /* 4-bit value: bit i set -> dword/qword i is enabled. */
588 #define DBG_BUS_BLOCK_DATA_ENABLE_MASK_SHIFT      0
589 #define DBG_BUS_BLOCK_DATA_RIGHT_SHIFT_MASK       0xF /* Number of dwords/qwords to shift right the debug data (0-3) */
590 #define DBG_BUS_BLOCK_DATA_RIGHT_SHIFT_SHIFT      4
591 #define DBG_BUS_BLOCK_DATA_FORCE_VALID_MASK_MASK  0xF /* 4-bit value: bit i set -> dword/qword i is forced valid. */
592 #define DBG_BUS_BLOCK_DATA_FORCE_VALID_MASK_SHIFT 8
593 #define DBG_BUS_BLOCK_DATA_FORCE_FRAME_MASK_MASK  0xF /* 4-bit value: bit i set -> dword/qword i frame bit is forced. */
594 #define DBG_BUS_BLOCK_DATA_FORCE_FRAME_MASK_SHIFT 12
595         u8 line_num /* Debug line number to select */;
596         u8 hw_id /* HW ID associated with the block */;
597 };
598
599
600 /*
601  * Debug Bus Clients
602  */
603 enum dbg_bus_clients
604 {
605         DBG_BUS_CLIENT_RBCN,
606         DBG_BUS_CLIENT_RBCP,
607         DBG_BUS_CLIENT_RBCR,
608         DBG_BUS_CLIENT_RBCT,
609         DBG_BUS_CLIENT_RBCU,
610         DBG_BUS_CLIENT_RBCF,
611         DBG_BUS_CLIENT_RBCX,
612         DBG_BUS_CLIENT_RBCS,
613         DBG_BUS_CLIENT_RBCH,
614         DBG_BUS_CLIENT_RBCZ,
615         DBG_BUS_CLIENT_OTHER_ENGINE,
616         DBG_BUS_CLIENT_TIMESTAMP,
617         DBG_BUS_CLIENT_CPU,
618         DBG_BUS_CLIENT_RBCY,
619         DBG_BUS_CLIENT_RBCQ,
620         DBG_BUS_CLIENT_RBCM,
621         DBG_BUS_CLIENT_RBCB,
622         DBG_BUS_CLIENT_RBCW,
623         DBG_BUS_CLIENT_RBCV,
624         MAX_DBG_BUS_CLIENTS
625 };
626
627
628 /*
629  * Debug Bus constraint operation types
630  */
631 enum dbg_bus_constraint_ops
632 {
633         DBG_BUS_CONSTRAINT_OP_EQ /* equal */,
634         DBG_BUS_CONSTRAINT_OP_NE /* not equal */,
635         DBG_BUS_CONSTRAINT_OP_LT /* less than */,
636         DBG_BUS_CONSTRAINT_OP_LTC /* less than (cyclic) */,
637         DBG_BUS_CONSTRAINT_OP_LE /* less than or equal */,
638         DBG_BUS_CONSTRAINT_OP_LEC /* less than or equal (cyclic) */,
639         DBG_BUS_CONSTRAINT_OP_GT /* greater than */,
640         DBG_BUS_CONSTRAINT_OP_GTC /* greater than (cyclic) */,
641         DBG_BUS_CONSTRAINT_OP_GE /* greater than or equal */,
642         DBG_BUS_CONSTRAINT_OP_GEC /* greater than or equal (cyclic) */,
643         MAX_DBG_BUS_CONSTRAINT_OPS
644 };
645
646
647 /*
648  * Debug Bus trigger state data
649  */
650 struct dbg_bus_trigger_state_data
651 {
652         u8 data;
653 #define DBG_BUS_TRIGGER_STATE_DATA_BLOCK_SHIFTED_ENABLE_MASK_MASK  0xF /* 4-bit value: bit i set -> dword i of the trigger state block (after right shift) is enabled. */
654 #define DBG_BUS_TRIGGER_STATE_DATA_BLOCK_SHIFTED_ENABLE_MASK_SHIFT 0
655 #define DBG_BUS_TRIGGER_STATE_DATA_CONSTRAINT_DWORD_MASK_MASK      0xF /* 4-bit value: bit i set -> dword i is compared by a constraint */
656 #define DBG_BUS_TRIGGER_STATE_DATA_CONSTRAINT_DWORD_MASK_SHIFT     4
657 };
658
659 /*
660  * Debug Bus memory address
661  */
662 struct dbg_bus_mem_addr
663 {
664         __le32 lo;
665         __le32 hi;
666 };
667
668 /*
669  * Debug Bus PCI buffer data
670  */
671 struct dbg_bus_pci_buf_data
672 {
673         struct dbg_bus_mem_addr phys_addr /* PCI buffer physical address */;
674         struct dbg_bus_mem_addr virt_addr /* PCI buffer virtual address */;
675         __le32 size /* PCI buffer size in bytes */;
676 };
677
678 /*
679  * Debug Bus Storm EID range filter params
680  */
681 struct dbg_bus_storm_eid_range_params
682 {
683         u8 min /* Minimal event ID to filter on */;
684         u8 max /* Maximal event ID to filter on */;
685 };
686
687 /*
688  * Debug Bus Storm EID mask filter params
689  */
690 struct dbg_bus_storm_eid_mask_params
691 {
692         u8 val /* Event ID value */;
693         u8 mask /* Event ID mask. 1s in the mask = dont care bits. */;
694 };
695
696 /*
697  * Debug Bus Storm EID filter params
698  */
699 union dbg_bus_storm_eid_params
700 {
701         struct dbg_bus_storm_eid_range_params range /* EID range filter params */;
702         struct dbg_bus_storm_eid_mask_params mask /* EID mask filter params */;
703 };
704
705 /*
706  * Debug Bus Storm data
707  */
708 struct dbg_bus_storm_data
709 {
710         u8 enabled /* indicates if the Storm is enabled for recording */;
711         u8 mode /* Storm debug mode, valid only if the Storm is enabled */;
712         u8 hw_id /* HW ID associated with the Storm */;
713         u8 eid_filter_en /* Indicates if EID filtering is performed (0/1) */;
714         u8 eid_range_not_mask /* 1 = EID range filter, 0 = EID mask filter. Valid only if eid_filter_en is set,  */;
715         u8 cid_filter_en /* Indicates if CID filtering is performed (0/1) */;
716         union dbg_bus_storm_eid_params eid_filter_params /* EID filter params to filter on. Valid only if eid_filter_en is set. */;
717         __le32 cid /* CID to filter on. Valid only if cid_filter_en is set. */;
718 };
719
720 /*
721  * Debug Bus data
722  */
723 struct dbg_bus_data
724 {
725         __le32 app_version /* The tools version number of the application */;
726         u8 state /* The current debug bus state */;
727         u8 hw_dwords /* HW dwords per cycle */;
728         __le16 hw_id_mask /* The HW IDs of the recorded HW blocks, where bits i*3..i*3+2 contain the HW ID of dword/qword i */;
729         u8 num_enabled_blocks /* Number of blocks enabled for recording */;
730         u8 num_enabled_storms /* Number of Storms enabled for recording */;
731         u8 target /* Output target */;
732         u8 one_shot_en /* Indicates if one-shot mode is enabled (0/1) */;
733         u8 grc_input_en /* Indicates if GRC recording is enabled (0/1) */;
734         u8 timestamp_input_en /* Indicates if timestamp recording is enabled (0/1) */;
735         u8 filter_en /* Indicates if the recording filter is enabled (0/1) */;
736         u8 adding_filter /* If true, the next added constraint belong to the filter. Otherwise, it belongs to the last added trigger state. Valid only if either filter or triggers are enabled. */;
737         u8 filter_pre_trigger /* Indicates if the recording filter should be applied before the trigger. Valid only if both filter and trigger are enabled (0/1) */;
738         u8 filter_post_trigger /* Indicates if the recording filter should be applied after the trigger. Valid only if both filter and trigger are enabled (0/1) */;
739         __le16 reserved;
740         u8 trigger_en /* Indicates if the recording trigger is enabled (0/1) */;
741         struct dbg_bus_trigger_state_data trigger_states[3] /* trigger states data */;
742         u8 next_trigger_state /* ID of next trigger state to be added */;
743         u8 next_constraint_id /* ID of next filter/trigger constraint to be added */;
744         u8 unify_inputs /* If true, all inputs are associated with HW ID 0. Otherwise, each input is assigned a different HW ID (0/1) */;
745         u8 rcv_from_other_engine /* Indicates if the other engine sends it NW recording to this engine (0/1) */;
746         struct dbg_bus_pci_buf_data pci_buf /* Debug Bus PCI buffer data. Valid only when the target is DBG_BUS_TARGET_ID_PCI. */;
747         struct dbg_bus_block_data blocks[88] /* Debug Bus data for each block */;
748         struct dbg_bus_storm_data storms[6] /* Debug Bus data for each block */;
749 };
750
751
752 /*
753  * Debug bus filter types
754  */
755 enum dbg_bus_filter_types
756 {
757         DBG_BUS_FILTER_TYPE_OFF /* filter always off */,
758         DBG_BUS_FILTER_TYPE_PRE /* filter before trigger only */,
759         DBG_BUS_FILTER_TYPE_POST /* filter after trigger only */,
760         DBG_BUS_FILTER_TYPE_ON /* filter always on */,
761         MAX_DBG_BUS_FILTER_TYPES
762 };
763
764
765 /*
766  * Debug bus frame modes
767  */
768 enum dbg_bus_frame_modes
769 {
770         DBG_BUS_FRAME_MODE_0HW_4ST=0 /* 0 HW dwords, 4 Storm dwords */,
771         DBG_BUS_FRAME_MODE_4HW_0ST=3 /* 4 HW dwords, 0 Storm dwords */,
772         DBG_BUS_FRAME_MODE_8HW_0ST=4 /* 8 HW dwords, 0 Storm dwords */,
773         MAX_DBG_BUS_FRAME_MODES
774 };
775
776
777
778 /*
779  * Debug bus other engine mode
780  */
781 enum dbg_bus_other_engine_modes
782 {
783         DBG_BUS_OTHER_ENGINE_MODE_NONE,
784         DBG_BUS_OTHER_ENGINE_MODE_DOUBLE_BW_TX,
785         DBG_BUS_OTHER_ENGINE_MODE_DOUBLE_BW_RX,
786         DBG_BUS_OTHER_ENGINE_MODE_CROSS_ENGINE_TX,
787         DBG_BUS_OTHER_ENGINE_MODE_CROSS_ENGINE_RX,
788         MAX_DBG_BUS_OTHER_ENGINE_MODES
789 };
790
791
792
793 /*
794  * Debug bus post-trigger recording types
795  */
796 enum dbg_bus_post_trigger_types
797 {
798         DBG_BUS_POST_TRIGGER_RECORD /* start recording after trigger */,
799         DBG_BUS_POST_TRIGGER_DROP /* drop data after trigger */,
800         MAX_DBG_BUS_POST_TRIGGER_TYPES
801 };
802
803
804 /*
805  * Debug bus pre-trigger recording types
806  */
807 enum dbg_bus_pre_trigger_types
808 {
809         DBG_BUS_PRE_TRIGGER_START_FROM_ZERO /* start recording from time 0 */,
810         DBG_BUS_PRE_TRIGGER_NUM_CHUNKS /* start recording some chunks before trigger */,
811         DBG_BUS_PRE_TRIGGER_DROP /* drop data before trigger */,
812         MAX_DBG_BUS_PRE_TRIGGER_TYPES
813 };
814
815
816 /*
817  * Debug bus SEMI frame modes
818  */
819 enum dbg_bus_semi_frame_modes
820 {
821         DBG_BUS_SEMI_FRAME_MODE_0SLOW_4FAST=0 /* 0 slow dwords, 4 fast dwords */,
822         DBG_BUS_SEMI_FRAME_MODE_4SLOW_0FAST=3 /* 4 slow dwords, 0 fast dwords */,
823         MAX_DBG_BUS_SEMI_FRAME_MODES
824 };
825
826
827 /*
828  * Debug bus states
829  */
830 enum dbg_bus_states
831 {
832         DBG_BUS_STATE_IDLE /* debug bus idle state (not recording) */,
833         DBG_BUS_STATE_READY /* debug bus is ready for configuration and recording */,
834         DBG_BUS_STATE_RECORDING /* debug bus is currently recording */,
835         DBG_BUS_STATE_STOPPED /* debug bus recording has stopped */,
836         MAX_DBG_BUS_STATES
837 };
838
839
840
841
842
843
844 /*
845  * Debug Bus Storm modes
846  */
847 enum dbg_bus_storm_modes
848 {
849         DBG_BUS_STORM_MODE_PRINTF /* store data (fast debug) */,
850         DBG_BUS_STORM_MODE_PRAM_ADDR /* pram address (fast debug) */,
851         DBG_BUS_STORM_MODE_DRA_RW /* DRA read/write data (fast debug) */,
852         DBG_BUS_STORM_MODE_DRA_W /* DRA write data (fast debug) */,
853         DBG_BUS_STORM_MODE_LD_ST_ADDR /* load/store address (fast debug) */,
854         DBG_BUS_STORM_MODE_DRA_FSM /* DRA state machines (fast debug) */,
855         DBG_BUS_STORM_MODE_RH /* recording handlers (fast debug) */,
856         DBG_BUS_STORM_MODE_FOC /* FOC: FIN + DRA Rd (slow debug) */,
857         DBG_BUS_STORM_MODE_EXT_STORE /* FOC: External Store (slow) */,
858         MAX_DBG_BUS_STORM_MODES
859 };
860
861
862 /*
863  * Debug bus target IDs
864  */
865 enum dbg_bus_targets
866 {
867         DBG_BUS_TARGET_ID_INT_BUF /* records debug bus to DBG block internal buffer */,
868         DBG_BUS_TARGET_ID_NIG /* records debug bus to the NW */,
869         DBG_BUS_TARGET_ID_PCI /* records debug bus to a PCI buffer */,
870         MAX_DBG_BUS_TARGETS
871 };
872
873
874
875 /*
876  * GRC Dump data
877  */
878 struct dbg_grc_data
879 {
880         u8 params_initialized /* Indicates if the GRC parameters were initialized */;
881         u8 reserved1;
882         __le16 reserved2;
883         __le32 param_val[48] /* Value of each GRC parameter. Array size must match the enum dbg_grc_params. */;
884 };
885
886
887 /*
888  * Debug GRC params
889  */
890 enum dbg_grc_params
891 {
892         DBG_GRC_PARAM_DUMP_TSTORM /* dump Tstorm memories (0/1) */,
893         DBG_GRC_PARAM_DUMP_MSTORM /* dump Mstorm memories (0/1) */,
894         DBG_GRC_PARAM_DUMP_USTORM /* dump Ustorm memories (0/1) */,
895         DBG_GRC_PARAM_DUMP_XSTORM /* dump Xstorm memories (0/1) */,
896         DBG_GRC_PARAM_DUMP_YSTORM /* dump Ystorm memories (0/1) */,
897         DBG_GRC_PARAM_DUMP_PSTORM /* dump Pstorm memories (0/1) */,
898         DBG_GRC_PARAM_DUMP_REGS /* dump non-memory registers (0/1) */,
899         DBG_GRC_PARAM_DUMP_RAM /* dump Storm internal RAMs (0/1) */,
900         DBG_GRC_PARAM_DUMP_PBUF /* dump Storm passive buffer (0/1) */,
901         DBG_GRC_PARAM_DUMP_IOR /* dump Storm IORs (0/1) */,
902         DBG_GRC_PARAM_DUMP_VFC /* dump VFC memories (0/1) */,
903         DBG_GRC_PARAM_DUMP_CM_CTX /* dump CM contexts (0/1) */,
904         DBG_GRC_PARAM_DUMP_PXP /* dump PXP memories (0/1) */,
905         DBG_GRC_PARAM_DUMP_RSS /* dump RSS memories (0/1) */,
906         DBG_GRC_PARAM_DUMP_CAU /* dump CAU memories (0/1) */,
907         DBG_GRC_PARAM_DUMP_QM /* dump QM memories (0/1) */,
908         DBG_GRC_PARAM_DUMP_MCP /* dump MCP memories (0/1) */,
909         DBG_GRC_PARAM_RESERVED /* reserved */,
910         DBG_GRC_PARAM_DUMP_CFC /* dump CFC memories (0/1) */,
911         DBG_GRC_PARAM_DUMP_IGU /* dump IGU memories (0/1) */,
912         DBG_GRC_PARAM_DUMP_BRB /* dump BRB memories (0/1) */,
913         DBG_GRC_PARAM_DUMP_BTB /* dump BTB memories (0/1) */,
914         DBG_GRC_PARAM_DUMP_BMB /* dump BMB memories (0/1) */,
915         DBG_GRC_PARAM_DUMP_NIG /* dump NIG memories (0/1) */,
916         DBG_GRC_PARAM_DUMP_MULD /* dump MULD memories (0/1) */,
917         DBG_GRC_PARAM_DUMP_PRS /* dump PRS memories (0/1) */,
918         DBG_GRC_PARAM_DUMP_DMAE /* dump PRS memories (0/1) */,
919         DBG_GRC_PARAM_DUMP_TM /* dump TM (timers) memories (0/1) */,
920         DBG_GRC_PARAM_DUMP_SDM /* dump SDM memories (0/1) */,
921         DBG_GRC_PARAM_DUMP_DIF /* dump DIF memories (0/1) */,
922         DBG_GRC_PARAM_DUMP_STATIC /* dump static debug data (0/1) */,
923         DBG_GRC_PARAM_UNSTALL /* un-stall Storms after dump (0/1) */,
924         DBG_GRC_PARAM_NUM_LCIDS /* number of LCIDs (0..320) */,
925         DBG_GRC_PARAM_NUM_LTIDS /* number of LTIDs (0..320) */,
926         DBG_GRC_PARAM_EXCLUDE_ALL /* preset: exclude all memories from dump (1 only) */,
927         DBG_GRC_PARAM_CRASH /* preset: include memories for crash dump (1 only) */,
928         DBG_GRC_PARAM_PARITY_SAFE /* perform dump only if MFW is responding (0/1) */,
929         DBG_GRC_PARAM_DUMP_CM /* dump CM memories (0/1) */,
930         DBG_GRC_PARAM_DUMP_PHY /* dump PHY memories (0/1) */,
931         DBG_GRC_PARAM_NO_MCP /* dont perform MCP commands (0/1) */,
932         DBG_GRC_PARAM_NO_FW_VER /* dont read FW/MFW version (0/1) */,
933         MAX_DBG_GRC_PARAMS
934 };
935
936
937 /*
938  * Debug reset registers
939  */
940 enum dbg_reset_regs
941 {
942         DBG_RESET_REG_MISCS_PL_UA,
943         DBG_RESET_REG_MISCS_PL_HV,
944         DBG_RESET_REG_MISCS_PL_HV_2,
945         DBG_RESET_REG_MISC_PL_UA,
946         DBG_RESET_REG_MISC_PL_HV,
947         DBG_RESET_REG_MISC_PL_PDA_VMAIN_1,
948         DBG_RESET_REG_MISC_PL_PDA_VMAIN_2,
949         DBG_RESET_REG_MISC_PL_PDA_VAUX,
950         MAX_DBG_RESET_REGS
951 };
952
953
954 /*
955  * Debug status codes
956  */
957 enum dbg_status
958 {
959         DBG_STATUS_OK,
960         DBG_STATUS_APP_VERSION_NOT_SET,
961         DBG_STATUS_UNSUPPORTED_APP_VERSION,
962         DBG_STATUS_DBG_BLOCK_NOT_RESET,
963         DBG_STATUS_INVALID_ARGS,
964         DBG_STATUS_OUTPUT_ALREADY_SET,
965         DBG_STATUS_INVALID_PCI_BUF_SIZE,
966         DBG_STATUS_PCI_BUF_ALLOC_FAILED,
967         DBG_STATUS_PCI_BUF_NOT_ALLOCATED,
968         DBG_STATUS_TOO_MANY_INPUTS,
969         DBG_STATUS_INPUT_OVERLAP,
970         DBG_STATUS_HW_ONLY_RECORDING,
971         DBG_STATUS_STORM_ALREADY_ENABLED,
972         DBG_STATUS_STORM_NOT_ENABLED,
973         DBG_STATUS_BLOCK_ALREADY_ENABLED,
974         DBG_STATUS_BLOCK_NOT_ENABLED,
975         DBG_STATUS_NO_INPUT_ENABLED,
976         DBG_STATUS_NO_FILTER_TRIGGER_64B,
977         DBG_STATUS_FILTER_ALREADY_ENABLED,
978         DBG_STATUS_TRIGGER_ALREADY_ENABLED,
979         DBG_STATUS_TRIGGER_NOT_ENABLED,
980         DBG_STATUS_CANT_ADD_CONSTRAINT,
981         DBG_STATUS_TOO_MANY_TRIGGER_STATES,
982         DBG_STATUS_TOO_MANY_CONSTRAINTS,
983         DBG_STATUS_RECORDING_NOT_STARTED,
984         DBG_STATUS_DATA_DIDNT_TRIGGER,
985         DBG_STATUS_NO_DATA_RECORDED,
986         DBG_STATUS_DUMP_BUF_TOO_SMALL,
987         DBG_STATUS_DUMP_NOT_CHUNK_ALIGNED,
988         DBG_STATUS_UNKNOWN_CHIP,
989         DBG_STATUS_VIRT_MEM_ALLOC_FAILED,
990         DBG_STATUS_BLOCK_IN_RESET,
991         DBG_STATUS_INVALID_TRACE_SIGNATURE,
992         DBG_STATUS_INVALID_NVRAM_BUNDLE,
993         DBG_STATUS_NVRAM_GET_IMAGE_FAILED,
994         DBG_STATUS_NON_ALIGNED_NVRAM_IMAGE,
995         DBG_STATUS_NVRAM_READ_FAILED,
996         DBG_STATUS_IDLE_CHK_PARSE_FAILED,
997         DBG_STATUS_MCP_TRACE_BAD_DATA,
998         DBG_STATUS_MCP_TRACE_NO_META,
999         DBG_STATUS_MCP_COULD_NOT_HALT,
1000         DBG_STATUS_MCP_COULD_NOT_RESUME,
1001         DBG_STATUS_DMAE_FAILED,
1002         DBG_STATUS_SEMI_FIFO_NOT_EMPTY,
1003         DBG_STATUS_IGU_FIFO_BAD_DATA,
1004         DBG_STATUS_MCP_COULD_NOT_MASK_PRTY,
1005         DBG_STATUS_FW_ASSERTS_PARSE_FAILED,
1006         DBG_STATUS_REG_FIFO_BAD_DATA,
1007         DBG_STATUS_PROTECTION_OVERRIDE_BAD_DATA,
1008         DBG_STATUS_DBG_ARRAY_NOT_SET,
1009         DBG_STATUS_FILTER_BUG,
1010         DBG_STATUS_NON_MATCHING_LINES,
1011         DBG_STATUS_INVALID_TRIGGER_DWORD_OFFSET,
1012         DBG_STATUS_DBG_BUS_IN_USE,
1013         MAX_DBG_STATUS
1014 };
1015
1016
1017 /*
1018  * Debug Storms IDs
1019  */
1020 enum dbg_storms
1021 {
1022         DBG_TSTORM_ID,
1023         DBG_MSTORM_ID,
1024         DBG_USTORM_ID,
1025         DBG_XSTORM_ID,
1026         DBG_YSTORM_ID,
1027         DBG_PSTORM_ID,
1028         MAX_DBG_STORMS
1029 };
1030
1031
1032 /*
1033  * Idle Check data
1034  */
1035 struct idle_chk_data
1036 {
1037         __le32 buf_size /* Idle check buffer size in dwords */;
1038         u8 buf_size_set /* Indicates if the idle check buffer size was set (0/1) */;
1039         u8 reserved1;
1040         __le16 reserved2;
1041 };
1042
1043 /*
1044  * Debug Tools data (per HW function)
1045  */
1046 struct dbg_tools_data
1047 {
1048         struct dbg_grc_data grc /* GRC Dump data */;
1049         struct dbg_bus_data bus /* Debug Bus data */;
1050         struct idle_chk_data idle_chk /* Idle Check data */;
1051         u8 mode_enable[40] /* Indicates if a mode is enabled (0/1) */;
1052         u8 block_in_reset[88] /* Indicates if a block is in reset state (0/1) */;
1053         u8 chip_id /* Chip ID (from enum chip_ids) */;
1054         u8 platform_id /* Platform ID */;
1055         u8 initialized /* Indicates if the data was initialized */;
1056         u8 reserved;
1057 };
1058
1059
1060 #endif /* __ECORE_HSI_DEBUG_TOOLS__ */