cik_structs.h 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. /*
  2. * Copyright 2012 Advanced Micro Devices, Inc.
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  17. * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
  18. * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  19. * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  20. * OTHER DEALINGS IN THE SOFTWARE.
  21. *
  22. */
  23. #ifndef CIK_STRUCTS_H_
  24. #define CIK_STRUCTS_H_
  25. struct cik_mqd {
  26. uint32_t header;
  27. uint32_t compute_dispatch_initiator;
  28. uint32_t compute_dim_x;
  29. uint32_t compute_dim_y;
  30. uint32_t compute_dim_z;
  31. uint32_t compute_start_x;
  32. uint32_t compute_start_y;
  33. uint32_t compute_start_z;
  34. uint32_t compute_num_thread_x;
  35. uint32_t compute_num_thread_y;
  36. uint32_t compute_num_thread_z;
  37. uint32_t compute_pipelinestat_enable;
  38. uint32_t compute_perfcount_enable;
  39. uint32_t compute_pgm_lo;
  40. uint32_t compute_pgm_hi;
  41. uint32_t compute_tba_lo;
  42. uint32_t compute_tba_hi;
  43. uint32_t compute_tma_lo;
  44. uint32_t compute_tma_hi;
  45. uint32_t compute_pgm_rsrc1;
  46. uint32_t compute_pgm_rsrc2;
  47. uint32_t compute_vmid;
  48. uint32_t compute_resource_limits;
  49. uint32_t compute_static_thread_mgmt_se0;
  50. uint32_t compute_static_thread_mgmt_se1;
  51. uint32_t compute_tmpring_size;
  52. uint32_t compute_static_thread_mgmt_se2;
  53. uint32_t compute_static_thread_mgmt_se3;
  54. uint32_t compute_restart_x;
  55. uint32_t compute_restart_y;
  56. uint32_t compute_restart_z;
  57. uint32_t compute_thread_trace_enable;
  58. uint32_t compute_misc_reserved;
  59. uint32_t compute_user_data_0;
  60. uint32_t compute_user_data_1;
  61. uint32_t compute_user_data_2;
  62. uint32_t compute_user_data_3;
  63. uint32_t compute_user_data_4;
  64. uint32_t compute_user_data_5;
  65. uint32_t compute_user_data_6;
  66. uint32_t compute_user_data_7;
  67. uint32_t compute_user_data_8;
  68. uint32_t compute_user_data_9;
  69. uint32_t compute_user_data_10;
  70. uint32_t compute_user_data_11;
  71. uint32_t compute_user_data_12;
  72. uint32_t compute_user_data_13;
  73. uint32_t compute_user_data_14;
  74. uint32_t compute_user_data_15;
  75. uint32_t cp_compute_csinvoc_count_lo;
  76. uint32_t cp_compute_csinvoc_count_hi;
  77. uint32_t cp_mqd_base_addr_lo;
  78. uint32_t cp_mqd_base_addr_hi;
  79. uint32_t cp_hqd_active;
  80. uint32_t cp_hqd_vmid;
  81. uint32_t cp_hqd_persistent_state;
  82. uint32_t cp_hqd_pipe_priority;
  83. uint32_t cp_hqd_queue_priority;
  84. uint32_t cp_hqd_quantum;
  85. uint32_t cp_hqd_pq_base_lo;
  86. uint32_t cp_hqd_pq_base_hi;
  87. uint32_t cp_hqd_pq_rptr;
  88. uint32_t cp_hqd_pq_rptr_report_addr_lo;
  89. uint32_t cp_hqd_pq_rptr_report_addr_hi;
  90. uint32_t cp_hqd_pq_wptr_poll_addr_lo;
  91. uint32_t cp_hqd_pq_wptr_poll_addr_hi;
  92. uint32_t cp_hqd_pq_doorbell_control;
  93. uint32_t cp_hqd_pq_wptr;
  94. uint32_t cp_hqd_pq_control;
  95. uint32_t cp_hqd_ib_base_addr_lo;
  96. uint32_t cp_hqd_ib_base_addr_hi;
  97. uint32_t cp_hqd_ib_rptr;
  98. uint32_t cp_hqd_ib_control;
  99. uint32_t cp_hqd_iq_timer;
  100. uint32_t cp_hqd_iq_rptr;
  101. uint32_t cp_hqd_dequeue_request;
  102. uint32_t cp_hqd_dma_offload;
  103. uint32_t cp_hqd_sema_cmd;
  104. uint32_t cp_hqd_msg_type;
  105. uint32_t cp_hqd_atomic0_preop_lo;
  106. uint32_t cp_hqd_atomic0_preop_hi;
  107. uint32_t cp_hqd_atomic1_preop_lo;
  108. uint32_t cp_hqd_atomic1_preop_hi;
  109. uint32_t cp_hqd_hq_status0;
  110. uint32_t cp_hqd_hq_control0;
  111. uint32_t cp_mqd_control;
  112. uint32_t cp_mqd_query_time_lo;
  113. uint32_t cp_mqd_query_time_hi;
  114. uint32_t cp_mqd_connect_start_time_lo;
  115. uint32_t cp_mqd_connect_start_time_hi;
  116. uint32_t cp_mqd_connect_end_time_lo;
  117. uint32_t cp_mqd_connect_end_time_hi;
  118. uint32_t cp_mqd_connect_end_wf_count;
  119. uint32_t cp_mqd_connect_end_pq_rptr;
  120. uint32_t cp_mqd_connect_end_pq_wptr;
  121. uint32_t cp_mqd_connect_end_ib_rptr;
  122. uint32_t reserved_96;
  123. uint32_t reserved_97;
  124. uint32_t reserved_98;
  125. uint32_t reserved_99;
  126. uint32_t iqtimer_pkt_header;
  127. uint32_t iqtimer_pkt_dw0;
  128. uint32_t iqtimer_pkt_dw1;
  129. uint32_t iqtimer_pkt_dw2;
  130. uint32_t iqtimer_pkt_dw3;
  131. uint32_t iqtimer_pkt_dw4;
  132. uint32_t iqtimer_pkt_dw5;
  133. uint32_t iqtimer_pkt_dw6;
  134. uint32_t reserved_108;
  135. uint32_t reserved_109;
  136. uint32_t reserved_110;
  137. uint32_t reserved_111;
  138. uint32_t queue_doorbell_id0;
  139. uint32_t queue_doorbell_id1;
  140. uint32_t queue_doorbell_id2;
  141. uint32_t queue_doorbell_id3;
  142. uint32_t queue_doorbell_id4;
  143. uint32_t queue_doorbell_id5;
  144. uint32_t queue_doorbell_id6;
  145. uint32_t queue_doorbell_id7;
  146. uint32_t queue_doorbell_id8;
  147. uint32_t queue_doorbell_id9;
  148. uint32_t queue_doorbell_id10;
  149. uint32_t queue_doorbell_id11;
  150. uint32_t queue_doorbell_id12;
  151. uint32_t queue_doorbell_id13;
  152. uint32_t queue_doorbell_id14;
  153. uint32_t queue_doorbell_id15;
  154. };
  155. struct cik_sdma_rlc_registers {
  156. uint32_t sdma_rlc_rb_cntl;
  157. uint32_t sdma_rlc_rb_base;
  158. uint32_t sdma_rlc_rb_base_hi;
  159. uint32_t sdma_rlc_rb_rptr;
  160. uint32_t sdma_rlc_rb_wptr;
  161. uint32_t sdma_rlc_rb_wptr_poll_cntl;
  162. uint32_t sdma_rlc_rb_wptr_poll_addr_hi;
  163. uint32_t sdma_rlc_rb_wptr_poll_addr_lo;
  164. uint32_t sdma_rlc_rb_rptr_addr_hi;
  165. uint32_t sdma_rlc_rb_rptr_addr_lo;
  166. uint32_t sdma_rlc_ib_cntl;
  167. uint32_t sdma_rlc_ib_rptr;
  168. uint32_t sdma_rlc_ib_offset;
  169. uint32_t sdma_rlc_ib_base_lo;
  170. uint32_t sdma_rlc_ib_base_hi;
  171. uint32_t sdma_rlc_ib_size;
  172. uint32_t sdma_rlc_skip_cntl;
  173. uint32_t sdma_rlc_context_status;
  174. uint32_t sdma_rlc_doorbell;
  175. uint32_t sdma_rlc_virtual_addr;
  176. uint32_t sdma_rlc_ape1_cntl;
  177. uint32_t sdma_rlc_doorbell_log;
  178. uint32_t reserved_22;
  179. uint32_t reserved_23;
  180. uint32_t reserved_24;
  181. uint32_t reserved_25;
  182. uint32_t reserved_26;
  183. uint32_t reserved_27;
  184. uint32_t reserved_28;
  185. uint32_t reserved_29;
  186. uint32_t reserved_30;
  187. uint32_t reserved_31;
  188. uint32_t reserved_32;
  189. uint32_t reserved_33;
  190. uint32_t reserved_34;
  191. uint32_t reserved_35;
  192. uint32_t reserved_36;
  193. uint32_t reserved_37;
  194. uint32_t reserved_38;
  195. uint32_t reserved_39;
  196. uint32_t reserved_40;
  197. uint32_t reserved_41;
  198. uint32_t reserved_42;
  199. uint32_t reserved_43;
  200. uint32_t reserved_44;
  201. uint32_t reserved_45;
  202. uint32_t reserved_46;
  203. uint32_t reserved_47;
  204. uint32_t reserved_48;
  205. uint32_t reserved_49;
  206. uint32_t reserved_50;
  207. uint32_t reserved_51;
  208. uint32_t reserved_52;
  209. uint32_t reserved_53;
  210. uint32_t reserved_54;
  211. uint32_t reserved_55;
  212. uint32_t reserved_56;
  213. uint32_t reserved_57;
  214. uint32_t reserved_58;
  215. uint32_t reserved_59;
  216. uint32_t reserved_60;
  217. uint32_t reserved_61;
  218. uint32_t reserved_62;
  219. uint32_t reserved_63;
  220. uint32_t reserved_64;
  221. uint32_t reserved_65;
  222. uint32_t reserved_66;
  223. uint32_t reserved_67;
  224. uint32_t reserved_68;
  225. uint32_t reserved_69;
  226. uint32_t reserved_70;
  227. uint32_t reserved_71;
  228. uint32_t reserved_72;
  229. uint32_t reserved_73;
  230. uint32_t reserved_74;
  231. uint32_t reserved_75;
  232. uint32_t reserved_76;
  233. uint32_t reserved_77;
  234. uint32_t reserved_78;
  235. uint32_t reserved_79;
  236. uint32_t reserved_80;
  237. uint32_t reserved_81;
  238. uint32_t reserved_82;
  239. uint32_t reserved_83;
  240. uint32_t reserved_84;
  241. uint32_t reserved_85;
  242. uint32_t reserved_86;
  243. uint32_t reserved_87;
  244. uint32_t reserved_88;
  245. uint32_t reserved_89;
  246. uint32_t reserved_90;
  247. uint32_t reserved_91;
  248. uint32_t reserved_92;
  249. uint32_t reserved_93;
  250. uint32_t reserved_94;
  251. uint32_t reserved_95;
  252. uint32_t reserved_96;
  253. uint32_t reserved_97;
  254. uint32_t reserved_98;
  255. uint32_t reserved_99;
  256. uint32_t reserved_100;
  257. uint32_t reserved_101;
  258. uint32_t reserved_102;
  259. uint32_t reserved_103;
  260. uint32_t reserved_104;
  261. uint32_t reserved_105;
  262. uint32_t reserved_106;
  263. uint32_t reserved_107;
  264. uint32_t reserved_108;
  265. uint32_t reserved_109;
  266. uint32_t reserved_110;
  267. uint32_t reserved_111;
  268. uint32_t reserved_112;
  269. uint32_t reserved_113;
  270. uint32_t reserved_114;
  271. uint32_t reserved_115;
  272. uint32_t reserved_116;
  273. uint32_t reserved_117;
  274. uint32_t reserved_118;
  275. uint32_t reserved_119;
  276. uint32_t reserved_120;
  277. uint32_t reserved_121;
  278. uint32_t reserved_122;
  279. uint32_t reserved_123;
  280. uint32_t reserved_124;
  281. uint32_t reserved_125;
  282. uint32_t reserved_126;
  283. uint32_t reserved_127;
  284. uint32_t sdma_engine_id;
  285. uint32_t sdma_queue_id;
  286. };
  287. #endif /* CIK_STRUCTS_H_ */