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 19 #ifndef _UNIFORM_REO_STATUS_HEADER_H_ 20 #define _UNIFORM_REO_STATUS_HEADER_H_ 21 #if !defined(__ASSEMBLER__) 22 #endif 23 24 25 // ################ START SUMMARY ################# 26 // 27 // Dword Fields 28 // 0 reo_status_number[15:0], cmd_execution_time[25:16], reo_cmd_execution_status[27:26], reserved_0a[31:28] 29 // 1 timestamp[31:0] 30 // 31 // ################ END SUMMARY ################# 32 33 #define NUM_OF_DWORDS_UNIFORM_REO_STATUS_HEADER 2 34 35 struct uniform_reo_status_header { 36 uint32_t reo_status_number : 16, //[15:0] 37 cmd_execution_time : 10, //[25:16] 38 reo_cmd_execution_status : 2, //[27:26] 39 reserved_0a : 4; //[31:28] 40 uint32_t timestamp : 32; //[31:0] 41 }; 42 43 /* 44 45 reo_status_number 46 47 Consumer: SW , DEBUG 48 49 Producer: REO 50 51 52 53 The value in this field is equal to value of the 54 'REO_CMD_Number' field the REO command 55 56 57 58 This field helps to correlate the statuses with the REO 59 commands. 60 61 62 63 <legal all> 64 65 cmd_execution_time 66 67 Consumer: DEBUG 68 69 Producer: REO 70 71 72 73 The amount of time REO took to excecute the command. 74 Note that this time does not include the duration of the 75 command waiting in the command ring, before the execution 76 started. 77 78 79 80 In us. 81 82 83 84 <legal all> 85 86 reo_cmd_execution_status 87 88 Consumer: DEBUG 89 90 Producer: REO 91 92 93 94 Execution status of the command. 95 96 97 98 <enum 0 reo_successful_execution> Command has 99 successfully be executed 100 101 <enum 1 reo_blocked_execution> Command could not be 102 executed as the queue or cache was blocked 103 104 <enum 2 reo_failed_execution> Command has encountered 105 problems when executing, like the queue descriptor not being 106 valid. None of the status fields in the entire STATUS TLV 107 are valid. 108 109 <enum 3 reo_resource_blocked> Command is NOT executed 110 because one or more descriptors were blocked. This is SW 111 programming mistake. 112 113 None of the status fields in the entire STATUS TLV are 114 valid. 115 116 117 118 <legal 0-3> 119 120 reserved_0a 121 122 <legal 0> 123 124 timestamp 125 126 Timestamp at the moment that this status report is 127 written. 128 129 130 131 <legal all> 132 */ 133 134 135 /* Description UNIFORM_REO_STATUS_HEADER_0_REO_STATUS_NUMBER 136 137 Consumer: SW , DEBUG 138 139 Producer: REO 140 141 142 143 The value in this field is equal to value of the 144 'REO_CMD_Number' field the REO command 145 146 147 148 This field helps to correlate the statuses with the REO 149 commands. 150 151 152 153 <legal all> 154 */ 155 #define UNIFORM_REO_STATUS_HEADER_0_REO_STATUS_NUMBER_OFFSET 0x00000000 156 #define UNIFORM_REO_STATUS_HEADER_0_REO_STATUS_NUMBER_LSB 0 157 #define UNIFORM_REO_STATUS_HEADER_0_REO_STATUS_NUMBER_MASK 0x0000ffff 158 159 /* Description UNIFORM_REO_STATUS_HEADER_0_CMD_EXECUTION_TIME 160 161 Consumer: DEBUG 162 163 Producer: REO 164 165 166 167 The amount of time REO took to excecute the command. 168 Note that this time does not include the duration of the 169 command waiting in the command ring, before the execution 170 started. 171 172 173 174 In us. 175 176 177 178 <legal all> 179 */ 180 #define UNIFORM_REO_STATUS_HEADER_0_CMD_EXECUTION_TIME_OFFSET 0x00000000 181 #define UNIFORM_REO_STATUS_HEADER_0_CMD_EXECUTION_TIME_LSB 16 182 #define UNIFORM_REO_STATUS_HEADER_0_CMD_EXECUTION_TIME_MASK 0x03ff0000 183 184 /* Description UNIFORM_REO_STATUS_HEADER_0_REO_CMD_EXECUTION_STATUS 185 186 Consumer: DEBUG 187 188 Producer: REO 189 190 191 192 Execution status of the command. 193 194 195 196 <enum 0 reo_successful_execution> Command has 197 successfully be executed 198 199 <enum 1 reo_blocked_execution> Command could not be 200 executed as the queue or cache was blocked 201 202 <enum 2 reo_failed_execution> Command has encountered 203 problems when executing, like the queue descriptor not being 204 valid. None of the status fields in the entire STATUS TLV 205 are valid. 206 207 <enum 3 reo_resource_blocked> Command is NOT executed 208 because one or more descriptors were blocked. This is SW 209 programming mistake. 210 211 None of the status fields in the entire STATUS TLV are 212 valid. 213 214 215 216 <legal 0-3> 217 */ 218 #define UNIFORM_REO_STATUS_HEADER_0_REO_CMD_EXECUTION_STATUS_OFFSET 0x00000000 219 #define UNIFORM_REO_STATUS_HEADER_0_REO_CMD_EXECUTION_STATUS_LSB 26 220 #define UNIFORM_REO_STATUS_HEADER_0_REO_CMD_EXECUTION_STATUS_MASK 0x0c000000 221 222 /* Description UNIFORM_REO_STATUS_HEADER_0_RESERVED_0A 223 224 <legal 0> 225 */ 226 #define UNIFORM_REO_STATUS_HEADER_0_RESERVED_0A_OFFSET 0x00000000 227 #define UNIFORM_REO_STATUS_HEADER_0_RESERVED_0A_LSB 28 228 #define UNIFORM_REO_STATUS_HEADER_0_RESERVED_0A_MASK 0xf0000000 229 230 /* Description UNIFORM_REO_STATUS_HEADER_1_TIMESTAMP 231 232 Timestamp at the moment that this status report is 233 written. 234 235 236 237 <legal all> 238 */ 239 #define UNIFORM_REO_STATUS_HEADER_1_TIMESTAMP_OFFSET 0x00000004 240 #define UNIFORM_REO_STATUS_HEADER_1_TIMESTAMP_LSB 0 241 #define UNIFORM_REO_STATUS_HEADER_1_TIMESTAMP_MASK 0xffffffff 242 243 244 #endif // _UNIFORM_REO_STATUS_HEADER_H_ 245