cudbg_lib.h 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. /*
  2. * Copyright (C) 2017 Chelsio Communications. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms and conditions of the GNU General Public License,
  6. * version 2, as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope it will be useful, but WITHOUT
  9. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  11. * more details.
  12. *
  13. * The full GNU General Public License is included in this distribution in
  14. * the file called "COPYING".
  15. *
  16. */
  17. #ifndef __CUDBG_LIB_H__
  18. #define __CUDBG_LIB_H__
  19. int cudbg_collect_reg_dump(struct cudbg_init *pdbg_init,
  20. struct cudbg_buffer *dbg_buff,
  21. struct cudbg_error *cudbg_err);
  22. int cudbg_collect_fw_devlog(struct cudbg_init *pdbg_init,
  23. struct cudbg_buffer *dbg_buff,
  24. struct cudbg_error *cudbg_err);
  25. int cudbg_collect_cim_la(struct cudbg_init *pdbg_init,
  26. struct cudbg_buffer *dbg_buff,
  27. struct cudbg_error *cudbg_err);
  28. int cudbg_collect_cim_ma_la(struct cudbg_init *pdbg_init,
  29. struct cudbg_buffer *dbg_buff,
  30. struct cudbg_error *cudbg_err);
  31. int cudbg_collect_cim_qcfg(struct cudbg_init *pdbg_init,
  32. struct cudbg_buffer *dbg_buff,
  33. struct cudbg_error *cudbg_err);
  34. int cudbg_collect_cim_ibq_tp0(struct cudbg_init *pdbg_init,
  35. struct cudbg_buffer *dbg_buff,
  36. struct cudbg_error *cudbg_err);
  37. int cudbg_collect_cim_ibq_tp1(struct cudbg_init *pdbg_init,
  38. struct cudbg_buffer *dbg_buff,
  39. struct cudbg_error *cudbg_err);
  40. int cudbg_collect_cim_ibq_ulp(struct cudbg_init *pdbg_init,
  41. struct cudbg_buffer *dbg_buff,
  42. struct cudbg_error *cudbg_err);
  43. int cudbg_collect_cim_ibq_sge0(struct cudbg_init *pdbg_init,
  44. struct cudbg_buffer *dbg_buff,
  45. struct cudbg_error *cudbg_err);
  46. int cudbg_collect_cim_ibq_sge1(struct cudbg_init *pdbg_init,
  47. struct cudbg_buffer *dbg_buff,
  48. struct cudbg_error *cudbg_err);
  49. int cudbg_collect_cim_ibq_ncsi(struct cudbg_init *pdbg_init,
  50. struct cudbg_buffer *dbg_buff,
  51. struct cudbg_error *cudbg_err);
  52. int cudbg_collect_cim_obq_ulp0(struct cudbg_init *pdbg_init,
  53. struct cudbg_buffer *dbg_buff,
  54. struct cudbg_error *cudbg_err);
  55. int cudbg_collect_cim_obq_ulp1(struct cudbg_init *pdbg_init,
  56. struct cudbg_buffer *dbg_buff,
  57. struct cudbg_error *cudbg_err);
  58. int cudbg_collect_cim_obq_ulp2(struct cudbg_init *pdbg_init,
  59. struct cudbg_buffer *dbg_buff,
  60. struct cudbg_error *cudbg_err);
  61. int cudbg_collect_cim_obq_ulp3(struct cudbg_init *pdbg_init,
  62. struct cudbg_buffer *dbg_buff,
  63. struct cudbg_error *cudbg_err);
  64. int cudbg_collect_cim_obq_sge(struct cudbg_init *pdbg_init,
  65. struct cudbg_buffer *dbg_buff,
  66. struct cudbg_error *cudbg_err);
  67. int cudbg_collect_cim_obq_ncsi(struct cudbg_init *pdbg_init,
  68. struct cudbg_buffer *dbg_buff,
  69. struct cudbg_error *cudbg_err);
  70. int cudbg_collect_edc0_meminfo(struct cudbg_init *pdbg_init,
  71. struct cudbg_buffer *dbg_buff,
  72. struct cudbg_error *cudbg_err);
  73. int cudbg_collect_edc1_meminfo(struct cudbg_init *pdbg_init,
  74. struct cudbg_buffer *dbg_buff,
  75. struct cudbg_error *cudbg_err);
  76. int cudbg_collect_mc0_meminfo(struct cudbg_init *pdbg_init,
  77. struct cudbg_buffer *dbg_buff,
  78. struct cudbg_error *cudbg_err);
  79. int cudbg_collect_mc1_meminfo(struct cudbg_init *pdbg_init,
  80. struct cudbg_buffer *dbg_buff,
  81. struct cudbg_error *cudbg_err);
  82. int cudbg_collect_rss(struct cudbg_init *pdbg_init,
  83. struct cudbg_buffer *dbg_buff,
  84. struct cudbg_error *cudbg_err);
  85. int cudbg_collect_rss_vf_config(struct cudbg_init *pdbg_init,
  86. struct cudbg_buffer *dbg_buff,
  87. struct cudbg_error *cudbg_err);
  88. int cudbg_collect_tp_indirect(struct cudbg_init *pdbg_init,
  89. struct cudbg_buffer *dbg_buff,
  90. struct cudbg_error *cudbg_err);
  91. int cudbg_collect_path_mtu(struct cudbg_init *pdbg_init,
  92. struct cudbg_buffer *dbg_buff,
  93. struct cudbg_error *cudbg_err);
  94. int cudbg_collect_pm_stats(struct cudbg_init *pdbg_init,
  95. struct cudbg_buffer *dbg_buff,
  96. struct cudbg_error *cudbg_err);
  97. int cudbg_collect_hw_sched(struct cudbg_init *pdbg_init,
  98. struct cudbg_buffer *dbg_buff,
  99. struct cudbg_error *cudbg_err);
  100. int cudbg_collect_sge_indirect(struct cudbg_init *pdbg_init,
  101. struct cudbg_buffer *dbg_buff,
  102. struct cudbg_error *cudbg_err);
  103. int cudbg_collect_ulprx_la(struct cudbg_init *pdbg_init,
  104. struct cudbg_buffer *dbg_buff,
  105. struct cudbg_error *cudbg_err);
  106. int cudbg_collect_tp_la(struct cudbg_init *pdbg_init,
  107. struct cudbg_buffer *dbg_buff,
  108. struct cudbg_error *cudbg_err);
  109. int cudbg_collect_meminfo(struct cudbg_init *pdbg_init,
  110. struct cudbg_buffer *dbg_buff,
  111. struct cudbg_error *cudbg_err);
  112. int cudbg_collect_cim_pif_la(struct cudbg_init *pdbg_init,
  113. struct cudbg_buffer *dbg_buff,
  114. struct cudbg_error *cudbg_err);
  115. int cudbg_collect_clk_info(struct cudbg_init *pdbg_init,
  116. struct cudbg_buffer *dbg_buff,
  117. struct cudbg_error *cudbg_err);
  118. int cudbg_collect_obq_sge_rx_q0(struct cudbg_init *pdbg_init,
  119. struct cudbg_buffer *dbg_buff,
  120. struct cudbg_error *cudbg_err);
  121. int cudbg_collect_obq_sge_rx_q1(struct cudbg_init *pdbg_init,
  122. struct cudbg_buffer *dbg_buff,
  123. struct cudbg_error *cudbg_err);
  124. int cudbg_collect_pcie_indirect(struct cudbg_init *pdbg_init,
  125. struct cudbg_buffer *dbg_buff,
  126. struct cudbg_error *cudbg_err);
  127. int cudbg_collect_pm_indirect(struct cudbg_init *pdbg_init,
  128. struct cudbg_buffer *dbg_buff,
  129. struct cudbg_error *cudbg_err);
  130. int cudbg_collect_tid(struct cudbg_init *pdbg_init,
  131. struct cudbg_buffer *dbg_buff,
  132. struct cudbg_error *cudbg_err);
  133. int cudbg_collect_pcie_config(struct cudbg_init *pdbg_init,
  134. struct cudbg_buffer *dbg_buff,
  135. struct cudbg_error *cudbg_err);
  136. int cudbg_collect_dump_context(struct cudbg_init *pdbg_init,
  137. struct cudbg_buffer *dbg_buff,
  138. struct cudbg_error *cudbg_err);
  139. int cudbg_collect_mps_tcam(struct cudbg_init *pdbg_init,
  140. struct cudbg_buffer *dbg_buff,
  141. struct cudbg_error *cudbg_err);
  142. int cudbg_collect_vpd_data(struct cudbg_init *pdbg_init,
  143. struct cudbg_buffer *dbg_buff,
  144. struct cudbg_error *cudbg_err);
  145. int cudbg_collect_le_tcam(struct cudbg_init *pdbg_init,
  146. struct cudbg_buffer *dbg_buff,
  147. struct cudbg_error *cudbg_err);
  148. int cudbg_collect_cctrl(struct cudbg_init *pdbg_init,
  149. struct cudbg_buffer *dbg_buff,
  150. struct cudbg_error *cudbg_err);
  151. int cudbg_collect_ma_indirect(struct cudbg_init *pdbg_init,
  152. struct cudbg_buffer *dbg_buff,
  153. struct cudbg_error *cudbg_err);
  154. int cudbg_collect_ulptx_la(struct cudbg_init *pdbg_init,
  155. struct cudbg_buffer *dbg_buff,
  156. struct cudbg_error *cudbg_err);
  157. int cudbg_collect_up_cim_indirect(struct cudbg_init *pdbg_init,
  158. struct cudbg_buffer *dbg_buff,
  159. struct cudbg_error *cudbg_err);
  160. int cudbg_collect_pbt_tables(struct cudbg_init *pdbg_init,
  161. struct cudbg_buffer *dbg_buff,
  162. struct cudbg_error *cudbg_err);
  163. int cudbg_collect_mbox_log(struct cudbg_init *pdbg_init,
  164. struct cudbg_buffer *dbg_buff,
  165. struct cudbg_error *cudbg_err);
  166. int cudbg_collect_hma_indirect(struct cudbg_init *pdbg_init,
  167. struct cudbg_buffer *dbg_buff,
  168. struct cudbg_error *cudbg_err);
  169. int cudbg_collect_hma_meminfo(struct cudbg_init *pdbg_init,
  170. struct cudbg_buffer *dbg_buff,
  171. struct cudbg_error *cudbg_err);
  172. struct cudbg_entity_hdr *cudbg_get_entity_hdr(void *outbuf, int i);
  173. void cudbg_align_debug_buffer(struct cudbg_buffer *dbg_buff,
  174. struct cudbg_entity_hdr *entity_hdr);
  175. u32 cudbg_cim_obq_size(struct adapter *padap, int qid);
  176. int cudbg_dump_context_size(struct adapter *padap);
  177. int cudbg_fill_meminfo(struct adapter *padap,
  178. struct cudbg_meminfo *meminfo_buff);
  179. void cudbg_fill_le_tcam_info(struct adapter *padap,
  180. struct cudbg_tcam *tcam_region);
  181. #endif /* __CUDBG_LIB_H__ */