uniform_reo_status_header.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. /*
  2. * Copyright (c) 2019, 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 _UNIFORM_REO_STATUS_HEADER_H_
  17. #define _UNIFORM_REO_STATUS_HEADER_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. // ################ START SUMMARY #################
  21. //
  22. // Dword Fields
  23. // 0 reo_status_number[15:0], cmd_execution_time[25:16], reo_cmd_execution_status[27:26], reserved_0a[31:28]
  24. // 1 timestamp[31:0]
  25. //
  26. // ################ END SUMMARY #################
  27. #define NUM_OF_DWORDS_UNIFORM_REO_STATUS_HEADER 2
  28. struct uniform_reo_status_header {
  29. uint32_t reo_status_number : 16, //[15:0]
  30. cmd_execution_time : 10, //[25:16]
  31. reo_cmd_execution_status : 2, //[27:26]
  32. reserved_0a : 4; //[31:28]
  33. uint32_t timestamp : 32; //[31:0]
  34. };
  35. /*
  36. reo_status_number
  37. Consumer: SW , DEBUG
  38. Producer: REO
  39. The value in this field is equal to value of the
  40. 'REO_CMD_Number' field the REO command
  41. This field helps to correlate the statuses with the REO
  42. commands.
  43. <legal all>
  44. cmd_execution_time
  45. Consumer: DEBUG
  46. Producer: REO
  47. The amount of time REO took to excecute the command.
  48. Note that this time does not include the duration of the
  49. command waiting in the command ring, before the execution
  50. started.
  51. In us.
  52. <legal all>
  53. reo_cmd_execution_status
  54. Consumer: DEBUG
  55. Producer: REO
  56. Execution status of the command.
  57. <enum 0 reo_successful_execution> Command has
  58. successfully be executed
  59. <enum 1 reo_blocked_execution> Command could not be
  60. executed as the queue or cache was blocked
  61. <enum 2 reo_failed_execution> Command has encountered
  62. problems when executing, like the queue descriptor not being
  63. valid. None of the status fields in the entire STATUS TLV
  64. are valid.
  65. <enum 3 reo_resource_blocked> Command is NOT executed
  66. because one or more descriptors were blocked. This is SW
  67. programming mistake.
  68. None of the status fields in the entire STATUS TLV are
  69. valid.
  70. <legal 0-3>
  71. reserved_0a
  72. <legal 0>
  73. timestamp
  74. Timestamp at the moment that this status report is
  75. written.
  76. <legal all>
  77. */
  78. /* Description UNIFORM_REO_STATUS_HEADER_0_REO_STATUS_NUMBER
  79. Consumer: SW , DEBUG
  80. Producer: REO
  81. The value in this field is equal to value of the
  82. 'REO_CMD_Number' field the REO command
  83. This field helps to correlate the statuses with the REO
  84. commands.
  85. <legal all>
  86. */
  87. #define UNIFORM_REO_STATUS_HEADER_0_REO_STATUS_NUMBER_OFFSET 0x00000000
  88. #define UNIFORM_REO_STATUS_HEADER_0_REO_STATUS_NUMBER_LSB 0
  89. #define UNIFORM_REO_STATUS_HEADER_0_REO_STATUS_NUMBER_MASK 0x0000ffff
  90. /* Description UNIFORM_REO_STATUS_HEADER_0_CMD_EXECUTION_TIME
  91. Consumer: DEBUG
  92. Producer: REO
  93. The amount of time REO took to excecute the command.
  94. Note that this time does not include the duration of the
  95. command waiting in the command ring, before the execution
  96. started.
  97. In us.
  98. <legal all>
  99. */
  100. #define UNIFORM_REO_STATUS_HEADER_0_CMD_EXECUTION_TIME_OFFSET 0x00000000
  101. #define UNIFORM_REO_STATUS_HEADER_0_CMD_EXECUTION_TIME_LSB 16
  102. #define UNIFORM_REO_STATUS_HEADER_0_CMD_EXECUTION_TIME_MASK 0x03ff0000
  103. /* Description UNIFORM_REO_STATUS_HEADER_0_REO_CMD_EXECUTION_STATUS
  104. Consumer: DEBUG
  105. Producer: REO
  106. Execution status of the command.
  107. <enum 0 reo_successful_execution> Command has
  108. successfully be executed
  109. <enum 1 reo_blocked_execution> Command could not be
  110. executed as the queue or cache was blocked
  111. <enum 2 reo_failed_execution> Command has encountered
  112. problems when executing, like the queue descriptor not being
  113. valid. None of the status fields in the entire STATUS TLV
  114. are valid.
  115. <enum 3 reo_resource_blocked> Command is NOT executed
  116. because one or more descriptors were blocked. This is SW
  117. programming mistake.
  118. None of the status fields in the entire STATUS TLV are
  119. valid.
  120. <legal 0-3>
  121. */
  122. #define UNIFORM_REO_STATUS_HEADER_0_REO_CMD_EXECUTION_STATUS_OFFSET 0x00000000
  123. #define UNIFORM_REO_STATUS_HEADER_0_REO_CMD_EXECUTION_STATUS_LSB 26
  124. #define UNIFORM_REO_STATUS_HEADER_0_REO_CMD_EXECUTION_STATUS_MASK 0x0c000000
  125. /* Description UNIFORM_REO_STATUS_HEADER_0_RESERVED_0A
  126. <legal 0>
  127. */
  128. #define UNIFORM_REO_STATUS_HEADER_0_RESERVED_0A_OFFSET 0x00000000
  129. #define UNIFORM_REO_STATUS_HEADER_0_RESERVED_0A_LSB 28
  130. #define UNIFORM_REO_STATUS_HEADER_0_RESERVED_0A_MASK 0xf0000000
  131. /* Description UNIFORM_REO_STATUS_HEADER_1_TIMESTAMP
  132. Timestamp at the moment that this status report is
  133. written.
  134. <legal all>
  135. */
  136. #define UNIFORM_REO_STATUS_HEADER_1_TIMESTAMP_OFFSET 0x00000004
  137. #define UNIFORM_REO_STATUS_HEADER_1_TIMESTAMP_LSB 0
  138. #define UNIFORM_REO_STATUS_HEADER_1_TIMESTAMP_MASK 0xffffffff
  139. #endif // _UNIFORM_REO_STATUS_HEADER_H_