uniform_reo_status_header.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. /*
  2. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. 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. #define NUM_OF_DWORDS_UNIFORM_REO_STATUS_HEADER 2
  21. struct uniform_reo_status_header {
  22. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  23. uint32_t reo_status_number : 16, // [15:0]
  24. cmd_execution_time : 10, // [25:16]
  25. reo_cmd_execution_status : 2, // [27:26]
  26. reserved_0a : 4; // [31:28]
  27. uint32_t timestamp : 32; // [31:0]
  28. #else
  29. uint32_t reserved_0a : 4, // [31:28]
  30. reo_cmd_execution_status : 2, // [27:26]
  31. cmd_execution_time : 10, // [25:16]
  32. reo_status_number : 16; // [15:0]
  33. uint32_t timestamp : 32; // [31:0]
  34. #endif
  35. };
  36. /* Description REO_STATUS_NUMBER
  37. Consumer: SW , DEBUG
  38. Producer: REO
  39. The value in this field is equal to value of the 'REO_CMD_Number'
  40. field the REO command
  41. This field helps to correlate the statuses with the REO
  42. commands.
  43. <legal all>
  44. */
  45. #define UNIFORM_REO_STATUS_HEADER_REO_STATUS_NUMBER_OFFSET 0x00000000
  46. #define UNIFORM_REO_STATUS_HEADER_REO_STATUS_NUMBER_LSB 0
  47. #define UNIFORM_REO_STATUS_HEADER_REO_STATUS_NUMBER_MSB 15
  48. #define UNIFORM_REO_STATUS_HEADER_REO_STATUS_NUMBER_MASK 0x0000ffff
  49. /* Description CMD_EXECUTION_TIME
  50. Consumer: DEBUG
  51. Producer: REO
  52. The amount of time REO took to excecute the command. Note
  53. that this time does not include the duration of the command
  54. waiting in the command ring, before the execution started.
  55. In us.
  56. <legal all>
  57. */
  58. #define UNIFORM_REO_STATUS_HEADER_CMD_EXECUTION_TIME_OFFSET 0x00000000
  59. #define UNIFORM_REO_STATUS_HEADER_CMD_EXECUTION_TIME_LSB 16
  60. #define UNIFORM_REO_STATUS_HEADER_CMD_EXECUTION_TIME_MSB 25
  61. #define UNIFORM_REO_STATUS_HEADER_CMD_EXECUTION_TIME_MASK 0x03ff0000
  62. /* Description REO_CMD_EXECUTION_STATUS
  63. Consumer: DEBUG
  64. Producer: REO
  65. Execution status of the command.
  66. <enum 0 reo_successful_execution> Command has successfully
  67. be executed
  68. <enum 1 reo_blocked_execution> Command could not be executed
  69. as the queue or cache was blocked
  70. <enum 2 reo_failed_execution> Command has encountered problems
  71. when executing, like the queue descriptor not being valid.
  72. None of the status fields in the entire STATUS TLV are valid.
  73. <enum 3 reo_resource_blocked> Command is NOT executed because
  74. one or more descriptors were blocked. This is SW programming
  75. mistake.
  76. None of the status fields in the entire STATUS TLV are valid.
  77. <legal 0-3>
  78. */
  79. #define UNIFORM_REO_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_OFFSET 0x00000000
  80. #define UNIFORM_REO_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_LSB 26
  81. #define UNIFORM_REO_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_MSB 27
  82. #define UNIFORM_REO_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_MASK 0x0c000000
  83. /* Description RESERVED_0A
  84. <legal 0>
  85. */
  86. #define UNIFORM_REO_STATUS_HEADER_RESERVED_0A_OFFSET 0x00000000
  87. #define UNIFORM_REO_STATUS_HEADER_RESERVED_0A_LSB 28
  88. #define UNIFORM_REO_STATUS_HEADER_RESERVED_0A_MSB 31
  89. #define UNIFORM_REO_STATUS_HEADER_RESERVED_0A_MASK 0xf0000000
  90. /* Description TIMESTAMP
  91. Timestamp at the moment that this status report is written.
  92. <legal all>
  93. */
  94. #define UNIFORM_REO_STATUS_HEADER_TIMESTAMP_OFFSET 0x00000004
  95. #define UNIFORM_REO_STATUS_HEADER_TIMESTAMP_LSB 0
  96. #define UNIFORM_REO_STATUS_HEADER_TIMESTAMP_MSB 31
  97. #define UNIFORM_REO_STATUS_HEADER_TIMESTAMP_MASK 0xffffffff
  98. #endif // UNIFORM_REO_STATUS_HEADER