reo_unblock_cache_status.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  1. /*
  2. * Copyright (c) 2018 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. #ifndef _REO_UNBLOCK_CACHE_STATUS_H_
  19. #define _REO_UNBLOCK_CACHE_STATUS_H_
  20. #if !defined(__ASSEMBLER__)
  21. #endif
  22. #include "uniform_reo_status_header.h"
  23. // ################ START SUMMARY #################
  24. //
  25. // Dword Fields
  26. // 0-1 struct uniform_reo_status_header status_header;
  27. // 2 error_detected[0], unblock_type[1], reserved_2a[31:2]
  28. // 3 reserved_3a[31:0]
  29. // 4 reserved_4a[31:0]
  30. // 5 reserved_5a[31:0]
  31. // 6 reserved_6a[31:0]
  32. // 7 reserved_7a[31:0]
  33. // 8 reserved_8a[31:0]
  34. // 9 reserved_9a[31:0]
  35. // 10 reserved_10a[31:0]
  36. // 11 reserved_11a[31:0]
  37. // 12 reserved_12a[31:0]
  38. // 13 reserved_13a[31:0]
  39. // 14 reserved_14a[31:0]
  40. // 15 reserved_15a[31:0]
  41. // 16 reserved_16a[31:0]
  42. // 17 reserved_17a[31:0]
  43. // 18 reserved_18a[31:0]
  44. // 19 reserved_19a[31:0]
  45. // 20 reserved_20a[31:0]
  46. // 21 reserved_21a[31:0]
  47. // 22 reserved_22a[31:0]
  48. // 23 reserved_23a[31:0]
  49. // 24 reserved_24a[27:0], looping_count[31:28]
  50. //
  51. // ################ END SUMMARY #################
  52. #define NUM_OF_DWORDS_REO_UNBLOCK_CACHE_STATUS 25
  53. struct reo_unblock_cache_status {
  54. struct uniform_reo_status_header status_header;
  55. uint32_t error_detected : 1, //[0]
  56. unblock_type : 1, //[1]
  57. reserved_2a : 30; //[31:2]
  58. uint32_t reserved_3a : 32; //[31:0]
  59. uint32_t reserved_4a : 32; //[31:0]
  60. uint32_t reserved_5a : 32; //[31:0]
  61. uint32_t reserved_6a : 32; //[31:0]
  62. uint32_t reserved_7a : 32; //[31:0]
  63. uint32_t reserved_8a : 32; //[31:0]
  64. uint32_t reserved_9a : 32; //[31:0]
  65. uint32_t reserved_10a : 32; //[31:0]
  66. uint32_t reserved_11a : 32; //[31:0]
  67. uint32_t reserved_12a : 32; //[31:0]
  68. uint32_t reserved_13a : 32; //[31:0]
  69. uint32_t reserved_14a : 32; //[31:0]
  70. uint32_t reserved_15a : 32; //[31:0]
  71. uint32_t reserved_16a : 32; //[31:0]
  72. uint32_t reserved_17a : 32; //[31:0]
  73. uint32_t reserved_18a : 32; //[31:0]
  74. uint32_t reserved_19a : 32; //[31:0]
  75. uint32_t reserved_20a : 32; //[31:0]
  76. uint32_t reserved_21a : 32; //[31:0]
  77. uint32_t reserved_22a : 32; //[31:0]
  78. uint32_t reserved_23a : 32; //[31:0]
  79. uint32_t reserved_24a : 28, //[27:0]
  80. looping_count : 4; //[31:28]
  81. };
  82. /*
  83. struct uniform_reo_status_header status_header
  84. Consumer: SW
  85. Producer: REO
  86. Details that can link this status with the original
  87. command. It also contains info on how long REO took to
  88. execute this command.
  89. error_detected
  90. Status for blocking resource handling
  91. 0: No error has been detected while executing this
  92. command
  93. 1: The blocking resource was not in use, and therefor it
  94. could not be 'unblocked'
  95. unblock_type
  96. Reference to the type of Unblock command type...
  97. <enum 0 unblock_resource_index> Unblock a blocking
  98. resource
  99. <enum 1 unblock_cache> The entire cache usage is
  100. unblock.
  101. <legal all>
  102. reserved_2a
  103. <legal 0>
  104. reserved_3a
  105. <legal 0>
  106. reserved_4a
  107. <legal 0>
  108. reserved_5a
  109. <legal 0>
  110. reserved_6a
  111. <legal 0>
  112. reserved_7a
  113. <legal 0>
  114. reserved_8a
  115. <legal 0>
  116. reserved_9a
  117. <legal 0>
  118. reserved_10a
  119. <legal 0>
  120. reserved_11a
  121. <legal 0>
  122. reserved_12a
  123. <legal 0>
  124. reserved_13a
  125. <legal 0>
  126. reserved_14a
  127. <legal 0>
  128. reserved_15a
  129. <legal 0>
  130. reserved_16a
  131. <legal 0>
  132. reserved_17a
  133. <legal 0>
  134. reserved_18a
  135. <legal 0>
  136. reserved_19a
  137. <legal 0>
  138. reserved_20a
  139. <legal 0>
  140. reserved_21a
  141. <legal 0>
  142. reserved_22a
  143. <legal 0>
  144. reserved_23a
  145. <legal 0>
  146. reserved_24a
  147. <legal 0>
  148. looping_count
  149. A count value that indicates the number of times the
  150. producer of entries into this Ring has looped around the
  151. ring.
  152. At initialization time, this value is set to 0. On the
  153. first loop, this value is set to 1. After the max value is
  154. reached allowed by the number of bits for this field, the
  155. count value continues with 0 again.
  156. In case SW is the consumer of the ring entries, it can
  157. use this field to figure out up to where the producer of
  158. entries has created new entries. This eliminates the need to
  159. check where the head pointer' of the ring is located once
  160. the SW starts processing an interrupt indicating that new
  161. entries have been put into this ring...
  162. Also note that SW if it wants only needs to look at the
  163. LSB bit of this count value.
  164. <legal all>
  165. */
  166. #define REO_UNBLOCK_CACHE_STATUS_0_UNIFORM_REO_STATUS_HEADER_STATUS_HEADER_OFFSET 0x00000000
  167. #define REO_UNBLOCK_CACHE_STATUS_0_UNIFORM_REO_STATUS_HEADER_STATUS_HEADER_LSB 28
  168. #define REO_UNBLOCK_CACHE_STATUS_0_UNIFORM_REO_STATUS_HEADER_STATUS_HEADER_MASK 0xffffffff
  169. #define REO_UNBLOCK_CACHE_STATUS_1_UNIFORM_REO_STATUS_HEADER_STATUS_HEADER_OFFSET 0x00000004
  170. #define REO_UNBLOCK_CACHE_STATUS_1_UNIFORM_REO_STATUS_HEADER_STATUS_HEADER_LSB 28
  171. #define REO_UNBLOCK_CACHE_STATUS_1_UNIFORM_REO_STATUS_HEADER_STATUS_HEADER_MASK 0xffffffff
  172. /* Description REO_UNBLOCK_CACHE_STATUS_2_ERROR_DETECTED
  173. Status for blocking resource handling
  174. 0: No error has been detected while executing this
  175. command
  176. 1: The blocking resource was not in use, and therefor it
  177. could not be 'unblocked'
  178. */
  179. #define REO_UNBLOCK_CACHE_STATUS_2_ERROR_DETECTED_OFFSET 0x00000008
  180. #define REO_UNBLOCK_CACHE_STATUS_2_ERROR_DETECTED_LSB 0
  181. #define REO_UNBLOCK_CACHE_STATUS_2_ERROR_DETECTED_MASK 0x00000001
  182. /* Description REO_UNBLOCK_CACHE_STATUS_2_UNBLOCK_TYPE
  183. Reference to the type of Unblock command type...
  184. <enum 0 unblock_resource_index> Unblock a blocking
  185. resource
  186. <enum 1 unblock_cache> The entire cache usage is
  187. unblock.
  188. <legal all>
  189. */
  190. #define REO_UNBLOCK_CACHE_STATUS_2_UNBLOCK_TYPE_OFFSET 0x00000008
  191. #define REO_UNBLOCK_CACHE_STATUS_2_UNBLOCK_TYPE_LSB 1
  192. #define REO_UNBLOCK_CACHE_STATUS_2_UNBLOCK_TYPE_MASK 0x00000002
  193. /* Description REO_UNBLOCK_CACHE_STATUS_2_RESERVED_2A
  194. <legal 0>
  195. */
  196. #define REO_UNBLOCK_CACHE_STATUS_2_RESERVED_2A_OFFSET 0x00000008
  197. #define REO_UNBLOCK_CACHE_STATUS_2_RESERVED_2A_LSB 2
  198. #define REO_UNBLOCK_CACHE_STATUS_2_RESERVED_2A_MASK 0xfffffffc
  199. /* Description REO_UNBLOCK_CACHE_STATUS_3_RESERVED_3A
  200. <legal 0>
  201. */
  202. #define REO_UNBLOCK_CACHE_STATUS_3_RESERVED_3A_OFFSET 0x0000000c
  203. #define REO_UNBLOCK_CACHE_STATUS_3_RESERVED_3A_LSB 0
  204. #define REO_UNBLOCK_CACHE_STATUS_3_RESERVED_3A_MASK 0xffffffff
  205. /* Description REO_UNBLOCK_CACHE_STATUS_4_RESERVED_4A
  206. <legal 0>
  207. */
  208. #define REO_UNBLOCK_CACHE_STATUS_4_RESERVED_4A_OFFSET 0x00000010
  209. #define REO_UNBLOCK_CACHE_STATUS_4_RESERVED_4A_LSB 0
  210. #define REO_UNBLOCK_CACHE_STATUS_4_RESERVED_4A_MASK 0xffffffff
  211. /* Description REO_UNBLOCK_CACHE_STATUS_5_RESERVED_5A
  212. <legal 0>
  213. */
  214. #define REO_UNBLOCK_CACHE_STATUS_5_RESERVED_5A_OFFSET 0x00000014
  215. #define REO_UNBLOCK_CACHE_STATUS_5_RESERVED_5A_LSB 0
  216. #define REO_UNBLOCK_CACHE_STATUS_5_RESERVED_5A_MASK 0xffffffff
  217. /* Description REO_UNBLOCK_CACHE_STATUS_6_RESERVED_6A
  218. <legal 0>
  219. */
  220. #define REO_UNBLOCK_CACHE_STATUS_6_RESERVED_6A_OFFSET 0x00000018
  221. #define REO_UNBLOCK_CACHE_STATUS_6_RESERVED_6A_LSB 0
  222. #define REO_UNBLOCK_CACHE_STATUS_6_RESERVED_6A_MASK 0xffffffff
  223. /* Description REO_UNBLOCK_CACHE_STATUS_7_RESERVED_7A
  224. <legal 0>
  225. */
  226. #define REO_UNBLOCK_CACHE_STATUS_7_RESERVED_7A_OFFSET 0x0000001c
  227. #define REO_UNBLOCK_CACHE_STATUS_7_RESERVED_7A_LSB 0
  228. #define REO_UNBLOCK_CACHE_STATUS_7_RESERVED_7A_MASK 0xffffffff
  229. /* Description REO_UNBLOCK_CACHE_STATUS_8_RESERVED_8A
  230. <legal 0>
  231. */
  232. #define REO_UNBLOCK_CACHE_STATUS_8_RESERVED_8A_OFFSET 0x00000020
  233. #define REO_UNBLOCK_CACHE_STATUS_8_RESERVED_8A_LSB 0
  234. #define REO_UNBLOCK_CACHE_STATUS_8_RESERVED_8A_MASK 0xffffffff
  235. /* Description REO_UNBLOCK_CACHE_STATUS_9_RESERVED_9A
  236. <legal 0>
  237. */
  238. #define REO_UNBLOCK_CACHE_STATUS_9_RESERVED_9A_OFFSET 0x00000024
  239. #define REO_UNBLOCK_CACHE_STATUS_9_RESERVED_9A_LSB 0
  240. #define REO_UNBLOCK_CACHE_STATUS_9_RESERVED_9A_MASK 0xffffffff
  241. /* Description REO_UNBLOCK_CACHE_STATUS_10_RESERVED_10A
  242. <legal 0>
  243. */
  244. #define REO_UNBLOCK_CACHE_STATUS_10_RESERVED_10A_OFFSET 0x00000028
  245. #define REO_UNBLOCK_CACHE_STATUS_10_RESERVED_10A_LSB 0
  246. #define REO_UNBLOCK_CACHE_STATUS_10_RESERVED_10A_MASK 0xffffffff
  247. /* Description REO_UNBLOCK_CACHE_STATUS_11_RESERVED_11A
  248. <legal 0>
  249. */
  250. #define REO_UNBLOCK_CACHE_STATUS_11_RESERVED_11A_OFFSET 0x0000002c
  251. #define REO_UNBLOCK_CACHE_STATUS_11_RESERVED_11A_LSB 0
  252. #define REO_UNBLOCK_CACHE_STATUS_11_RESERVED_11A_MASK 0xffffffff
  253. /* Description REO_UNBLOCK_CACHE_STATUS_12_RESERVED_12A
  254. <legal 0>
  255. */
  256. #define REO_UNBLOCK_CACHE_STATUS_12_RESERVED_12A_OFFSET 0x00000030
  257. #define REO_UNBLOCK_CACHE_STATUS_12_RESERVED_12A_LSB 0
  258. #define REO_UNBLOCK_CACHE_STATUS_12_RESERVED_12A_MASK 0xffffffff
  259. /* Description REO_UNBLOCK_CACHE_STATUS_13_RESERVED_13A
  260. <legal 0>
  261. */
  262. #define REO_UNBLOCK_CACHE_STATUS_13_RESERVED_13A_OFFSET 0x00000034
  263. #define REO_UNBLOCK_CACHE_STATUS_13_RESERVED_13A_LSB 0
  264. #define REO_UNBLOCK_CACHE_STATUS_13_RESERVED_13A_MASK 0xffffffff
  265. /* Description REO_UNBLOCK_CACHE_STATUS_14_RESERVED_14A
  266. <legal 0>
  267. */
  268. #define REO_UNBLOCK_CACHE_STATUS_14_RESERVED_14A_OFFSET 0x00000038
  269. #define REO_UNBLOCK_CACHE_STATUS_14_RESERVED_14A_LSB 0
  270. #define REO_UNBLOCK_CACHE_STATUS_14_RESERVED_14A_MASK 0xffffffff
  271. /* Description REO_UNBLOCK_CACHE_STATUS_15_RESERVED_15A
  272. <legal 0>
  273. */
  274. #define REO_UNBLOCK_CACHE_STATUS_15_RESERVED_15A_OFFSET 0x0000003c
  275. #define REO_UNBLOCK_CACHE_STATUS_15_RESERVED_15A_LSB 0
  276. #define REO_UNBLOCK_CACHE_STATUS_15_RESERVED_15A_MASK 0xffffffff
  277. /* Description REO_UNBLOCK_CACHE_STATUS_16_RESERVED_16A
  278. <legal 0>
  279. */
  280. #define REO_UNBLOCK_CACHE_STATUS_16_RESERVED_16A_OFFSET 0x00000040
  281. #define REO_UNBLOCK_CACHE_STATUS_16_RESERVED_16A_LSB 0
  282. #define REO_UNBLOCK_CACHE_STATUS_16_RESERVED_16A_MASK 0xffffffff
  283. /* Description REO_UNBLOCK_CACHE_STATUS_17_RESERVED_17A
  284. <legal 0>
  285. */
  286. #define REO_UNBLOCK_CACHE_STATUS_17_RESERVED_17A_OFFSET 0x00000044
  287. #define REO_UNBLOCK_CACHE_STATUS_17_RESERVED_17A_LSB 0
  288. #define REO_UNBLOCK_CACHE_STATUS_17_RESERVED_17A_MASK 0xffffffff
  289. /* Description REO_UNBLOCK_CACHE_STATUS_18_RESERVED_18A
  290. <legal 0>
  291. */
  292. #define REO_UNBLOCK_CACHE_STATUS_18_RESERVED_18A_OFFSET 0x00000048
  293. #define REO_UNBLOCK_CACHE_STATUS_18_RESERVED_18A_LSB 0
  294. #define REO_UNBLOCK_CACHE_STATUS_18_RESERVED_18A_MASK 0xffffffff
  295. /* Description REO_UNBLOCK_CACHE_STATUS_19_RESERVED_19A
  296. <legal 0>
  297. */
  298. #define REO_UNBLOCK_CACHE_STATUS_19_RESERVED_19A_OFFSET 0x0000004c
  299. #define REO_UNBLOCK_CACHE_STATUS_19_RESERVED_19A_LSB 0
  300. #define REO_UNBLOCK_CACHE_STATUS_19_RESERVED_19A_MASK 0xffffffff
  301. /* Description REO_UNBLOCK_CACHE_STATUS_20_RESERVED_20A
  302. <legal 0>
  303. */
  304. #define REO_UNBLOCK_CACHE_STATUS_20_RESERVED_20A_OFFSET 0x00000050
  305. #define REO_UNBLOCK_CACHE_STATUS_20_RESERVED_20A_LSB 0
  306. #define REO_UNBLOCK_CACHE_STATUS_20_RESERVED_20A_MASK 0xffffffff
  307. /* Description REO_UNBLOCK_CACHE_STATUS_21_RESERVED_21A
  308. <legal 0>
  309. */
  310. #define REO_UNBLOCK_CACHE_STATUS_21_RESERVED_21A_OFFSET 0x00000054
  311. #define REO_UNBLOCK_CACHE_STATUS_21_RESERVED_21A_LSB 0
  312. #define REO_UNBLOCK_CACHE_STATUS_21_RESERVED_21A_MASK 0xffffffff
  313. /* Description REO_UNBLOCK_CACHE_STATUS_22_RESERVED_22A
  314. <legal 0>
  315. */
  316. #define REO_UNBLOCK_CACHE_STATUS_22_RESERVED_22A_OFFSET 0x00000058
  317. #define REO_UNBLOCK_CACHE_STATUS_22_RESERVED_22A_LSB 0
  318. #define REO_UNBLOCK_CACHE_STATUS_22_RESERVED_22A_MASK 0xffffffff
  319. /* Description REO_UNBLOCK_CACHE_STATUS_23_RESERVED_23A
  320. <legal 0>
  321. */
  322. #define REO_UNBLOCK_CACHE_STATUS_23_RESERVED_23A_OFFSET 0x0000005c
  323. #define REO_UNBLOCK_CACHE_STATUS_23_RESERVED_23A_LSB 0
  324. #define REO_UNBLOCK_CACHE_STATUS_23_RESERVED_23A_MASK 0xffffffff
  325. /* Description REO_UNBLOCK_CACHE_STATUS_24_RESERVED_24A
  326. <legal 0>
  327. */
  328. #define REO_UNBLOCK_CACHE_STATUS_24_RESERVED_24A_OFFSET 0x00000060
  329. #define REO_UNBLOCK_CACHE_STATUS_24_RESERVED_24A_LSB 0
  330. #define REO_UNBLOCK_CACHE_STATUS_24_RESERVED_24A_MASK 0x0fffffff
  331. /* Description REO_UNBLOCK_CACHE_STATUS_24_LOOPING_COUNT
  332. A count value that indicates the number of times the
  333. producer of entries into this Ring has looped around the
  334. ring.
  335. At initialization time, this value is set to 0. On the
  336. first loop, this value is set to 1. After the max value is
  337. reached allowed by the number of bits for this field, the
  338. count value continues with 0 again.
  339. In case SW is the consumer of the ring entries, it can
  340. use this field to figure out up to where the producer of
  341. entries has created new entries. This eliminates the need to
  342. check where the head pointer' of the ring is located once
  343. the SW starts processing an interrupt indicating that new
  344. entries have been put into this ring...
  345. Also note that SW if it wants only needs to look at the
  346. LSB bit of this count value.
  347. <legal all>
  348. */
  349. #define REO_UNBLOCK_CACHE_STATUS_24_LOOPING_COUNT_OFFSET 0x00000060
  350. #define REO_UNBLOCK_CACHE_STATUS_24_LOOPING_COUNT_LSB 28
  351. #define REO_UNBLOCK_CACHE_STATUS_24_LOOPING_COUNT_MASK 0xf0000000
  352. #endif // _REO_UNBLOCK_CACHE_STATUS_H_