reo_flush_queue_status.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  1. /*
  2. * Copyright (c) 2020, The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. #ifndef _REO_FLUSH_QUEUE_STATUS_H_
  17. #define _REO_FLUSH_QUEUE_STATUS_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #include "uniform_reo_status_header.h"
  21. // ################ START SUMMARY #################
  22. //
  23. // Dword Fields
  24. // 0-1 struct uniform_reo_status_header status_header;
  25. // 2 error_detected[0], reserved_2a[31:1]
  26. // 3 reserved_3a[31:0]
  27. // 4 reserved_4a[31:0]
  28. // 5 reserved_5a[31:0]
  29. // 6 reserved_6a[31:0]
  30. // 7 reserved_7a[31:0]
  31. // 8 reserved_8a[31:0]
  32. // 9 reserved_9a[31:0]
  33. // 10 reserved_10a[31:0]
  34. // 11 reserved_11a[31:0]
  35. // 12 reserved_12a[31:0]
  36. // 13 reserved_13a[31:0]
  37. // 14 reserved_14a[31:0]
  38. // 15 reserved_15a[31:0]
  39. // 16 reserved_16a[31:0]
  40. // 17 reserved_17a[31:0]
  41. // 18 reserved_18a[31:0]
  42. // 19 reserved_19a[31:0]
  43. // 20 reserved_20a[31:0]
  44. // 21 reserved_21a[31:0]
  45. // 22 reserved_22a[31:0]
  46. // 23 reserved_23a[31:0]
  47. // 24 reserved_24a[27:0], looping_count[31:28]
  48. //
  49. // ################ END SUMMARY #################
  50. #define NUM_OF_DWORDS_REO_FLUSH_QUEUE_STATUS 25
  51. struct reo_flush_queue_status {
  52. struct uniform_reo_status_header status_header;
  53. uint32_t error_detected : 1, //[0]
  54. reserved_2a : 31; //[31:1]
  55. uint32_t reserved_3a : 32; //[31:0]
  56. uint32_t reserved_4a : 32; //[31:0]
  57. uint32_t reserved_5a : 32; //[31:0]
  58. uint32_t reserved_6a : 32; //[31:0]
  59. uint32_t reserved_7a : 32; //[31:0]
  60. uint32_t reserved_8a : 32; //[31:0]
  61. uint32_t reserved_9a : 32; //[31:0]
  62. uint32_t reserved_10a : 32; //[31:0]
  63. uint32_t reserved_11a : 32; //[31:0]
  64. uint32_t reserved_12a : 32; //[31:0]
  65. uint32_t reserved_13a : 32; //[31:0]
  66. uint32_t reserved_14a : 32; //[31:0]
  67. uint32_t reserved_15a : 32; //[31:0]
  68. uint32_t reserved_16a : 32; //[31:0]
  69. uint32_t reserved_17a : 32; //[31:0]
  70. uint32_t reserved_18a : 32; //[31:0]
  71. uint32_t reserved_19a : 32; //[31:0]
  72. uint32_t reserved_20a : 32; //[31:0]
  73. uint32_t reserved_21a : 32; //[31:0]
  74. uint32_t reserved_22a : 32; //[31:0]
  75. uint32_t reserved_23a : 32; //[31:0]
  76. uint32_t reserved_24a : 28, //[27:0]
  77. looping_count : 4; //[31:28]
  78. };
  79. /*
  80. struct uniform_reo_status_header status_header
  81. Consumer: SW
  82. Producer: REO
  83. Details that can link this status with the original
  84. command. It also contains info on how long REO took to
  85. execute this command.
  86. error_detected
  87. Status of the blocking resource
  88. 0: No error has been detected while executing this
  89. command
  90. 1: Error detected: The resource to be used for blocking
  91. was already in use.
  92. reserved_2a
  93. <legal 0>
  94. reserved_3a
  95. <legal 0>
  96. reserved_4a
  97. <legal 0>
  98. reserved_5a
  99. <legal 0>
  100. reserved_6a
  101. <legal 0>
  102. reserved_7a
  103. <legal 0>
  104. reserved_8a
  105. <legal 0>
  106. reserved_9a
  107. <legal 0>
  108. reserved_10a
  109. <legal 0>
  110. reserved_11a
  111. <legal 0>
  112. reserved_12a
  113. <legal 0>
  114. reserved_13a
  115. <legal 0>
  116. reserved_14a
  117. <legal 0>
  118. reserved_15a
  119. <legal 0>
  120. reserved_16a
  121. <legal 0>
  122. reserved_17a
  123. <legal 0>
  124. reserved_18a
  125. <legal 0>
  126. reserved_19a
  127. <legal 0>
  128. reserved_20a
  129. <legal 0>
  130. reserved_21a
  131. <legal 0>
  132. reserved_22a
  133. <legal 0>
  134. reserved_23a
  135. <legal 0>
  136. reserved_24a
  137. <legal 0>
  138. looping_count
  139. A count value that indicates the number of times the
  140. producer of entries into this Ring has looped around the
  141. ring.
  142. At initialization time, this value is set to 0. On the
  143. first loop, this value is set to 1. After the max value is
  144. reached allowed by the number of bits for this field, the
  145. count value continues with 0 again.
  146. In case SW is the consumer of the ring entries, it can
  147. use this field to figure out up to where the producer of
  148. entries has created new entries. This eliminates the need to
  149. check where the head pointer' of the ring is located once
  150. the SW starts processing an interrupt indicating that new
  151. entries have been put into this ring...
  152. Also note that SW if it wants only needs to look at the
  153. LSB bit of this count value.
  154. <legal all>
  155. */
  156. /* EXTERNAL REFERENCE : struct uniform_reo_status_header status_header */
  157. /* Description REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_REO_STATUS_NUMBER
  158. Consumer: SW , DEBUG
  159. Producer: REO
  160. The value in this field is equal to value of the
  161. 'REO_CMD_Number' field the REO command
  162. This field helps to correlate the statuses with the REO
  163. commands.
  164. <legal all>
  165. */
  166. #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_REO_STATUS_NUMBER_OFFSET 0x00000000
  167. #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_REO_STATUS_NUMBER_LSB 0
  168. #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_REO_STATUS_NUMBER_MASK 0x0000ffff
  169. /* Description REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_CMD_EXECUTION_TIME
  170. Consumer: DEBUG
  171. Producer: REO
  172. The amount of time REO took to excecute the command.
  173. Note that this time does not include the duration of the
  174. command waiting in the command ring, before the execution
  175. started.
  176. In us.
  177. <legal all>
  178. */
  179. #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_CMD_EXECUTION_TIME_OFFSET 0x00000000
  180. #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_CMD_EXECUTION_TIME_LSB 16
  181. #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_CMD_EXECUTION_TIME_MASK 0x03ff0000
  182. /* Description REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_REO_CMD_EXECUTION_STATUS
  183. Consumer: DEBUG
  184. Producer: REO
  185. Execution status of the command.
  186. <enum 0 reo_successful_execution> Command has
  187. successfully be executed
  188. <enum 1 reo_blocked_execution> Command could not be
  189. executed as the queue or cache was blocked
  190. <enum 2 reo_failed_execution> Command has encountered
  191. problems when executing, like the queue descriptor not being
  192. valid. None of the status fields in the entire STATUS TLV
  193. are valid.
  194. <enum 3 reo_resource_blocked> Command is NOT executed
  195. because one or more descriptors were blocked. This is SW
  196. programming mistake.
  197. None of the status fields in the entire STATUS TLV are
  198. valid.
  199. <legal 0-3>
  200. */
  201. #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_OFFSET 0x00000000
  202. #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_LSB 26
  203. #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_MASK 0x0c000000
  204. /* Description REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_RESERVED_0A
  205. <legal 0>
  206. */
  207. #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_RESERVED_0A_OFFSET 0x00000000
  208. #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_RESERVED_0A_LSB 28
  209. #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_RESERVED_0A_MASK 0xf0000000
  210. /* Description REO_FLUSH_QUEUE_STATUS_1_STATUS_HEADER_TIMESTAMP
  211. Timestamp at the moment that this status report is
  212. written.
  213. <legal all>
  214. */
  215. #define REO_FLUSH_QUEUE_STATUS_1_STATUS_HEADER_TIMESTAMP_OFFSET 0x00000004
  216. #define REO_FLUSH_QUEUE_STATUS_1_STATUS_HEADER_TIMESTAMP_LSB 0
  217. #define REO_FLUSH_QUEUE_STATUS_1_STATUS_HEADER_TIMESTAMP_MASK 0xffffffff
  218. /* Description REO_FLUSH_QUEUE_STATUS_2_ERROR_DETECTED
  219. Status of the blocking resource
  220. 0: No error has been detected while executing this
  221. command
  222. 1: Error detected: The resource to be used for blocking
  223. was already in use.
  224. */
  225. #define REO_FLUSH_QUEUE_STATUS_2_ERROR_DETECTED_OFFSET 0x00000008
  226. #define REO_FLUSH_QUEUE_STATUS_2_ERROR_DETECTED_LSB 0
  227. #define REO_FLUSH_QUEUE_STATUS_2_ERROR_DETECTED_MASK 0x00000001
  228. /* Description REO_FLUSH_QUEUE_STATUS_2_RESERVED_2A
  229. <legal 0>
  230. */
  231. #define REO_FLUSH_QUEUE_STATUS_2_RESERVED_2A_OFFSET 0x00000008
  232. #define REO_FLUSH_QUEUE_STATUS_2_RESERVED_2A_LSB 1
  233. #define REO_FLUSH_QUEUE_STATUS_2_RESERVED_2A_MASK 0xfffffffe
  234. /* Description REO_FLUSH_QUEUE_STATUS_3_RESERVED_3A
  235. <legal 0>
  236. */
  237. #define REO_FLUSH_QUEUE_STATUS_3_RESERVED_3A_OFFSET 0x0000000c
  238. #define REO_FLUSH_QUEUE_STATUS_3_RESERVED_3A_LSB 0
  239. #define REO_FLUSH_QUEUE_STATUS_3_RESERVED_3A_MASK 0xffffffff
  240. /* Description REO_FLUSH_QUEUE_STATUS_4_RESERVED_4A
  241. <legal 0>
  242. */
  243. #define REO_FLUSH_QUEUE_STATUS_4_RESERVED_4A_OFFSET 0x00000010
  244. #define REO_FLUSH_QUEUE_STATUS_4_RESERVED_4A_LSB 0
  245. #define REO_FLUSH_QUEUE_STATUS_4_RESERVED_4A_MASK 0xffffffff
  246. /* Description REO_FLUSH_QUEUE_STATUS_5_RESERVED_5A
  247. <legal 0>
  248. */
  249. #define REO_FLUSH_QUEUE_STATUS_5_RESERVED_5A_OFFSET 0x00000014
  250. #define REO_FLUSH_QUEUE_STATUS_5_RESERVED_5A_LSB 0
  251. #define REO_FLUSH_QUEUE_STATUS_5_RESERVED_5A_MASK 0xffffffff
  252. /* Description REO_FLUSH_QUEUE_STATUS_6_RESERVED_6A
  253. <legal 0>
  254. */
  255. #define REO_FLUSH_QUEUE_STATUS_6_RESERVED_6A_OFFSET 0x00000018
  256. #define REO_FLUSH_QUEUE_STATUS_6_RESERVED_6A_LSB 0
  257. #define REO_FLUSH_QUEUE_STATUS_6_RESERVED_6A_MASK 0xffffffff
  258. /* Description REO_FLUSH_QUEUE_STATUS_7_RESERVED_7A
  259. <legal 0>
  260. */
  261. #define REO_FLUSH_QUEUE_STATUS_7_RESERVED_7A_OFFSET 0x0000001c
  262. #define REO_FLUSH_QUEUE_STATUS_7_RESERVED_7A_LSB 0
  263. #define REO_FLUSH_QUEUE_STATUS_7_RESERVED_7A_MASK 0xffffffff
  264. /* Description REO_FLUSH_QUEUE_STATUS_8_RESERVED_8A
  265. <legal 0>
  266. */
  267. #define REO_FLUSH_QUEUE_STATUS_8_RESERVED_8A_OFFSET 0x00000020
  268. #define REO_FLUSH_QUEUE_STATUS_8_RESERVED_8A_LSB 0
  269. #define REO_FLUSH_QUEUE_STATUS_8_RESERVED_8A_MASK 0xffffffff
  270. /* Description REO_FLUSH_QUEUE_STATUS_9_RESERVED_9A
  271. <legal 0>
  272. */
  273. #define REO_FLUSH_QUEUE_STATUS_9_RESERVED_9A_OFFSET 0x00000024
  274. #define REO_FLUSH_QUEUE_STATUS_9_RESERVED_9A_LSB 0
  275. #define REO_FLUSH_QUEUE_STATUS_9_RESERVED_9A_MASK 0xffffffff
  276. /* Description REO_FLUSH_QUEUE_STATUS_10_RESERVED_10A
  277. <legal 0>
  278. */
  279. #define REO_FLUSH_QUEUE_STATUS_10_RESERVED_10A_OFFSET 0x00000028
  280. #define REO_FLUSH_QUEUE_STATUS_10_RESERVED_10A_LSB 0
  281. #define REO_FLUSH_QUEUE_STATUS_10_RESERVED_10A_MASK 0xffffffff
  282. /* Description REO_FLUSH_QUEUE_STATUS_11_RESERVED_11A
  283. <legal 0>
  284. */
  285. #define REO_FLUSH_QUEUE_STATUS_11_RESERVED_11A_OFFSET 0x0000002c
  286. #define REO_FLUSH_QUEUE_STATUS_11_RESERVED_11A_LSB 0
  287. #define REO_FLUSH_QUEUE_STATUS_11_RESERVED_11A_MASK 0xffffffff
  288. /* Description REO_FLUSH_QUEUE_STATUS_12_RESERVED_12A
  289. <legal 0>
  290. */
  291. #define REO_FLUSH_QUEUE_STATUS_12_RESERVED_12A_OFFSET 0x00000030
  292. #define REO_FLUSH_QUEUE_STATUS_12_RESERVED_12A_LSB 0
  293. #define REO_FLUSH_QUEUE_STATUS_12_RESERVED_12A_MASK 0xffffffff
  294. /* Description REO_FLUSH_QUEUE_STATUS_13_RESERVED_13A
  295. <legal 0>
  296. */
  297. #define REO_FLUSH_QUEUE_STATUS_13_RESERVED_13A_OFFSET 0x00000034
  298. #define REO_FLUSH_QUEUE_STATUS_13_RESERVED_13A_LSB 0
  299. #define REO_FLUSH_QUEUE_STATUS_13_RESERVED_13A_MASK 0xffffffff
  300. /* Description REO_FLUSH_QUEUE_STATUS_14_RESERVED_14A
  301. <legal 0>
  302. */
  303. #define REO_FLUSH_QUEUE_STATUS_14_RESERVED_14A_OFFSET 0x00000038
  304. #define REO_FLUSH_QUEUE_STATUS_14_RESERVED_14A_LSB 0
  305. #define REO_FLUSH_QUEUE_STATUS_14_RESERVED_14A_MASK 0xffffffff
  306. /* Description REO_FLUSH_QUEUE_STATUS_15_RESERVED_15A
  307. <legal 0>
  308. */
  309. #define REO_FLUSH_QUEUE_STATUS_15_RESERVED_15A_OFFSET 0x0000003c
  310. #define REO_FLUSH_QUEUE_STATUS_15_RESERVED_15A_LSB 0
  311. #define REO_FLUSH_QUEUE_STATUS_15_RESERVED_15A_MASK 0xffffffff
  312. /* Description REO_FLUSH_QUEUE_STATUS_16_RESERVED_16A
  313. <legal 0>
  314. */
  315. #define REO_FLUSH_QUEUE_STATUS_16_RESERVED_16A_OFFSET 0x00000040
  316. #define REO_FLUSH_QUEUE_STATUS_16_RESERVED_16A_LSB 0
  317. #define REO_FLUSH_QUEUE_STATUS_16_RESERVED_16A_MASK 0xffffffff
  318. /* Description REO_FLUSH_QUEUE_STATUS_17_RESERVED_17A
  319. <legal 0>
  320. */
  321. #define REO_FLUSH_QUEUE_STATUS_17_RESERVED_17A_OFFSET 0x00000044
  322. #define REO_FLUSH_QUEUE_STATUS_17_RESERVED_17A_LSB 0
  323. #define REO_FLUSH_QUEUE_STATUS_17_RESERVED_17A_MASK 0xffffffff
  324. /* Description REO_FLUSH_QUEUE_STATUS_18_RESERVED_18A
  325. <legal 0>
  326. */
  327. #define REO_FLUSH_QUEUE_STATUS_18_RESERVED_18A_OFFSET 0x00000048
  328. #define REO_FLUSH_QUEUE_STATUS_18_RESERVED_18A_LSB 0
  329. #define REO_FLUSH_QUEUE_STATUS_18_RESERVED_18A_MASK 0xffffffff
  330. /* Description REO_FLUSH_QUEUE_STATUS_19_RESERVED_19A
  331. <legal 0>
  332. */
  333. #define REO_FLUSH_QUEUE_STATUS_19_RESERVED_19A_OFFSET 0x0000004c
  334. #define REO_FLUSH_QUEUE_STATUS_19_RESERVED_19A_LSB 0
  335. #define REO_FLUSH_QUEUE_STATUS_19_RESERVED_19A_MASK 0xffffffff
  336. /* Description REO_FLUSH_QUEUE_STATUS_20_RESERVED_20A
  337. <legal 0>
  338. */
  339. #define REO_FLUSH_QUEUE_STATUS_20_RESERVED_20A_OFFSET 0x00000050
  340. #define REO_FLUSH_QUEUE_STATUS_20_RESERVED_20A_LSB 0
  341. #define REO_FLUSH_QUEUE_STATUS_20_RESERVED_20A_MASK 0xffffffff
  342. /* Description REO_FLUSH_QUEUE_STATUS_21_RESERVED_21A
  343. <legal 0>
  344. */
  345. #define REO_FLUSH_QUEUE_STATUS_21_RESERVED_21A_OFFSET 0x00000054
  346. #define REO_FLUSH_QUEUE_STATUS_21_RESERVED_21A_LSB 0
  347. #define REO_FLUSH_QUEUE_STATUS_21_RESERVED_21A_MASK 0xffffffff
  348. /* Description REO_FLUSH_QUEUE_STATUS_22_RESERVED_22A
  349. <legal 0>
  350. */
  351. #define REO_FLUSH_QUEUE_STATUS_22_RESERVED_22A_OFFSET 0x00000058
  352. #define REO_FLUSH_QUEUE_STATUS_22_RESERVED_22A_LSB 0
  353. #define REO_FLUSH_QUEUE_STATUS_22_RESERVED_22A_MASK 0xffffffff
  354. /* Description REO_FLUSH_QUEUE_STATUS_23_RESERVED_23A
  355. <legal 0>
  356. */
  357. #define REO_FLUSH_QUEUE_STATUS_23_RESERVED_23A_OFFSET 0x0000005c
  358. #define REO_FLUSH_QUEUE_STATUS_23_RESERVED_23A_LSB 0
  359. #define REO_FLUSH_QUEUE_STATUS_23_RESERVED_23A_MASK 0xffffffff
  360. /* Description REO_FLUSH_QUEUE_STATUS_24_RESERVED_24A
  361. <legal 0>
  362. */
  363. #define REO_FLUSH_QUEUE_STATUS_24_RESERVED_24A_OFFSET 0x00000060
  364. #define REO_FLUSH_QUEUE_STATUS_24_RESERVED_24A_LSB 0
  365. #define REO_FLUSH_QUEUE_STATUS_24_RESERVED_24A_MASK 0x0fffffff
  366. /* Description REO_FLUSH_QUEUE_STATUS_24_LOOPING_COUNT
  367. A count value that indicates the number of times the
  368. producer of entries into this Ring has looped around the
  369. ring.
  370. At initialization time, this value is set to 0. On the
  371. first loop, this value is set to 1. After the max value is
  372. reached allowed by the number of bits for this field, the
  373. count value continues with 0 again.
  374. In case SW is the consumer of the ring entries, it can
  375. use this field to figure out up to where the producer of
  376. entries has created new entries. This eliminates the need to
  377. check where the head pointer' of the ring is located once
  378. the SW starts processing an interrupt indicating that new
  379. entries have been put into this ring...
  380. Also note that SW if it wants only needs to look at the
  381. LSB bit of this count value.
  382. <legal all>
  383. */
  384. #define REO_FLUSH_QUEUE_STATUS_24_LOOPING_COUNT_OFFSET 0x00000060
  385. #define REO_FLUSH_QUEUE_STATUS_24_LOOPING_COUNT_LSB 28
  386. #define REO_FLUSH_QUEUE_STATUS_24_LOOPING_COUNT_MASK 0xf0000000
  387. #endif // _REO_FLUSH_QUEUE_STATUS_H_