reo_flush_cache.h 14 KB

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