reo_unblock_cache.h 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  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_UNBLOCK_CACHE_H_
  17. #define _REO_UNBLOCK_CACHE_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #include "uniform_reo_cmd_header.h"
  21. // ################ START SUMMARY #################
  22. //
  23. // Dword Fields
  24. // 0 struct uniform_reo_cmd_header cmd_header;
  25. // 1 unblock_type[0], cache_block_resource_index[2:1], reserved_1a[31:3]
  26. // 2 reserved_2a[31:0]
  27. // 3 reserved_3a[31:0]
  28. // 4 reserved_4a[31:0]
  29. // 5 reserved_5a[31:0]
  30. // 6 reserved_6a[31:0]
  31. // 7 reserved_7a[31:0]
  32. // 8 reserved_8a[31:0]
  33. //
  34. // ################ END SUMMARY #################
  35. #define NUM_OF_DWORDS_REO_UNBLOCK_CACHE 9
  36. struct reo_unblock_cache {
  37. struct uniform_reo_cmd_header cmd_header;
  38. uint32_t unblock_type : 1, //[0]
  39. cache_block_resource_index : 2, //[2:1]
  40. reserved_1a : 29; //[31:3]
  41. uint32_t reserved_2a : 32; //[31:0]
  42. uint32_t reserved_3a : 32; //[31:0]
  43. uint32_t reserved_4a : 32; //[31:0]
  44. uint32_t reserved_5a : 32; //[31:0]
  45. uint32_t reserved_6a : 32; //[31:0]
  46. uint32_t reserved_7a : 32; //[31:0]
  47. uint32_t reserved_8a : 32; //[31:0]
  48. };
  49. /*
  50. struct uniform_reo_cmd_header cmd_header
  51. Consumer: REO
  52. Producer: SW
  53. Details for command execution tracking purposes.
  54. unblock_type
  55. Unblock type
  56. <enum 0 unblock_resource_index> Unblock a block
  57. resource, whose index is given in field
  58. 'cache_block_resource_index'.
  59. If the indicated blocking resource is not in use (=> not
  60. blocking an address at the moment), the command status will
  61. indicate an error.
  62. <enum 1 unblock_cache> The entire cache usage is
  63. unblocked.
  64. If the entire cache is not in a blocked mode at the
  65. moment this command is received, the command status will
  66. indicate an error.
  67. Note that unlocking the entire cache has no changes to
  68. the current settings of the blocking resource settings
  69. <legal all>
  70. cache_block_resource_index
  71. Field not valid when field Unblock_type is set to
  72. unblock_cache.
  73. Indicates which of the four blocking resources in REO
  74. should be released from blocking a (descriptor) address.
  75. <legal all>
  76. reserved_1a
  77. <legal 0>
  78. reserved_2a
  79. <legal 0>
  80. reserved_3a
  81. <legal 0>
  82. reserved_4a
  83. <legal 0>
  84. reserved_5a
  85. <legal 0>
  86. reserved_6a
  87. <legal 0>
  88. reserved_7a
  89. <legal 0>
  90. reserved_8a
  91. <legal 0>
  92. */
  93. /* EXTERNAL REFERENCE : struct uniform_reo_cmd_header cmd_header */
  94. /* Description REO_UNBLOCK_CACHE_0_CMD_HEADER_REO_CMD_NUMBER
  95. Consumer: REO/SW/DEBUG
  96. Producer: SW
  97. This number can be used by SW to track, identify and
  98. link the created commands with the command statusses
  99. <legal all>
  100. */
  101. #define REO_UNBLOCK_CACHE_0_CMD_HEADER_REO_CMD_NUMBER_OFFSET 0x00000000
  102. #define REO_UNBLOCK_CACHE_0_CMD_HEADER_REO_CMD_NUMBER_LSB 0
  103. #define REO_UNBLOCK_CACHE_0_CMD_HEADER_REO_CMD_NUMBER_MASK 0x0000ffff
  104. /* Description REO_UNBLOCK_CACHE_0_CMD_HEADER_REO_STATUS_REQUIRED
  105. Consumer: REO
  106. Producer: SW
  107. <enum 0 NoStatus> REO does not need to generate a status
  108. TLV for the execution of this command
  109. <enum 1 StatusRequired> REO shall generate a status TLV
  110. for the execution of this command
  111. <legal all>
  112. */
  113. #define REO_UNBLOCK_CACHE_0_CMD_HEADER_REO_STATUS_REQUIRED_OFFSET 0x00000000
  114. #define REO_UNBLOCK_CACHE_0_CMD_HEADER_REO_STATUS_REQUIRED_LSB 16
  115. #define REO_UNBLOCK_CACHE_0_CMD_HEADER_REO_STATUS_REQUIRED_MASK 0x00010000
  116. /* Description REO_UNBLOCK_CACHE_0_CMD_HEADER_RESERVED_0A
  117. <legal 0>
  118. */
  119. #define REO_UNBLOCK_CACHE_0_CMD_HEADER_RESERVED_0A_OFFSET 0x00000000
  120. #define REO_UNBLOCK_CACHE_0_CMD_HEADER_RESERVED_0A_LSB 17
  121. #define REO_UNBLOCK_CACHE_0_CMD_HEADER_RESERVED_0A_MASK 0xfffe0000
  122. /* Description REO_UNBLOCK_CACHE_1_UNBLOCK_TYPE
  123. Unblock type
  124. <enum 0 unblock_resource_index> Unblock a block
  125. resource, whose index is given in field
  126. 'cache_block_resource_index'.
  127. If the indicated blocking resource is not in use (=> not
  128. blocking an address at the moment), the command status will
  129. indicate an error.
  130. <enum 1 unblock_cache> The entire cache usage is
  131. unblocked.
  132. If the entire cache is not in a blocked mode at the
  133. moment this command is received, the command status will
  134. indicate an error.
  135. Note that unlocking the entire cache has no changes to
  136. the current settings of the blocking resource settings
  137. <legal all>
  138. */
  139. #define REO_UNBLOCK_CACHE_1_UNBLOCK_TYPE_OFFSET 0x00000004
  140. #define REO_UNBLOCK_CACHE_1_UNBLOCK_TYPE_LSB 0
  141. #define REO_UNBLOCK_CACHE_1_UNBLOCK_TYPE_MASK 0x00000001
  142. /* Description REO_UNBLOCK_CACHE_1_CACHE_BLOCK_RESOURCE_INDEX
  143. Field not valid when field Unblock_type is set to
  144. unblock_cache.
  145. Indicates which of the four blocking resources in REO
  146. should be released from blocking a (descriptor) address.
  147. <legal all>
  148. */
  149. #define REO_UNBLOCK_CACHE_1_CACHE_BLOCK_RESOURCE_INDEX_OFFSET 0x00000004
  150. #define REO_UNBLOCK_CACHE_1_CACHE_BLOCK_RESOURCE_INDEX_LSB 1
  151. #define REO_UNBLOCK_CACHE_1_CACHE_BLOCK_RESOURCE_INDEX_MASK 0x00000006
  152. /* Description REO_UNBLOCK_CACHE_1_RESERVED_1A
  153. <legal 0>
  154. */
  155. #define REO_UNBLOCK_CACHE_1_RESERVED_1A_OFFSET 0x00000004
  156. #define REO_UNBLOCK_CACHE_1_RESERVED_1A_LSB 3
  157. #define REO_UNBLOCK_CACHE_1_RESERVED_1A_MASK 0xfffffff8
  158. /* Description REO_UNBLOCK_CACHE_2_RESERVED_2A
  159. <legal 0>
  160. */
  161. #define REO_UNBLOCK_CACHE_2_RESERVED_2A_OFFSET 0x00000008
  162. #define REO_UNBLOCK_CACHE_2_RESERVED_2A_LSB 0
  163. #define REO_UNBLOCK_CACHE_2_RESERVED_2A_MASK 0xffffffff
  164. /* Description REO_UNBLOCK_CACHE_3_RESERVED_3A
  165. <legal 0>
  166. */
  167. #define REO_UNBLOCK_CACHE_3_RESERVED_3A_OFFSET 0x0000000c
  168. #define REO_UNBLOCK_CACHE_3_RESERVED_3A_LSB 0
  169. #define REO_UNBLOCK_CACHE_3_RESERVED_3A_MASK 0xffffffff
  170. /* Description REO_UNBLOCK_CACHE_4_RESERVED_4A
  171. <legal 0>
  172. */
  173. #define REO_UNBLOCK_CACHE_4_RESERVED_4A_OFFSET 0x00000010
  174. #define REO_UNBLOCK_CACHE_4_RESERVED_4A_LSB 0
  175. #define REO_UNBLOCK_CACHE_4_RESERVED_4A_MASK 0xffffffff
  176. /* Description REO_UNBLOCK_CACHE_5_RESERVED_5A
  177. <legal 0>
  178. */
  179. #define REO_UNBLOCK_CACHE_5_RESERVED_5A_OFFSET 0x00000014
  180. #define REO_UNBLOCK_CACHE_5_RESERVED_5A_LSB 0
  181. #define REO_UNBLOCK_CACHE_5_RESERVED_5A_MASK 0xffffffff
  182. /* Description REO_UNBLOCK_CACHE_6_RESERVED_6A
  183. <legal 0>
  184. */
  185. #define REO_UNBLOCK_CACHE_6_RESERVED_6A_OFFSET 0x00000018
  186. #define REO_UNBLOCK_CACHE_6_RESERVED_6A_LSB 0
  187. #define REO_UNBLOCK_CACHE_6_RESERVED_6A_MASK 0xffffffff
  188. /* Description REO_UNBLOCK_CACHE_7_RESERVED_7A
  189. <legal 0>
  190. */
  191. #define REO_UNBLOCK_CACHE_7_RESERVED_7A_OFFSET 0x0000001c
  192. #define REO_UNBLOCK_CACHE_7_RESERVED_7A_LSB 0
  193. #define REO_UNBLOCK_CACHE_7_RESERVED_7A_MASK 0xffffffff
  194. /* Description REO_UNBLOCK_CACHE_8_RESERVED_8A
  195. <legal 0>
  196. */
  197. #define REO_UNBLOCK_CACHE_8_RESERVED_8A_OFFSET 0x00000020
  198. #define REO_UNBLOCK_CACHE_8_RESERVED_8A_LSB 0
  199. #define REO_UNBLOCK_CACHE_8_RESERVED_8A_MASK 0xffffffff
  200. #endif // _REO_UNBLOCK_CACHE_H_