reo_flush_cache.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489
  1. /*
  2. * Copyright (c) 2016-2017 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. //
  19. // DO NOT EDIT! This file is automatically generated
  20. // These definitions are tied to a particular hardware layout
  21. #ifndef _REO_FLUSH_CACHE_H_
  22. #define _REO_FLUSH_CACHE_H_
  23. #if !defined(__ASSEMBLER__)
  24. #endif
  25. #include "uniform_reo_cmd_header.h"
  26. // ################ START SUMMARY #################
  27. //
  28. // Dword Fields
  29. // 0 struct uniform_reo_cmd_header cmd_header;
  30. // 1 flush_addr_31_0[31:0]
  31. // 2 flush_addr_39_32[7:0], forward_all_mpdus_in_queue[8], release_cache_block_index[9], cache_block_resource_index[11:10], flush_without_invalidate[12], block_cache_usage_after_flush[13], flush_entire_cache[14], reserved_2b[31:15]
  32. // 3 reserved_3a[31:0]
  33. // 4 reserved_4a[31:0]
  34. // 5 reserved_5a[31:0]
  35. // 6 reserved_6a[31:0]
  36. // 7 reserved_7a[31:0]
  37. // 8 reserved_8a[31:0]
  38. //
  39. // ################ END SUMMARY #################
  40. #define NUM_OF_DWORDS_REO_FLUSH_CACHE 9
  41. struct reo_flush_cache {
  42. struct uniform_reo_cmd_header cmd_header;
  43. uint32_t flush_addr_31_0 : 32; //[31:0]
  44. uint32_t flush_addr_39_32 : 8, //[7:0]
  45. forward_all_mpdus_in_queue : 1, //[8]
  46. release_cache_block_index : 1, //[9]
  47. cache_block_resource_index : 2, //[11:10]
  48. flush_without_invalidate : 1, //[12]
  49. block_cache_usage_after_flush : 1, //[13]
  50. flush_entire_cache : 1, //[14]
  51. reserved_2b : 17; //[31:15]
  52. uint32_t reserved_3a : 32; //[31:0]
  53. uint32_t reserved_4a : 32; //[31:0]
  54. uint32_t reserved_5a : 32; //[31:0]
  55. uint32_t reserved_6a : 32; //[31:0]
  56. uint32_t reserved_7a : 32; //[31:0]
  57. uint32_t reserved_8a : 32; //[31:0]
  58. };
  59. /*
  60. struct uniform_reo_cmd_header cmd_header
  61. Consumer: REO
  62. Producer: SW
  63. Details for command execution tracking purposes.
  64. flush_addr_31_0
  65. Consumer: REO
  66. Producer: SW
  67. Address (lower 32 bits) of the descriptor to flush
  68. <legal all>
  69. flush_addr_39_32
  70. Consumer: REO
  71. Producer: SW
  72. Address (upper 8 bits) of the descriptor to flush
  73. <legal all>
  74. forward_all_mpdus_in_queue
  75. Is only allowed to be set when the flush address
  76. corresponds with a REO descriptor.
  77. When set, REO shall first forward all the MPDUs held in
  78. the indicated re-order queue, before flushing the descriptor
  79. from the cache.
  80. <legal all>
  81. release_cache_block_index
  82. Field not valid when Flush_entire_cache is set.
  83. If SW has previously used a blocking resource that it
  84. now wants to re-use for this command, this bit shall be set.
  85. It prevents SW from having to send a separate
  86. REO_UNBLOCK_CACHE command.
  87. When set, HW will first release the blocking resource
  88. (indicated in field 'Cache_block_resouce_index') before this
  89. command gets executed.
  90. If that resource was already unblocked, this will be
  91. considered an error. This command will not be executed, and
  92. an error shall be returned.
  93. <legal all>
  94. cache_block_resource_index
  95. Field not valid when Flush_entire_cache is set.
  96. Indicates which of the four blocking resources in REO
  97. will be assigned for managing the blocking of this
  98. (descriptor) address
  99. <legal all>
  100. flush_without_invalidate
  101. Field not valid when Flush_entire_cache is set.
  102. When set, REO shall flush the cache line contents from
  103. the cache, but there is NO need to invalidate the cache line
  104. entry... The contents in the cache can be maintained. This
  105. feature can be used by SW (and DV) to get a current snapshot
  106. of the contents in the cache
  107. <legal all>
  108. block_cache_usage_after_flush
  109. Field not valid when Flush_entire_cache is set.
  110. When set, REO shall block any cache accesses to this
  111. address till explicitly unblocked.
  112. Whenever SW sets this bit, SW shall also set bit
  113. 'Forward_all_mpdus_in_queue' to ensure all packets are
  114. flushed out in order to make sure this queue desc is not in
  115. one of the aging link lists. In case SW does not want to
  116. flush the MPDUs in the queue, see the recipe description
  117. below this TLV definition.
  118. The 'blocking' index to be used for this is indicated in
  119. field 'cache_block_resource_index'. If SW had previously
  120. used this blocking resource and was not freed up yet, SW
  121. shall first unblock that index (by setting bit
  122. Release_cache_block_index) or use an unblock command.
  123. If the resource indicated here was already blocked (and
  124. did not get unblocked in this command), it is considered an
  125. error scenario...
  126. No flush shall happen. The status for this command shall
  127. indicate error.
  128. <legal all>
  129. flush_entire_cache
  130. When set, the entire cache shall be flushed. The entire
  131. cache will also remain blocked, till the
  132. 'REO_UNBLOCK_COMMAND' is received with bit unblock type set
  133. to unblock_cache. All other fields in this command are to be
  134. ignored.
  135. Note that flushing the entire cache has no changes to
  136. the current settings of the blocking resource settings
  137. <legal all>
  138. reserved_2b
  139. <legal 0>
  140. reserved_3a
  141. <legal 0>
  142. reserved_4a
  143. <legal 0>
  144. reserved_5a
  145. <legal 0>
  146. reserved_6a
  147. <legal 0>
  148. reserved_7a
  149. <legal 0>
  150. reserved_8a
  151. <legal 0>
  152. */
  153. #define REO_FLUSH_CACHE_0_UNIFORM_REO_CMD_HEADER_CMD_HEADER_OFFSET 0x00000000
  154. #define REO_FLUSH_CACHE_0_UNIFORM_REO_CMD_HEADER_CMD_HEADER_LSB 0
  155. #define REO_FLUSH_CACHE_0_UNIFORM_REO_CMD_HEADER_CMD_HEADER_MASK 0xffffffff
  156. /* Description REO_FLUSH_CACHE_1_FLUSH_ADDR_31_0
  157. Consumer: REO
  158. Producer: SW
  159. Address (lower 32 bits) of the descriptor to flush
  160. <legal all>
  161. */
  162. #define REO_FLUSH_CACHE_1_FLUSH_ADDR_31_0_OFFSET 0x00000004
  163. #define REO_FLUSH_CACHE_1_FLUSH_ADDR_31_0_LSB 0
  164. #define REO_FLUSH_CACHE_1_FLUSH_ADDR_31_0_MASK 0xffffffff
  165. /* Description REO_FLUSH_CACHE_2_FLUSH_ADDR_39_32
  166. Consumer: REO
  167. Producer: SW
  168. Address (upper 8 bits) of the descriptor to flush
  169. <legal all>
  170. */
  171. #define REO_FLUSH_CACHE_2_FLUSH_ADDR_39_32_OFFSET 0x00000008
  172. #define REO_FLUSH_CACHE_2_FLUSH_ADDR_39_32_LSB 0
  173. #define REO_FLUSH_CACHE_2_FLUSH_ADDR_39_32_MASK 0x000000ff
  174. /* Description REO_FLUSH_CACHE_2_FORWARD_ALL_MPDUS_IN_QUEUE
  175. Is only allowed to be set when the flush address
  176. corresponds with a REO descriptor.
  177. When set, REO shall first forward all the MPDUs held in
  178. the indicated re-order queue, before flushing the descriptor
  179. from the cache.
  180. <legal all>
  181. */
  182. #define REO_FLUSH_CACHE_2_FORWARD_ALL_MPDUS_IN_QUEUE_OFFSET 0x00000008
  183. #define REO_FLUSH_CACHE_2_FORWARD_ALL_MPDUS_IN_QUEUE_LSB 8
  184. #define REO_FLUSH_CACHE_2_FORWARD_ALL_MPDUS_IN_QUEUE_MASK 0x00000100
  185. /* Description REO_FLUSH_CACHE_2_RELEASE_CACHE_BLOCK_INDEX
  186. Field not valid when Flush_entire_cache is set.
  187. If SW has previously used a blocking resource that it
  188. now wants to re-use for this command, this bit shall be set.
  189. It prevents SW from having to send a separate
  190. REO_UNBLOCK_CACHE command.
  191. When set, HW will first release the blocking resource
  192. (indicated in field 'Cache_block_resouce_index') before this
  193. command gets executed.
  194. If that resource was already unblocked, this will be
  195. considered an error. This command will not be executed, and
  196. an error shall be returned.
  197. <legal all>
  198. */
  199. #define REO_FLUSH_CACHE_2_RELEASE_CACHE_BLOCK_INDEX_OFFSET 0x00000008
  200. #define REO_FLUSH_CACHE_2_RELEASE_CACHE_BLOCK_INDEX_LSB 9
  201. #define REO_FLUSH_CACHE_2_RELEASE_CACHE_BLOCK_INDEX_MASK 0x00000200
  202. /* Description REO_FLUSH_CACHE_2_CACHE_BLOCK_RESOURCE_INDEX
  203. Field not valid when Flush_entire_cache is set.
  204. Indicates which of the four blocking resources in REO
  205. will be assigned for managing the blocking of this
  206. (descriptor) address
  207. <legal all>
  208. */
  209. #define REO_FLUSH_CACHE_2_CACHE_BLOCK_RESOURCE_INDEX_OFFSET 0x00000008
  210. #define REO_FLUSH_CACHE_2_CACHE_BLOCK_RESOURCE_INDEX_LSB 10
  211. #define REO_FLUSH_CACHE_2_CACHE_BLOCK_RESOURCE_INDEX_MASK 0x00000c00
  212. /* Description REO_FLUSH_CACHE_2_FLUSH_WITHOUT_INVALIDATE
  213. Field not valid when Flush_entire_cache is set.
  214. When set, REO shall flush the cache line contents from
  215. the cache, but there is NO need to invalidate the cache line
  216. entry... The contents in the cache can be maintained. This
  217. feature can be used by SW (and DV) to get a current snapshot
  218. of the contents in the cache
  219. <legal all>
  220. */
  221. #define REO_FLUSH_CACHE_2_FLUSH_WITHOUT_INVALIDATE_OFFSET 0x00000008
  222. #define REO_FLUSH_CACHE_2_FLUSH_WITHOUT_INVALIDATE_LSB 12
  223. #define REO_FLUSH_CACHE_2_FLUSH_WITHOUT_INVALIDATE_MASK 0x00001000
  224. /* Description REO_FLUSH_CACHE_2_BLOCK_CACHE_USAGE_AFTER_FLUSH
  225. Field not valid when Flush_entire_cache is set.
  226. When set, REO shall block any cache accesses to this
  227. address till explicitly unblocked.
  228. Whenever SW sets this bit, SW shall also set bit
  229. 'Forward_all_mpdus_in_queue' to ensure all packets are
  230. flushed out in order to make sure this queue desc is not in
  231. one of the aging link lists. In case SW does not want to
  232. flush the MPDUs in the queue, see the recipe description
  233. below this TLV definition.
  234. The 'blocking' index to be used for this is indicated in
  235. field 'cache_block_resource_index'. If SW had previously
  236. used this blocking resource and was not freed up yet, SW
  237. shall first unblock that index (by setting bit
  238. Release_cache_block_index) or use an unblock command.
  239. If the resource indicated here was already blocked (and
  240. did not get unblocked in this command), it is considered an
  241. error scenario...
  242. No flush shall happen. The status for this command shall
  243. indicate error.
  244. <legal all>
  245. */
  246. #define REO_FLUSH_CACHE_2_BLOCK_CACHE_USAGE_AFTER_FLUSH_OFFSET 0x00000008
  247. #define REO_FLUSH_CACHE_2_BLOCK_CACHE_USAGE_AFTER_FLUSH_LSB 13
  248. #define REO_FLUSH_CACHE_2_BLOCK_CACHE_USAGE_AFTER_FLUSH_MASK 0x00002000
  249. /* Description REO_FLUSH_CACHE_2_FLUSH_ENTIRE_CACHE
  250. When set, the entire cache shall be flushed. The entire
  251. cache will also remain blocked, till the
  252. 'REO_UNBLOCK_COMMAND' is received with bit unblock type set
  253. to unblock_cache. All other fields in this command are to be
  254. ignored.
  255. Note that flushing the entire cache has no changes to
  256. the current settings of the blocking resource settings
  257. <legal all>
  258. */
  259. #define REO_FLUSH_CACHE_2_FLUSH_ENTIRE_CACHE_OFFSET 0x00000008
  260. #define REO_FLUSH_CACHE_2_FLUSH_ENTIRE_CACHE_LSB 14
  261. #define REO_FLUSH_CACHE_2_FLUSH_ENTIRE_CACHE_MASK 0x00004000
  262. /* Description REO_FLUSH_CACHE_2_RESERVED_2B
  263. <legal 0>
  264. */
  265. #define REO_FLUSH_CACHE_2_RESERVED_2B_OFFSET 0x00000008
  266. #define REO_FLUSH_CACHE_2_RESERVED_2B_LSB 15
  267. #define REO_FLUSH_CACHE_2_RESERVED_2B_MASK 0xffff8000
  268. /* Description REO_FLUSH_CACHE_3_RESERVED_3A
  269. <legal 0>
  270. */
  271. #define REO_FLUSH_CACHE_3_RESERVED_3A_OFFSET 0x0000000c
  272. #define REO_FLUSH_CACHE_3_RESERVED_3A_LSB 0
  273. #define REO_FLUSH_CACHE_3_RESERVED_3A_MASK 0xffffffff
  274. /* Description REO_FLUSH_CACHE_4_RESERVED_4A
  275. <legal 0>
  276. */
  277. #define REO_FLUSH_CACHE_4_RESERVED_4A_OFFSET 0x00000010
  278. #define REO_FLUSH_CACHE_4_RESERVED_4A_LSB 0
  279. #define REO_FLUSH_CACHE_4_RESERVED_4A_MASK 0xffffffff
  280. /* Description REO_FLUSH_CACHE_5_RESERVED_5A
  281. <legal 0>
  282. */
  283. #define REO_FLUSH_CACHE_5_RESERVED_5A_OFFSET 0x00000014
  284. #define REO_FLUSH_CACHE_5_RESERVED_5A_LSB 0
  285. #define REO_FLUSH_CACHE_5_RESERVED_5A_MASK 0xffffffff
  286. /* Description REO_FLUSH_CACHE_6_RESERVED_6A
  287. <legal 0>
  288. */
  289. #define REO_FLUSH_CACHE_6_RESERVED_6A_OFFSET 0x00000018
  290. #define REO_FLUSH_CACHE_6_RESERVED_6A_LSB 0
  291. #define REO_FLUSH_CACHE_6_RESERVED_6A_MASK 0xffffffff
  292. /* Description REO_FLUSH_CACHE_7_RESERVED_7A
  293. <legal 0>
  294. */
  295. #define REO_FLUSH_CACHE_7_RESERVED_7A_OFFSET 0x0000001c
  296. #define REO_FLUSH_CACHE_7_RESERVED_7A_LSB 0
  297. #define REO_FLUSH_CACHE_7_RESERVED_7A_MASK 0xffffffff
  298. /* Description REO_FLUSH_CACHE_8_RESERVED_8A
  299. <legal 0>
  300. */
  301. #define REO_FLUSH_CACHE_8_RESERVED_8A_OFFSET 0x00000020
  302. #define REO_FLUSH_CACHE_8_RESERVED_8A_LSB 0
  303. #define REO_FLUSH_CACHE_8_RESERVED_8A_MASK 0xffffffff
  304. #endif // _REO_FLUSH_CACHE_H_