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