vi_structs.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  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 VI_STRUCTS_H_
  24. #define VI_STRUCTS_H_
  25. struct vi_sdma_mqd {
  26. uint32_t sdmax_rlcx_rb_cntl;
  27. uint32_t sdmax_rlcx_rb_base;
  28. uint32_t sdmax_rlcx_rb_base_hi;
  29. uint32_t sdmax_rlcx_rb_rptr;
  30. uint32_t sdmax_rlcx_rb_wptr;
  31. uint32_t sdmax_rlcx_rb_wptr_poll_cntl;
  32. uint32_t sdmax_rlcx_rb_wptr_poll_addr_hi;
  33. uint32_t sdmax_rlcx_rb_wptr_poll_addr_lo;
  34. uint32_t sdmax_rlcx_rb_rptr_addr_hi;
  35. uint32_t sdmax_rlcx_rb_rptr_addr_lo;
  36. uint32_t sdmax_rlcx_ib_cntl;
  37. uint32_t sdmax_rlcx_ib_rptr;
  38. uint32_t sdmax_rlcx_ib_offset;
  39. uint32_t sdmax_rlcx_ib_base_lo;
  40. uint32_t sdmax_rlcx_ib_base_hi;
  41. uint32_t sdmax_rlcx_ib_size;
  42. uint32_t sdmax_rlcx_skip_cntl;
  43. uint32_t sdmax_rlcx_context_status;
  44. uint32_t sdmax_rlcx_doorbell;
  45. uint32_t sdmax_rlcx_virtual_addr;
  46. uint32_t sdmax_rlcx_ape1_cntl;
  47. uint32_t sdmax_rlcx_doorbell_log;
  48. uint32_t reserved_22;
  49. uint32_t reserved_23;
  50. uint32_t reserved_24;
  51. uint32_t reserved_25;
  52. uint32_t reserved_26;
  53. uint32_t reserved_27;
  54. uint32_t reserved_28;
  55. uint32_t reserved_29;
  56. uint32_t reserved_30;
  57. uint32_t reserved_31;
  58. uint32_t reserved_32;
  59. uint32_t reserved_33;
  60. uint32_t reserved_34;
  61. uint32_t reserved_35;
  62. uint32_t reserved_36;
  63. uint32_t reserved_37;
  64. uint32_t reserved_38;
  65. uint32_t reserved_39;
  66. uint32_t reserved_40;
  67. uint32_t reserved_41;
  68. uint32_t reserved_42;
  69. uint32_t reserved_43;
  70. uint32_t reserved_44;
  71. uint32_t reserved_45;
  72. uint32_t reserved_46;
  73. uint32_t reserved_47;
  74. uint32_t reserved_48;
  75. uint32_t reserved_49;
  76. uint32_t reserved_50;
  77. uint32_t reserved_51;
  78. uint32_t reserved_52;
  79. uint32_t reserved_53;
  80. uint32_t reserved_54;
  81. uint32_t reserved_55;
  82. uint32_t reserved_56;
  83. uint32_t reserved_57;
  84. uint32_t reserved_58;
  85. uint32_t reserved_59;
  86. uint32_t reserved_60;
  87. uint32_t reserved_61;
  88. uint32_t reserved_62;
  89. uint32_t reserved_63;
  90. uint32_t reserved_64;
  91. uint32_t reserved_65;
  92. uint32_t reserved_66;
  93. uint32_t reserved_67;
  94. uint32_t reserved_68;
  95. uint32_t reserved_69;
  96. uint32_t reserved_70;
  97. uint32_t reserved_71;
  98. uint32_t reserved_72;
  99. uint32_t reserved_73;
  100. uint32_t reserved_74;
  101. uint32_t reserved_75;
  102. uint32_t reserved_76;
  103. uint32_t reserved_77;
  104. uint32_t reserved_78;
  105. uint32_t reserved_79;
  106. uint32_t reserved_80;
  107. uint32_t reserved_81;
  108. uint32_t reserved_82;
  109. uint32_t reserved_83;
  110. uint32_t reserved_84;
  111. uint32_t reserved_85;
  112. uint32_t reserved_86;
  113. uint32_t reserved_87;
  114. uint32_t reserved_88;
  115. uint32_t reserved_89;
  116. uint32_t reserved_90;
  117. uint32_t reserved_91;
  118. uint32_t reserved_92;
  119. uint32_t reserved_93;
  120. uint32_t reserved_94;
  121. uint32_t reserved_95;
  122. uint32_t reserved_96;
  123. uint32_t reserved_97;
  124. uint32_t reserved_98;
  125. uint32_t reserved_99;
  126. uint32_t reserved_100;
  127. uint32_t reserved_101;
  128. uint32_t reserved_102;
  129. uint32_t reserved_103;
  130. uint32_t reserved_104;
  131. uint32_t reserved_105;
  132. uint32_t reserved_106;
  133. uint32_t reserved_107;
  134. uint32_t reserved_108;
  135. uint32_t reserved_109;
  136. uint32_t reserved_110;
  137. uint32_t reserved_111;
  138. uint32_t reserved_112;
  139. uint32_t reserved_113;
  140. uint32_t reserved_114;
  141. uint32_t reserved_115;
  142. uint32_t reserved_116;
  143. uint32_t reserved_117;
  144. uint32_t reserved_118;
  145. uint32_t reserved_119;
  146. uint32_t reserved_120;
  147. uint32_t reserved_121;
  148. uint32_t reserved_122;
  149. uint32_t reserved_123;
  150. uint32_t reserved_124;
  151. uint32_t reserved_125;
  152. uint32_t reserved_126;
  153. uint32_t reserved_127;
  154. };
  155. struct vi_mqd {
  156. uint32_t header;
  157. uint32_t compute_dispatch_initiator;
  158. uint32_t compute_dim_x;
  159. uint32_t compute_dim_y;
  160. uint32_t compute_dim_z;
  161. uint32_t compute_start_x;
  162. uint32_t compute_start_y;
  163. uint32_t compute_start_z;
  164. uint32_t compute_num_thread_x;
  165. uint32_t compute_num_thread_y;
  166. uint32_t compute_num_thread_z;
  167. uint32_t compute_pipelinestat_enable;
  168. uint32_t compute_perfcount_enable;
  169. uint32_t compute_pgm_lo;
  170. uint32_t compute_pgm_hi;
  171. uint32_t compute_tba_lo;
  172. uint32_t compute_tba_hi;
  173. uint32_t compute_tma_lo;
  174. uint32_t compute_tma_hi;
  175. uint32_t compute_pgm_rsrc1;
  176. uint32_t compute_pgm_rsrc2;
  177. uint32_t compute_vmid;
  178. uint32_t compute_resource_limits;
  179. uint32_t compute_static_thread_mgmt_se0;
  180. uint32_t compute_static_thread_mgmt_se1;
  181. uint32_t compute_tmpring_size;
  182. uint32_t compute_static_thread_mgmt_se2;
  183. uint32_t compute_static_thread_mgmt_se3;
  184. uint32_t compute_restart_x;
  185. uint32_t compute_restart_y;
  186. uint32_t compute_restart_z;
  187. uint32_t compute_thread_trace_enable;
  188. uint32_t compute_misc_reserved;
  189. uint32_t compute_dispatch_id;
  190. uint32_t compute_threadgroup_id;
  191. uint32_t compute_relaunch;
  192. uint32_t compute_wave_restore_addr_lo;
  193. uint32_t compute_wave_restore_addr_hi;
  194. uint32_t compute_wave_restore_control;
  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 compute_user_data_0;
  222. uint32_t compute_user_data_1;
  223. uint32_t compute_user_data_2;
  224. uint32_t compute_user_data_3;
  225. uint32_t compute_user_data_4;
  226. uint32_t compute_user_data_5;
  227. uint32_t compute_user_data_6;
  228. uint32_t compute_user_data_7;
  229. uint32_t compute_user_data_8;
  230. uint32_t compute_user_data_9;
  231. uint32_t compute_user_data_10;
  232. uint32_t compute_user_data_11;
  233. uint32_t compute_user_data_12;
  234. uint32_t compute_user_data_13;
  235. uint32_t compute_user_data_14;
  236. uint32_t compute_user_data_15;
  237. uint32_t cp_compute_csinvoc_count_lo;
  238. uint32_t cp_compute_csinvoc_count_hi;
  239. uint32_t reserved_83;
  240. uint32_t reserved_84;
  241. uint32_t reserved_85;
  242. uint32_t cp_mqd_query_time_lo;
  243. uint32_t cp_mqd_query_time_hi;
  244. uint32_t cp_mqd_connect_start_time_lo;
  245. uint32_t cp_mqd_connect_start_time_hi;
  246. uint32_t cp_mqd_connect_end_time_lo;
  247. uint32_t cp_mqd_connect_end_time_hi;
  248. uint32_t cp_mqd_connect_end_wf_count;
  249. uint32_t cp_mqd_connect_end_pq_rptr;
  250. uint32_t cp_mqd_connect_end_pq_wptr;
  251. uint32_t cp_mqd_connect_end_ib_rptr;
  252. uint32_t reserved_96;
  253. uint32_t reserved_97;
  254. uint32_t cp_mqd_save_start_time_lo;
  255. uint32_t cp_mqd_save_start_time_hi;
  256. uint32_t cp_mqd_save_end_time_lo;
  257. uint32_t cp_mqd_save_end_time_hi;
  258. uint32_t cp_mqd_restore_start_time_lo;
  259. uint32_t cp_mqd_restore_start_time_hi;
  260. uint32_t cp_mqd_restore_end_time_lo;
  261. uint32_t cp_mqd_restore_end_time_hi;
  262. uint32_t reserved_106;
  263. uint32_t reserved_107;
  264. uint32_t gds_cs_ctxsw_cnt0;
  265. uint32_t gds_cs_ctxsw_cnt1;
  266. uint32_t gds_cs_ctxsw_cnt2;
  267. uint32_t gds_cs_ctxsw_cnt3;
  268. uint32_t reserved_112;
  269. uint32_t reserved_113;
  270. uint32_t cp_pq_exe_status_lo;
  271. uint32_t cp_pq_exe_status_hi;
  272. uint32_t cp_packet_id_lo;
  273. uint32_t cp_packet_id_hi;
  274. uint32_t cp_packet_exe_status_lo;
  275. uint32_t cp_packet_exe_status_hi;
  276. uint32_t gds_save_base_addr_lo;
  277. uint32_t gds_save_base_addr_hi;
  278. uint32_t gds_save_mask_lo;
  279. uint32_t gds_save_mask_hi;
  280. uint32_t ctx_save_base_addr_lo;
  281. uint32_t ctx_save_base_addr_hi;
  282. uint32_t reserved_126;
  283. uint32_t reserved_127;
  284. uint32_t cp_mqd_base_addr_lo;
  285. uint32_t cp_mqd_base_addr_hi;
  286. uint32_t cp_hqd_active;
  287. uint32_t cp_hqd_vmid;
  288. uint32_t cp_hqd_persistent_state;
  289. uint32_t cp_hqd_pipe_priority;
  290. uint32_t cp_hqd_queue_priority;
  291. uint32_t cp_hqd_quantum;
  292. uint32_t cp_hqd_pq_base_lo;
  293. uint32_t cp_hqd_pq_base_hi;
  294. uint32_t cp_hqd_pq_rptr;
  295. uint32_t cp_hqd_pq_rptr_report_addr_lo;
  296. uint32_t cp_hqd_pq_rptr_report_addr_hi;
  297. uint32_t cp_hqd_pq_wptr_poll_addr_lo;
  298. uint32_t cp_hqd_pq_wptr_poll_addr_hi;
  299. uint32_t cp_hqd_pq_doorbell_control;
  300. uint32_t cp_hqd_pq_wptr;
  301. uint32_t cp_hqd_pq_control;
  302. uint32_t cp_hqd_ib_base_addr_lo;
  303. uint32_t cp_hqd_ib_base_addr_hi;
  304. uint32_t cp_hqd_ib_rptr;
  305. uint32_t cp_hqd_ib_control;
  306. uint32_t cp_hqd_iq_timer;
  307. uint32_t cp_hqd_iq_rptr;
  308. uint32_t cp_hqd_dequeue_request;
  309. uint32_t cp_hqd_dma_offload;
  310. uint32_t cp_hqd_sema_cmd;
  311. uint32_t cp_hqd_msg_type;
  312. uint32_t cp_hqd_atomic0_preop_lo;
  313. uint32_t cp_hqd_atomic0_preop_hi;
  314. uint32_t cp_hqd_atomic1_preop_lo;
  315. uint32_t cp_hqd_atomic1_preop_hi;
  316. uint32_t cp_hqd_hq_status0;
  317. uint32_t cp_hqd_hq_control0;
  318. uint32_t cp_mqd_control;
  319. uint32_t cp_hqd_hq_status1;
  320. uint32_t cp_hqd_hq_control1;
  321. uint32_t cp_hqd_eop_base_addr_lo;
  322. uint32_t cp_hqd_eop_base_addr_hi;
  323. uint32_t cp_hqd_eop_control;
  324. uint32_t cp_hqd_eop_rptr;
  325. uint32_t cp_hqd_eop_wptr;
  326. uint32_t cp_hqd_eop_done_events;
  327. uint32_t cp_hqd_ctx_save_base_addr_lo;
  328. uint32_t cp_hqd_ctx_save_base_addr_hi;
  329. uint32_t cp_hqd_ctx_save_control;
  330. uint32_t cp_hqd_cntl_stack_offset;
  331. uint32_t cp_hqd_cntl_stack_size;
  332. uint32_t cp_hqd_wg_state_offset;
  333. uint32_t cp_hqd_ctx_save_size;
  334. uint32_t cp_hqd_gds_resource_state;
  335. uint32_t cp_hqd_error;
  336. uint32_t cp_hqd_eop_wptr_mem;
  337. uint32_t cp_hqd_eop_dones;
  338. uint32_t reserved_182;
  339. uint32_t reserved_183;
  340. uint32_t reserved_184;
  341. uint32_t reserved_185;
  342. uint32_t reserved_186;
  343. uint32_t reserved_187;
  344. uint32_t reserved_188;
  345. uint32_t reserved_189;
  346. uint32_t reserved_190;
  347. uint32_t reserved_191;
  348. uint32_t iqtimer_pkt_header;
  349. uint32_t iqtimer_pkt_dw0;
  350. uint32_t iqtimer_pkt_dw1;
  351. uint32_t iqtimer_pkt_dw2;
  352. uint32_t iqtimer_pkt_dw3;
  353. uint32_t iqtimer_pkt_dw4;
  354. uint32_t iqtimer_pkt_dw5;
  355. uint32_t iqtimer_pkt_dw6;
  356. uint32_t iqtimer_pkt_dw7;
  357. uint32_t iqtimer_pkt_dw8;
  358. uint32_t iqtimer_pkt_dw9;
  359. uint32_t iqtimer_pkt_dw10;
  360. uint32_t iqtimer_pkt_dw11;
  361. uint32_t iqtimer_pkt_dw12;
  362. uint32_t iqtimer_pkt_dw13;
  363. uint32_t iqtimer_pkt_dw14;
  364. uint32_t iqtimer_pkt_dw15;
  365. uint32_t iqtimer_pkt_dw16;
  366. uint32_t iqtimer_pkt_dw17;
  367. uint32_t iqtimer_pkt_dw18;
  368. uint32_t iqtimer_pkt_dw19;
  369. uint32_t iqtimer_pkt_dw20;
  370. uint32_t iqtimer_pkt_dw21;
  371. uint32_t iqtimer_pkt_dw22;
  372. uint32_t iqtimer_pkt_dw23;
  373. uint32_t iqtimer_pkt_dw24;
  374. uint32_t iqtimer_pkt_dw25;
  375. uint32_t iqtimer_pkt_dw26;
  376. uint32_t iqtimer_pkt_dw27;
  377. uint32_t iqtimer_pkt_dw28;
  378. uint32_t iqtimer_pkt_dw29;
  379. uint32_t iqtimer_pkt_dw30;
  380. uint32_t iqtimer_pkt_dw31;
  381. uint32_t reserved_225;
  382. uint32_t reserved_226;
  383. uint32_t reserved_227;
  384. uint32_t set_resources_header;
  385. uint32_t set_resources_dw1;
  386. uint32_t set_resources_dw2;
  387. uint32_t set_resources_dw3;
  388. uint32_t set_resources_dw4;
  389. uint32_t set_resources_dw5;
  390. uint32_t set_resources_dw6;
  391. uint32_t set_resources_dw7;
  392. uint32_t reserved_236;
  393. uint32_t reserved_237;
  394. uint32_t reserved_238;
  395. uint32_t reserved_239;
  396. uint32_t queue_doorbell_id0;
  397. uint32_t queue_doorbell_id1;
  398. uint32_t queue_doorbell_id2;
  399. uint32_t queue_doorbell_id3;
  400. uint32_t queue_doorbell_id4;
  401. uint32_t queue_doorbell_id5;
  402. uint32_t queue_doorbell_id6;
  403. uint32_t queue_doorbell_id7;
  404. uint32_t queue_doorbell_id8;
  405. uint32_t queue_doorbell_id9;
  406. uint32_t queue_doorbell_id10;
  407. uint32_t queue_doorbell_id11;
  408. uint32_t queue_doorbell_id12;
  409. uint32_t queue_doorbell_id13;
  410. uint32_t queue_doorbell_id14;
  411. uint32_t queue_doorbell_id15;
  412. };
  413. #endif /* VI_STRUCTS_H_ */