uniform_reo_status_header.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. /* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
  2. *
  3. * Permission to use, copy, modify, and/or distribute this software for any
  4. * purpose with or without fee is hereby granted, provided that the above
  5. * copyright notice and this permission notice appear in all copies.
  6. *
  7. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  8. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  9. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  10. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  11. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  12. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  13. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  14. */
  15. #ifndef _UNIFORM_REO_STATUS_HEADER_H_
  16. #define _UNIFORM_REO_STATUS_HEADER_H_
  17. #if !defined(__ASSEMBLER__)
  18. #endif
  19. #define NUM_OF_DWORDS_UNIFORM_REO_STATUS_HEADER 2
  20. struct uniform_reo_status_header {
  21. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  22. uint32_t reo_status_number : 16, // [15:0]
  23. cmd_execution_time : 10, // [25:16]
  24. reo_cmd_execution_status : 2, // [27:26]
  25. reserved_0a : 4; // [31:28]
  26. uint32_t timestamp : 32; // [31:0]
  27. #else
  28. uint32_t reserved_0a : 4, // [31:28]
  29. reo_cmd_execution_status : 2, // [27:26]
  30. cmd_execution_time : 10, // [25:16]
  31. reo_status_number : 16; // [15:0]
  32. uint32_t timestamp : 32; // [31:0]
  33. #endif
  34. };
  35. /* Description REO_STATUS_NUMBER
  36. Consumer: SW , DEBUG
  37. Producer: REO
  38. The value in this field is equal to value of the 'REO_CMD_Number'
  39. field the REO command
  40. This field helps to correlate the statuses with the REO
  41. commands.
  42. <legal all>
  43. */
  44. #define UNIFORM_REO_STATUS_HEADER_REO_STATUS_NUMBER_OFFSET 0x00000000
  45. #define UNIFORM_REO_STATUS_HEADER_REO_STATUS_NUMBER_LSB 0
  46. #define UNIFORM_REO_STATUS_HEADER_REO_STATUS_NUMBER_MSB 15
  47. #define UNIFORM_REO_STATUS_HEADER_REO_STATUS_NUMBER_MASK 0x0000ffff
  48. /* Description CMD_EXECUTION_TIME
  49. Consumer: DEBUG
  50. Producer: REO
  51. The amount of time REO took to excecute the command. Note
  52. that this time does not include the duration of the command
  53. waiting in the command ring, before the execution started.
  54. In us.
  55. <legal all>
  56. */
  57. #define UNIFORM_REO_STATUS_HEADER_CMD_EXECUTION_TIME_OFFSET 0x00000000
  58. #define UNIFORM_REO_STATUS_HEADER_CMD_EXECUTION_TIME_LSB 16
  59. #define UNIFORM_REO_STATUS_HEADER_CMD_EXECUTION_TIME_MSB 25
  60. #define UNIFORM_REO_STATUS_HEADER_CMD_EXECUTION_TIME_MASK 0x03ff0000
  61. /* Description REO_CMD_EXECUTION_STATUS
  62. Consumer: DEBUG
  63. Producer: REO
  64. Execution status of the command.
  65. <enum 0 reo_successful_execution> Command has successfully
  66. be executed
  67. <enum 1 reo_blocked_execution> Command could not be executed
  68. as the queue or cache was blocked
  69. <enum 2 reo_failed_execution> Command has encountered problems
  70. when executing, like the queue descriptor not being valid.
  71. None of the status fields in the entire STATUS TLV are valid.
  72. <enum 3 reo_resource_blocked> Command is NOT executed because
  73. one or more descriptors were blocked. This is SW programming
  74. mistake.
  75. None of the status fields in the entire STATUS TLV are valid.
  76. <legal 0-3>
  77. */
  78. #define UNIFORM_REO_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_OFFSET 0x00000000
  79. #define UNIFORM_REO_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_LSB 26
  80. #define UNIFORM_REO_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_MSB 27
  81. #define UNIFORM_REO_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_MASK 0x0c000000
  82. /* Description RESERVED_0A
  83. <legal 0>
  84. */
  85. #define UNIFORM_REO_STATUS_HEADER_RESERVED_0A_OFFSET 0x00000000
  86. #define UNIFORM_REO_STATUS_HEADER_RESERVED_0A_LSB 28
  87. #define UNIFORM_REO_STATUS_HEADER_RESERVED_0A_MSB 31
  88. #define UNIFORM_REO_STATUS_HEADER_RESERVED_0A_MASK 0xf0000000
  89. /* Description TIMESTAMP
  90. Timestamp at the moment that this status report is written.
  91. <legal all>
  92. */
  93. #define UNIFORM_REO_STATUS_HEADER_TIMESTAMP_OFFSET 0x00000004
  94. #define UNIFORM_REO_STATUS_HEADER_TIMESTAMP_LSB 0
  95. #define UNIFORM_REO_STATUS_HEADER_TIMESTAMP_MSB 31
  96. #define UNIFORM_REO_STATUS_HEADER_TIMESTAMP_MASK 0xffffffff
  97. #endif // UNIFORM_REO_STATUS_HEADER