1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 /* 3 * Copyright (C) 2018-2022 Intel Corporation 4 */ 5 #ifndef __iwl_fw_dbg_tlv_h__ 6 #define __iwl_fw_dbg_tlv_h__ 7 8 #include <linux/bitops.h> 9 10 #define IWL_FW_INI_MAX_REGION_ID 64 11 #define IWL_FW_INI_MAX_NAME 32 12 #define IWL_FW_INI_MAX_CFG_NAME 64 13 #define IWL_FW_INI_DOMAIN_ALWAYS_ON 0 14 #define IWL_FW_INI_REGION_ID_MASK GENMASK(15, 0) 15 #define IWL_FW_INI_REGION_DUMP_POLICY_MASK GENMASK(31, 16) 16 #define IWL_FW_INI_PRESET_DISABLE 0xff 17 18 /** 19 * struct iwl_fw_ini_hcmd 20 * 21 * @id: the debug configuration command type for instance: 0xf6 / 0xf5 / DHC 22 * @group: the desired cmd group 23 * @reserved: to align to FW struct 24 * @data: all of the relevant command data to be sent 25 */ 26 struct iwl_fw_ini_hcmd { 27 u8 id; 28 u8 group; 29 __le16 reserved; 30 u8 data[]; 31 } __packed; /* FW_DEBUG_TLV_HCMD_DATA_API_S_VER_1 */ 32 33 /** 34 * struct iwl_fw_ini_header - Common Header for all ini debug TLV's structures 35 * 36 * @version: TLV version 37 * @domain: domain of the TLV. One of &enum iwl_fw_ini_dbg_domain 38 */ 39 struct iwl_fw_ini_header { 40 __le32 version; 41 __le32 domain; 42 /* followed by the data */ 43 } __packed; /* FW_TLV_DEBUG_HEADER_S_VER_1 */ 44 45 /** 46 * struct iwl_fw_ini_region_dev_addr - Configuration to read device addresses 47 * 48 * @size: size of each memory chunk 49 * @offset: offset to add to the base address of each chunk 50 */ 51 struct iwl_fw_ini_region_dev_addr { 52 __le32 size; 53 __le32 offset; 54 } __packed; /* FW_TLV_DEBUG_DEVICE_ADDR_API_S_VER_1 */ 55 56 /** 57 * struct iwl_fw_ini_region_fifos - Configuration to read Tx/Rx fifos 58 * 59 * @fid: fifos ids array. Used to determine what fifos to collect 60 * @hdr_only: if non zero, collect only the registers 61 * @offset: offset to add to the registers addresses 62 */ 63 struct iwl_fw_ini_region_fifos { 64 __le32 fid[2]; 65 __le32 hdr_only; 66 __le32 offset; 67 } __packed; /* FW_TLV_DEBUG_REGION_FIFOS_API_S_VER_1 */ 68 69 /** 70 * struct iwl_fw_ini_region_err_table - error table region data 71 * 72 * Configuration to read Umac/Lmac error table 73 * 74 * @version: version of the error table 75 * @base_addr: base address of the error table 76 * @size: size of the error table 77 * @offset: offset to add to &base_addr 78 */ 79 struct iwl_fw_ini_region_err_table { 80 __le32 version; 81 __le32 base_addr; 82 __le32 size; 83 __le32 offset; 84 } __packed; /* FW_TLV_DEBUG_REGION_ERROR_TABLE_API_S_VER_1 */ 85 86 /** 87 * struct iwl_fw_ini_region_special_device_memory - special device memory 88 * 89 * Configuration to read a special memory 90 * 91 * @type: type of the special memory 92 * @version: version of the special memory 93 * @base_addr: base address of the error table 94 * @size: size of the error table 95 * @offset: offset to add to &base_addr 96 */ 97 struct iwl_fw_ini_region_special_device_memory { 98 __le16 type; 99 __le16 version; 100 __le32 base_addr; 101 __le32 size; 102 __le32 offset; 103 } __packed; /* FW_TLV_DEBUG_REGION_SPECIAL_DEVICE_ADDR_API_S_VER_1 */ 104 105 /** 106 * struct iwl_fw_ini_region_internal_buffer - internal buffer region data 107 * 108 * Configuration to read internal monitor buffer 109 * 110 * @alloc_id: allocation id one of &enum iwl_fw_ini_allocation_id 111 * @base_addr: internal buffer base address 112 * @size: size internal buffer size 113 */ 114 struct iwl_fw_ini_region_internal_buffer { 115 __le32 alloc_id; 116 __le32 base_addr; 117 __le32 size; 118 } __packed; /* FW_TLV_DEBUG_REGION_INTERNAL_BUFFER_API_S_VER_1 */ 119 120 /** 121 * struct iwl_fw_ini_region_tlv - region TLV 122 * 123 * Configures parameters for region data collection 124 * 125 * @hdr: debug header 126 * @id: region id. Max id is &IWL_FW_INI_MAX_REGION_ID 127 * @type: region type. One of &enum iwl_fw_ini_region_type 128 * @sub_type: region sub type 129 * @sub_type_ver: region sub type version 130 * @reserved: not in use 131 * @name: region name 132 * @dev_addr: device address configuration. Used by 133 * &IWL_FW_INI_REGION_DEVICE_MEMORY, &IWL_FW_INI_REGION_PERIPHERY_MAC, 134 * &IWL_FW_INI_REGION_PERIPHERY_PHY, &IWL_FW_INI_REGION_PERIPHERY_AUX, 135 * &IWL_FW_INI_REGION_PAGING, &IWL_FW_INI_REGION_CSR, 136 * &IWL_FW_INI_REGION_DRAM_IMR and &IWL_FW_INI_REGION_PCI_IOSF_CONFIG 137 * &IWL_FW_INI_REGION_DBGI_SRAM, &FW_TLV_DEBUG_REGION_TYPE_DBGI_SRAM, 138 * @fifos: fifos configuration. Used by &IWL_FW_INI_REGION_TXF and 139 * &IWL_FW_INI_REGION_RXF 140 * @err_table: error table configuration. Used by 141 * IWL_FW_INI_REGION_LMAC_ERROR_TABLE and 142 * IWL_FW_INI_REGION_UMAC_ERROR_TABLE 143 * @internal_buffer: internal monitor buffer configuration. Used by 144 * &IWL_FW_INI_REGION_INTERNAL_BUFFER 145 * @dram_alloc_id: dram allocation id. One of &enum iwl_fw_ini_allocation_id. 146 * Used by &IWL_FW_INI_REGION_DRAM_BUFFER 147 * @tlv_mask: tlv collection mask. Used by &IWL_FW_INI_REGION_TLV 148 * @addrs: array of addresses attached to the end of the region tlv 149 */ 150 struct iwl_fw_ini_region_tlv { 151 struct iwl_fw_ini_header hdr; 152 __le32 id; 153 u8 type; 154 u8 sub_type; 155 u8 sub_type_ver; 156 u8 reserved; 157 u8 name[IWL_FW_INI_MAX_NAME]; 158 union { 159 struct iwl_fw_ini_region_dev_addr dev_addr; 160 struct iwl_fw_ini_region_fifos fifos; 161 struct iwl_fw_ini_region_err_table err_table; 162 struct iwl_fw_ini_region_internal_buffer internal_buffer; 163 struct iwl_fw_ini_region_special_device_memory special_mem; 164 __le32 dram_alloc_id; 165 __le32 tlv_mask; 166 }; /* FW_TLV_DEBUG_REGION_CONF_PARAMS_API_U_VER_1 */ 167 __le32 addrs[]; 168 } __packed; /* FW_TLV_DEBUG_REGION_API_S_VER_1 */ 169 170 /** 171 * struct iwl_fw_ini_debug_info_tlv 172 * 173 * debug configuration name for a specific image 174 * 175 * @hdr: debug header 176 * @image_type: image type 177 * @debug_cfg_name: debug configuration name 178 */ 179 struct iwl_fw_ini_debug_info_tlv { 180 struct iwl_fw_ini_header hdr; 181 __le32 image_type; 182 u8 debug_cfg_name[IWL_FW_INI_MAX_CFG_NAME]; 183 } __packed; /* FW_TLV_DEBUG_INFO_API_S_VER_1 */ 184 185 /** 186 * struct iwl_fw_ini_allocation_tlv - Allocates DRAM buffers 187 * 188 * @hdr: debug header 189 * @alloc_id: allocation id. One of &enum iwl_fw_ini_allocation_id 190 * @buf_location: buffer location. One of &enum iwl_fw_ini_buffer_location 191 * @req_size: requested buffer size 192 * @max_frags_num: maximum number of fragments 193 * @min_size: minimum buffer size 194 */ 195 struct iwl_fw_ini_allocation_tlv { 196 struct iwl_fw_ini_header hdr; 197 __le32 alloc_id; 198 __le32 buf_location; 199 __le32 req_size; 200 __le32 max_frags_num; 201 __le32 min_size; 202 } __packed; /* FW_TLV_DEBUG_BUFFER_ALLOCATION_API_S_VER_1 */ 203 204 /** 205 * struct iwl_fw_ini_trigger_tlv - trigger TLV 206 * 207 * Trigger that upon firing, determines what regions to collect 208 * 209 * @hdr: debug header 210 * @time_point: time point. One of &enum iwl_fw_ini_time_point 211 * @trigger_reason: trigger reason 212 * @apply_policy: uses &enum iwl_fw_ini_trigger_apply_policy 213 * @dump_delay: delay from trigger fire to dump, in usec 214 * @occurrences: max trigger fire occurrences allowed 215 * @reserved: unused 216 * @ignore_consec: ignore consecutive triggers, in usec 217 * @reset_fw: if non zero, will reset and reload the FW 218 * @multi_dut: initiate debug dump data on several DUTs 219 * @regions_mask: mask of regions to collect 220 * @data: trigger data 221 */ 222 struct iwl_fw_ini_trigger_tlv { 223 struct iwl_fw_ini_header hdr; 224 __le32 time_point; 225 __le32 trigger_reason; 226 __le32 apply_policy; 227 __le32 dump_delay; 228 __le32 occurrences; 229 __le32 reserved; 230 __le32 ignore_consec; 231 __le32 reset_fw; 232 __le32 multi_dut; 233 __le64 regions_mask; 234 __le32 data[]; 235 } __packed; /* FW_TLV_DEBUG_TRIGGER_API_S_VER_1 */ 236 237 /** 238 * struct iwl_fw_ini_hcmd_tlv - Generic Host command pass through TLV 239 * 240 * @hdr: debug header 241 * @time_point: time point. One of &enum iwl_fw_ini_time_point 242 * @period_msec: interval at which the hcmd will be sent to the FW. 243 * Measured in msec (0 = one time command) 244 * @hcmd: a variable length host-command to be sent to apply the configuration 245 */ 246 struct iwl_fw_ini_hcmd_tlv { 247 struct iwl_fw_ini_header hdr; 248 __le32 time_point; 249 __le32 period_msec; 250 struct iwl_fw_ini_hcmd hcmd; 251 } __packed; /* FW_TLV_DEBUG_HCMD_API_S_VER_1 */ 252 253 /** 254 * struct iwl_fw_ini_addr_val - Address and value to set it to 255 * 256 * @address: the base address 257 * @value: value to set at address 258 */ 259 struct iwl_fw_ini_addr_val { 260 __le32 address; 261 __le32 value; 262 } __packed; /* FW_TLV_DEBUG_ADDR_VALUE_VER_1 */ 263 264 /** 265 * struct iwl_fw_ini_conf_tlv - configuration TLV to set register/memory. 266 * 267 * @hdr: debug header 268 * @time_point: time point to apply config. One of &enum iwl_fw_ini_time_point 269 * @set_type: write access type preset token for time point. 270 * one of &enum iwl_fw_ini_config_set_type 271 * @addr_offset: the offset to add to any item in address[0] field 272 * @addr_val: address value pair 273 */ 274 struct iwl_fw_ini_conf_set_tlv { 275 struct iwl_fw_ini_header hdr; 276 __le32 time_point; 277 __le32 set_type; 278 __le32 addr_offset; 279 struct iwl_fw_ini_addr_val addr_val[]; 280 } __packed; /* FW_TLV_DEBUG_CONFIG_SET_API_S_VER_1 */ 281 282 /** 283 * enum iwl_fw_ini_config_set_type 284 * 285 * @IWL_FW_INI_CONFIG_SET_TYPE_INVALID: invalid config set 286 * @IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_MAC: for PERIPHERY MAC configuration 287 * @IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_PHY: for PERIPHERY PHY configuration 288 * @IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_AUX: for PERIPHERY AUX configuration 289 * @IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_MEMORY: for DEVICE MEMORY configuration 290 * @IWL_FW_INI_CONFIG_SET_TYPE_CSR: for CSR configuration 291 * @IWL_FW_INI_CONFIG_SET_TYPE_DBGC_DRAM_ADDR: for DBGC_DRAM_ADDR configuration 292 * @IWL_FW_INI_CONFIG_SET_TYPE_PERIPH_SCRATCH_HWM: for PERIPH SCRATCH HWM configuration 293 * @IWL_FW_INI_ALLOCATION_NUM: max number of configuration supported 294 */ 295 296 enum iwl_fw_ini_config_set_type { 297 IWL_FW_INI_CONFIG_SET_TYPE_INVALID = 0, 298 IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_MAC, 299 IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_PHY, 300 IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_AUX, 301 IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_MEMORY, 302 IWL_FW_INI_CONFIG_SET_TYPE_CSR, 303 IWL_FW_INI_CONFIG_SET_TYPE_DBGC_DRAM_ADDR, 304 IWL_FW_INI_CONFIG_SET_TYPE_PERIPH_SCRATCH_HWM, 305 IWL_FW_INI_CONFIG_SET_TYPE_MAX_NUM, 306 } __packed; 307 308 /** 309 * enum iwl_fw_ini_allocation_id 310 * 311 * @IWL_FW_INI_ALLOCATION_INVALID: invalid 312 * @IWL_FW_INI_ALLOCATION_ID_DBGC1: allocation meant for DBGC1 configuration 313 * @IWL_FW_INI_ALLOCATION_ID_DBGC2: allocation meant for DBGC2 configuration 314 * @IWL_FW_INI_ALLOCATION_ID_DBGC3: allocation meant for DBGC3 configuration 315 * @IWL_FW_INI_ALLOCATION_ID_DBGC4: allocation meant for DBGC4 configuration 316 * @IWL_FW_INI_ALLOCATION_NUM: number of allocation ids 317 */ 318 enum iwl_fw_ini_allocation_id { 319 IWL_FW_INI_ALLOCATION_INVALID, 320 IWL_FW_INI_ALLOCATION_ID_DBGC1, 321 IWL_FW_INI_ALLOCATION_ID_DBGC2, 322 IWL_FW_INI_ALLOCATION_ID_DBGC3, 323 IWL_FW_INI_ALLOCATION_ID_DBGC4, 324 IWL_FW_INI_ALLOCATION_NUM, 325 }; /* FW_DEBUG_TLV_ALLOCATION_ID_E_VER_1 */ 326 327 /** 328 * enum iwl_fw_ini_buffer_location 329 * 330 * @IWL_FW_INI_LOCATION_INVALID: invalid 331 * @IWL_FW_INI_LOCATION_SRAM_PATH: SRAM location 332 * @IWL_FW_INI_LOCATION_DRAM_PATH: DRAM location 333 * @IWL_FW_INI_LOCATION_NPK_PATH: NPK location 334 */ 335 enum iwl_fw_ini_buffer_location { 336 IWL_FW_INI_LOCATION_INVALID, 337 IWL_FW_INI_LOCATION_SRAM_PATH, 338 IWL_FW_INI_LOCATION_DRAM_PATH, 339 IWL_FW_INI_LOCATION_NPK_PATH, 340 IWL_FW_INI_LOCATION_NUM, 341 }; /* FW_DEBUG_TLV_BUFFER_LOCATION_E_VER_1 */ 342 343 /** 344 * enum iwl_fw_ini_region_type 345 * 346 * @IWL_FW_INI_REGION_INVALID: invalid 347 * @IWL_FW_INI_REGION_TLV: uCode and debug TLVs 348 * @IWL_FW_INI_REGION_INTERNAL_BUFFER: monitor SMEM buffer 349 * @IWL_FW_INI_REGION_DRAM_BUFFER: monitor DRAM buffer 350 * @IWL_FW_INI_REGION_TXF: TX fifos 351 * @IWL_FW_INI_REGION_RXF: RX fifo 352 * @IWL_FW_INI_REGION_LMAC_ERROR_TABLE: lmac error table 353 * @IWL_FW_INI_REGION_UMAC_ERROR_TABLE: umac error table 354 * @IWL_FW_INI_REGION_RSP_OR_NOTIF: FW response or notification data 355 * @IWL_FW_INI_REGION_DEVICE_MEMORY: device internal memory 356 * @IWL_FW_INI_REGION_PERIPHERY_MAC: periphery registers of MAC 357 * @IWL_FW_INI_REGION_PERIPHERY_PHY: periphery registers of PHY 358 * @IWL_FW_INI_REGION_PERIPHERY_AUX: periphery registers of AUX 359 * @IWL_FW_INI_REGION_PAGING: paging memory 360 * @IWL_FW_INI_REGION_CSR: CSR registers 361 * @IWL_FW_INI_REGION_DRAM_IMR: IMR memory 362 * @IWL_FW_INI_REGION_PCI_IOSF_CONFIG: PCI/IOSF config 363 * @IWL_FW_INI_REGION_SPECIAL_DEVICE_MEMORY: special device memory 364 * @IWL_FW_INI_REGION_DBGI_SRAM: periphery registers of DBGI SRAM 365 * @IWL_FW_INI_REGION_NUM: number of region types 366 */ 367 enum iwl_fw_ini_region_type { 368 IWL_FW_INI_REGION_INVALID, 369 IWL_FW_INI_REGION_TLV, 370 IWL_FW_INI_REGION_INTERNAL_BUFFER, 371 IWL_FW_INI_REGION_DRAM_BUFFER, 372 IWL_FW_INI_REGION_TXF, 373 IWL_FW_INI_REGION_RXF, 374 IWL_FW_INI_REGION_LMAC_ERROR_TABLE, 375 IWL_FW_INI_REGION_UMAC_ERROR_TABLE, 376 IWL_FW_INI_REGION_RSP_OR_NOTIF, 377 IWL_FW_INI_REGION_DEVICE_MEMORY, 378 IWL_FW_INI_REGION_PERIPHERY_MAC, 379 IWL_FW_INI_REGION_PERIPHERY_PHY, 380 IWL_FW_INI_REGION_PERIPHERY_AUX, 381 IWL_FW_INI_REGION_PAGING, 382 IWL_FW_INI_REGION_CSR, 383 IWL_FW_INI_REGION_DRAM_IMR, 384 IWL_FW_INI_REGION_PCI_IOSF_CONFIG, 385 IWL_FW_INI_REGION_SPECIAL_DEVICE_MEMORY, 386 IWL_FW_INI_REGION_DBGI_SRAM, 387 IWL_FW_INI_REGION_NUM 388 }; /* FW_TLV_DEBUG_REGION_TYPE_API_E */ 389 390 enum iwl_fw_ini_region_device_memory_subtype { 391 IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_HW_SMEM = 1, 392 IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_UMAC_ERROR_TABLE = 5, 393 IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_LMAC_1_ERROR_TABLE = 7, 394 IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_LMAC_2_ERROR_TABLE = 10, 395 IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_TCM_1_ERROR_TABLE = 14, 396 IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_TCM_2_ERROR_TABLE = 16, 397 IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_RCM_1_ERROR_TABLE = 18, 398 IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_RCM_2_ERROR_TABLE = 20, 399 }; /* FW_TLV_DEBUG_REGION_DEVICE_MEMORY_SUBTYPE_API_E */ 400 401 /** 402 * enum iwl_fw_ini_time_point 403 * 404 * Hard coded time points in which the driver can send hcmd or perform dump 405 * collection 406 * 407 * @IWL_FW_INI_TIME_POINT_EARLY: pre loading the FW 408 * @IWL_FW_INI_TIME_POINT_AFTER_ALIVE: first cmd from host after alive notif 409 * @IWL_FW_INI_TIME_POINT_POST_INIT: last cmd in series of init sequence 410 * @IWL_FW_INI_TIME_POINT_FW_ASSERT: FW assert 411 * @IWL_FW_INI_TIME_POINT_FW_HW_ERROR: FW HW error 412 * @IWL_FW_INI_TIME_POINT_FW_TFD_Q_HANG: TFD queue hang 413 * @IWL_FW_INI_TIME_POINT_FW_DHC_NOTIFICATION: DHC cmd response and notif 414 * @IWL_FW_INI_TIME_POINT_FW_RSP_OR_NOTIF: FW response or notification. 415 * data field holds id and group 416 * @IWL_FW_INI_TIME_POINT_USER_TRIGGER: user trigger time point 417 * @IWL_FW_INI_TIME_POINT_PERIODIC: periodic timepoint that fires in constant 418 * intervals. data field holds the interval time in msec 419 * @IWL_FW_INI_TIME_POINT_RESERVED: reserved 420 * @IWL_FW_INI_TIME_POINT_HOST_ASSERT: Unused 421 * @IWL_FW_INI_TIME_POINT_HOST_ALIVE_TIMEOUT: alive timeout 422 * @IWL_FW_INI_TIME_POINT_HOST_DEVICE_ENABLE: device enable 423 * @IWL_FW_INI_TIME_POINT_HOST_DEVICE_DISABLE: device disable 424 * @IWL_FW_INI_TIME_POINT_HOST_D3_START: D3 start 425 * @IWL_FW_INI_TIME_POINT_HOST_D3_END: D3 end 426 * @IWL_FW_INI_TIME_POINT_MISSED_BEACONS: missed beacons 427 * @IWL_FW_INI_TIME_POINT_ASSOC_FAILED: association failure 428 * @IWL_FW_INI_TIME_POINT_TX_FAILED: Tx frame failed 429 * @IWL_FW_INI_TIME_POINT_TX_WFD_ACTION_FRAME_FAILED: wifi direct action 430 * frame failed 431 * @IWL_FW_INI_TIME_POINT_TX_LATENCY_THRESHOLD: Tx latency threshold 432 * @IWL_FW_INI_TIME_POINT_HANG_OCCURRED: hang occurred 433 * @IWL_FW_INI_TIME_POINT_EAPOL_FAILED: EAPOL failed 434 * @IWL_FW_INI_TIME_POINT_FAKE_TX: fake Tx 435 * @IWL_FW_INI_TIME_POINT_DEASSOC: de association 436 * @IWL_FW_INI_TIME_POINT_NUM: number of time points 437 */ 438 enum iwl_fw_ini_time_point { 439 IWL_FW_INI_TIME_POINT_INVALID, 440 IWL_FW_INI_TIME_POINT_EARLY, 441 IWL_FW_INI_TIME_POINT_AFTER_ALIVE, 442 IWL_FW_INI_TIME_POINT_POST_INIT, 443 IWL_FW_INI_TIME_POINT_FW_ASSERT, 444 IWL_FW_INI_TIME_POINT_FW_HW_ERROR, 445 IWL_FW_INI_TIME_POINT_FW_TFD_Q_HANG, 446 IWL_FW_INI_TIME_POINT_FW_DHC_NOTIFICATION, 447 IWL_FW_INI_TIME_POINT_FW_RSP_OR_NOTIF, 448 IWL_FW_INI_TIME_POINT_USER_TRIGGER, 449 IWL_FW_INI_TIME_POINT_PERIODIC, 450 IWL_FW_INI_TIME_POINT_RESERVED, 451 IWL_FW_INI_TIME_POINT_HOST_ASSERT, 452 IWL_FW_INI_TIME_POINT_HOST_ALIVE_TIMEOUT, 453 IWL_FW_INI_TIME_POINT_HOST_DEVICE_ENABLE, 454 IWL_FW_INI_TIME_POINT_HOST_DEVICE_DISABLE, 455 IWL_FW_INI_TIME_POINT_HOST_D3_START, 456 IWL_FW_INI_TIME_POINT_HOST_D3_END, 457 IWL_FW_INI_TIME_POINT_MISSED_BEACONS, 458 IWL_FW_INI_TIME_POINT_ASSOC_FAILED, 459 IWL_FW_INI_TIME_POINT_TX_FAILED, 460 IWL_FW_INI_TIME_POINT_TX_WFD_ACTION_FRAME_FAILED, 461 IWL_FW_INI_TIME_POINT_TX_LATENCY_THRESHOLD, 462 IWL_FW_INI_TIME_POINT_HANG_OCCURRED, 463 IWL_FW_INI_TIME_POINT_EAPOL_FAILED, 464 IWL_FW_INI_TIME_POINT_FAKE_TX, 465 IWL_FW_INI_TIME_POINT_DEASSOC, 466 IWL_FW_INI_TIME_POINT_NUM, 467 }; /* FW_TLV_DEBUG_TIME_POINT_API_E */ 468 469 /** 470 * enum iwl_fw_ini_trigger_apply_policy - Determines how to apply triggers 471 * 472 * @IWL_FW_INI_APPLY_POLICY_MATCH_TIME_POINT: match by time point 473 * @IWL_FW_INI_APPLY_POLICY_MATCH_DATA: match by trigger data 474 * @IWL_FW_INI_APPLY_POLICY_OVERRIDE_REGIONS: override regions mask. 475 * Append otherwise 476 * @IWL_FW_INI_APPLY_POLICY_OVERRIDE_CFG: override trigger configuration 477 * @IWL_FW_INI_APPLY_POLICY_OVERRIDE_DATA: override trigger data. 478 * Append otherwise 479 * @IWL_FW_INI_APPLY_POLICY_DUMP_COMPLETE_CMD: send cmd once dump collected 480 */ 481 enum iwl_fw_ini_trigger_apply_policy { 482 IWL_FW_INI_APPLY_POLICY_MATCH_TIME_POINT = BIT(0), 483 IWL_FW_INI_APPLY_POLICY_MATCH_DATA = BIT(1), 484 IWL_FW_INI_APPLY_POLICY_OVERRIDE_REGIONS = BIT(8), 485 IWL_FW_INI_APPLY_POLICY_OVERRIDE_CFG = BIT(9), 486 IWL_FW_INI_APPLY_POLICY_OVERRIDE_DATA = BIT(10), 487 IWL_FW_INI_APPLY_POLICY_DUMP_COMPLETE_CMD = BIT(16), 488 }; 489 490 /** 491 * enum iwl_fw_ini_trigger_reset_fw_policy - Determines how to handle reset 492 * 493 * @IWL_FW_INI_RESET_FW_MODE_NOTHING: do not stop FW and reload (default) 494 * @IWL_FW_INI_RESET_FW_MODE_STOP_FW_ONLY: stop FW without reload FW 495 * @IWL_FW_INI_RESET_FW_MODE_STOP_AND_RELOAD_FW: stop FW with reload FW 496 */ 497 enum iwl_fw_ini_trigger_reset_fw_policy { 498 IWL_FW_INI_RESET_FW_MODE_NOTHING = 0, 499 IWL_FW_INI_RESET_FW_MODE_STOP_FW_ONLY, 500 IWL_FW_INI_RESET_FW_MODE_STOP_AND_RELOAD_FW 501 }; 502 503 /** 504 * enum iwl_fw_ini_dump_policy - Determines how to handle dump based on enabled flags 505 * 506 * @IWL_FW_INI_DEBUG_DUMP_POLICY_NO_LIMIT: OS has no limit of dump size 507 * @IWL_FW_INI_DEBUG_DUMP_POLICY_MAX_LIMIT_600KB: mini dump only 600KB region dump 508 * @IWL_FW_IWL_DEBUG_DUMP_POLICY_MAX_LIMIT_5MB: mini dump 5MB size dump 509 */ 510 enum iwl_fw_ini_dump_policy { 511 IWL_FW_INI_DEBUG_DUMP_POLICY_NO_LIMIT = BIT(0), 512 IWL_FW_INI_DEBUG_DUMP_POLICY_MAX_LIMIT_600KB = BIT(1), 513 IWL_FW_IWL_DEBUG_DUMP_POLICY_MAX_LIMIT_5MB = BIT(2), 514 515 }; 516 517 /** 518 * enum iwl_fw_ini_dump_type - Determines dump type based on size defined by FW. 519 * 520 * @IWL_FW_INI_DUMP_BRIEF : only dump the most important regions 521 * @IWL_FW_INI_DEBUG_MEDIUM: dump more regions than "brief", but not all regions 522 * @IWL_FW_INI_DUMP_VERBOSE : dump all regions 523 */ 524 enum iwl_fw_ini_dump_type { 525 IWL_FW_INI_DUMP_BRIEF, 526 IWL_FW_INI_DUMP_MEDIUM, 527 IWL_FW_INI_DUMP_VERBOSE, 528 }; 529 #endif 530