580 lines · c
1/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */2/*3 * Copyright (C) 2018-2024 Intel Corporation4 */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 6411#define IWL_FW_INI_MAX_NAME 3212#define IWL_FW_INI_MAX_CFG_NAME 6413#define IWL_FW_INI_DOMAIN_ALWAYS_ON 014#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 0xff17 18/**19 * struct iwl_fw_ini_hcmd20 *21 * @id: the debug configuration command type for instance: 0xf6 / 0xf5 / DHC22 * @group: the desired cmd group23 * @reserved: to align to FW struct24 * @data: all of the relevant command data to be sent25 */26struct 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 structures35 *36 * @version: TLV version37 * @domain: domain of the TLV. One of &enum iwl_fw_ini_dbg_domain38 */39struct 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_addr_size - Base address and size that defines47 * a chunk of memory48 *49 * @addr: the base address (fixed size - 4 bytes)50 * @size: the size to read51 */52struct iwl_fw_ini_addr_size {53 __le32 addr;54 __le32 size;55} __packed; /* FW_TLV_DEBUG_ADDR_SIZE_VER_1 */56 57/**58 * struct iwl_fw_ini_region_dev_addr_range - Configuration to read59 * device address range60 *61 * @offset: offset to add to the base address of each chunk62 * The addrs[] array will be treated as an array of &iwl_fw_ini_addr_size -63 * an array of (addr, size) pairs.64 */65struct iwl_fw_ini_region_dev_addr_range {66 __le32 offset;67} __packed; /* FW_TLV_DEBUG_DEVICE_ADDR_RANGE_API_S_VER_1 */68 69/**70 * struct iwl_fw_ini_region_dev_addr - Configuration to read device addresses71 *72 * @size: size of each memory chunk73 * @offset: offset to add to the base address of each chunk74 */75struct iwl_fw_ini_region_dev_addr {76 __le32 size;77 __le32 offset;78} __packed; /* FW_TLV_DEBUG_DEVICE_ADDR_API_S_VER_1 */79 80/**81 * struct iwl_fw_ini_region_fifos - Configuration to read Tx/Rx fifos82 *83 * @fid: fifos ids array. Used to determine what fifos to collect84 * @hdr_only: if non zero, collect only the registers85 * @offset: offset to add to the registers addresses86 */87struct iwl_fw_ini_region_fifos {88 __le32 fid[2];89 __le32 hdr_only;90 __le32 offset;91} __packed; /* FW_TLV_DEBUG_REGION_FIFOS_API_S_VER_1 */92 93/**94 * struct iwl_fw_ini_region_err_table - error table region data95 *96 * Configuration to read Umac/Lmac error table97 *98 * @version: version of the error table99 * @base_addr: base address of the error table100 * @size: size of the error table101 * @offset: offset to add to &base_addr102 */103struct iwl_fw_ini_region_err_table {104 __le32 version;105 __le32 base_addr;106 __le32 size;107 __le32 offset;108} __packed; /* FW_TLV_DEBUG_REGION_ERROR_TABLE_API_S_VER_1 */109 110/**111 * struct iwl_fw_ini_region_special_device_memory - special device memory112 *113 * Configuration to read a special memory114 *115 * @type: type of the special memory116 * @version: version of the special memory117 * @base_addr: base address of the error table118 * @size: size of the error table119 * @offset: offset to add to &base_addr120 */121struct iwl_fw_ini_region_special_device_memory {122 __le16 type;123 __le16 version;124 __le32 base_addr;125 __le32 size;126 __le32 offset;127} __packed; /* FW_TLV_DEBUG_REGION_SPECIAL_DEVICE_ADDR_API_S_VER_1 */128 129/**130 * struct iwl_fw_ini_region_internal_buffer - internal buffer region data131 *132 * Configuration to read internal monitor buffer133 *134 * @alloc_id: allocation id one of &enum iwl_fw_ini_allocation_id135 * @base_addr: internal buffer base address136 * @size: size internal buffer size137 */138struct iwl_fw_ini_region_internal_buffer {139 __le32 alloc_id;140 __le32 base_addr;141 __le32 size;142} __packed; /* FW_TLV_DEBUG_REGION_INTERNAL_BUFFER_API_S_VER_1 */143 144/**145 * struct iwl_fw_ini_region_tlv - region TLV146 *147 * Configures parameters for region data collection148 *149 * @hdr: debug header150 * @id: region id. Max id is %IWL_FW_INI_MAX_REGION_ID151 * @type: region type. One of &enum iwl_fw_ini_region_type152 * @sub_type: region sub type153 * @sub_type_ver: region sub type version154 * @reserved: not in use155 * @name: region name156 * @dev_addr: device address configuration. Used by157 * %IWL_FW_INI_REGION_DEVICE_MEMORY, %IWL_FW_INI_REGION_PERIPHERY_MAC,158 * %IWL_FW_INI_REGION_PERIPHERY_PHY, %IWL_FW_INI_REGION_PERIPHERY_AUX,159 * %IWL_FW_INI_REGION_PAGING, %IWL_FW_INI_REGION_CSR,160 * %IWL_FW_INI_REGION_DRAM_IMR and %IWL_FW_INI_REGION_PCI_IOSF_CONFIG161 * %IWL_FW_INI_REGION_DBGI_SRAM, %FW_TLV_DEBUG_REGION_TYPE_DBGI_SRAM,162 * %IWL_FW_INI_REGION_PERIPHERY_SNPS_DPHYIP,163 * @dev_addr_range: device address range configuration. Used by164 * %IWL_FW_INI_REGION_PERIPHERY_MAC_RANGE and165 * %IWL_FW_INI_REGION_PERIPHERY_PHY_RANGE166 * @fifos: fifos configuration. Used by %IWL_FW_INI_REGION_TXF and167 * %IWL_FW_INI_REGION_RXF168 * @err_table: error table configuration. Used by169 * %IWL_FW_INI_REGION_LMAC_ERROR_TABLE and170 * %IWL_FW_INI_REGION_UMAC_ERROR_TABLE171 * @internal_buffer: internal monitor buffer configuration. Used by172 * %IWL_FW_INI_REGION_INTERNAL_BUFFER173 * @special_mem: special device memory region, used by174 * %IWL_FW_INI_REGION_SPECIAL_DEVICE_MEMORY175 * @dram_alloc_id: dram allocation id. One of &enum iwl_fw_ini_allocation_id.176 * Used by %IWL_FW_INI_REGION_DRAM_BUFFER177 * @tlv_mask: tlv collection mask. Used by %IWL_FW_INI_REGION_TLV178 * @addrs: array of addresses attached to the end of the region tlv179 */180struct iwl_fw_ini_region_tlv {181 struct iwl_fw_ini_header hdr;182 __le32 id;183 u8 type;184 u8 sub_type;185 u8 sub_type_ver;186 u8 reserved;187 u8 name[IWL_FW_INI_MAX_NAME];188 union {189 struct iwl_fw_ini_region_dev_addr dev_addr;190 struct iwl_fw_ini_region_dev_addr_range dev_addr_range;191 struct iwl_fw_ini_region_fifos fifos;192 struct iwl_fw_ini_region_err_table err_table;193 struct iwl_fw_ini_region_internal_buffer internal_buffer;194 struct iwl_fw_ini_region_special_device_memory special_mem;195 __le32 dram_alloc_id;196 __le32 tlv_mask;197 }; /* FW_TLV_DEBUG_REGION_CONF_PARAMS_API_U_VER_1 */198 __le32 addrs[];199} __packed; /* FW_TLV_DEBUG_REGION_API_S_VER_1 */200 201/**202 * struct iwl_fw_ini_debug_info_tlv203 *204 * debug configuration name for a specific image205 *206 * @hdr: debug header207 * @image_type: image type208 * @debug_cfg_name: debug configuration name209 */210struct iwl_fw_ini_debug_info_tlv {211 struct iwl_fw_ini_header hdr;212 __le32 image_type;213 u8 debug_cfg_name[IWL_FW_INI_MAX_CFG_NAME];214} __packed; /* FW_TLV_DEBUG_INFO_API_S_VER_1 */215 216/**217 * struct iwl_fw_ini_allocation_tlv - Allocates DRAM buffers218 *219 * @hdr: debug header220 * @alloc_id: allocation id. One of &enum iwl_fw_ini_allocation_id221 * @buf_location: buffer location. One of &enum iwl_fw_ini_buffer_location222 * @req_size: requested buffer size223 * @max_frags_num: maximum number of fragments224 * @min_size: minimum buffer size225 */226struct iwl_fw_ini_allocation_tlv {227 struct iwl_fw_ini_header hdr;228 __le32 alloc_id;229 __le32 buf_location;230 __le32 req_size;231 __le32 max_frags_num;232 __le32 min_size;233} __packed; /* FW_TLV_DEBUG_BUFFER_ALLOCATION_API_S_VER_1 */234 235/**236 * struct iwl_fw_ini_trigger_tlv - trigger TLV237 *238 * Trigger that upon firing, determines what regions to collect239 *240 * @hdr: debug header241 * @time_point: time point. One of &enum iwl_fw_ini_time_point242 * @trigger_reason: trigger reason243 * @apply_policy: uses &enum iwl_fw_ini_trigger_apply_policy244 * @dump_delay: delay from trigger fire to dump, in usec245 * @occurrences: max trigger fire occurrences allowed246 * @reserved: unused247 * @ignore_consec: ignore consecutive triggers, in usec248 * @reset_fw: if non zero, will reset and reload the FW249 * @multi_dut: initiate debug dump data on several DUTs250 * @regions_mask: mask of regions to collect251 * @data: trigger data252 */253struct iwl_fw_ini_trigger_tlv {254 struct iwl_fw_ini_header hdr;255 __le32 time_point;256 __le32 trigger_reason;257 __le32 apply_policy;258 __le32 dump_delay;259 __le32 occurrences;260 __le32 reserved;261 __le32 ignore_consec;262 __le32 reset_fw;263 __le32 multi_dut;264 __le64 regions_mask;265 __le32 data[];266} __packed; /* FW_TLV_DEBUG_TRIGGER_API_S_VER_1 */267 268/**269 * struct iwl_fw_ini_hcmd_tlv - Generic Host command pass through TLV270 *271 * @hdr: debug header272 * @time_point: time point. One of &enum iwl_fw_ini_time_point273 * @period_msec: interval at which the hcmd will be sent to the FW.274 * Measured in msec (0 = one time command)275 * @hcmd: a variable length host-command to be sent to apply the configuration276 */277struct iwl_fw_ini_hcmd_tlv {278 struct iwl_fw_ini_header hdr;279 __le32 time_point;280 __le32 period_msec;281 struct iwl_fw_ini_hcmd hcmd;282} __packed; /* FW_TLV_DEBUG_HCMD_API_S_VER_1 */283 284/**285* struct iwl_fw_ini_addr_val - Address and value to set it to286*287* @address: the base address288* @value: value to set at address289*/290struct iwl_fw_ini_addr_val {291 __le32 address;292 __le32 value;293} __packed; /* FW_TLV_DEBUG_ADDR_VALUE_VER_1 */294 295/**296 * struct iwl_fw_ini_conf_set_tlv - configuration TLV to set register/memory.297 *298 * @hdr: debug header299 * @time_point: time point to apply config. One of &enum iwl_fw_ini_time_point300 * @set_type: write access type preset token for time point.301 * one of &enum iwl_fw_ini_config_set_type302 * @addr_offset: the offset to add to any item in address[0] field303 * @addr_val: address value pair304 */305struct iwl_fw_ini_conf_set_tlv {306 struct iwl_fw_ini_header hdr;307 __le32 time_point;308 __le32 set_type;309 __le32 addr_offset;310 struct iwl_fw_ini_addr_val addr_val[];311} __packed; /* FW_TLV_DEBUG_CONFIG_SET_API_S_VER_1 */312 313/**314 * enum iwl_fw_ini_config_set_type315 *316 * @IWL_FW_INI_CONFIG_SET_TYPE_INVALID: invalid config set317 * @IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_MAC: for PERIPHERY MAC configuration318 * @IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_PHY: for PERIPHERY PHY configuration319 * @IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_AUX: for PERIPHERY AUX configuration320 * @IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_MEMORY: for DEVICE MEMORY configuration321 * @IWL_FW_INI_CONFIG_SET_TYPE_CSR: for CSR configuration322 * @IWL_FW_INI_CONFIG_SET_TYPE_DBGC_DRAM_ADDR: for DBGC_DRAM_ADDR configuration323 * @IWL_FW_INI_CONFIG_SET_TYPE_PERIPH_SCRATCH_HWM: for PERIPH SCRATCH HWM configuration324 * @IWL_FW_INI_CONFIG_SET_TYPE_MAX_NUM: max number of configuration supported325*/326 327enum iwl_fw_ini_config_set_type {328 IWL_FW_INI_CONFIG_SET_TYPE_INVALID = 0,329 IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_MAC,330 IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_PHY,331 IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_AUX,332 IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_MEMORY,333 IWL_FW_INI_CONFIG_SET_TYPE_CSR,334 IWL_FW_INI_CONFIG_SET_TYPE_DBGC_DRAM_ADDR,335 IWL_FW_INI_CONFIG_SET_TYPE_PERIPH_SCRATCH_HWM,336 IWL_FW_INI_CONFIG_SET_TYPE_MAX_NUM,337} __packed;338 339/**340 * enum iwl_fw_ini_allocation_id341 *342 * @IWL_FW_INI_ALLOCATION_INVALID: invalid343 * @IWL_FW_INI_ALLOCATION_ID_DBGC1: allocation meant for DBGC1 configuration344 * @IWL_FW_INI_ALLOCATION_ID_DBGC2: allocation meant for DBGC2 configuration345 * @IWL_FW_INI_ALLOCATION_ID_DBGC3: allocation meant for DBGC3 configuration346 * @IWL_FW_INI_ALLOCATION_ID_DBGC4: allocation meant for DBGC4 configuration347 * @IWL_FW_INI_ALLOCATION_NUM: number of allocation ids348*/349enum iwl_fw_ini_allocation_id {350 IWL_FW_INI_ALLOCATION_INVALID,351 IWL_FW_INI_ALLOCATION_ID_DBGC1,352 IWL_FW_INI_ALLOCATION_ID_DBGC2,353 IWL_FW_INI_ALLOCATION_ID_DBGC3,354 IWL_FW_INI_ALLOCATION_ID_DBGC4,355 IWL_FW_INI_ALLOCATION_NUM,356}; /* FW_DEBUG_TLV_ALLOCATION_ID_E_VER_1 */357 358/**359 * enum iwl_fw_ini_buffer_location360 *361 * @IWL_FW_INI_LOCATION_INVALID: invalid362 * @IWL_FW_INI_LOCATION_SRAM_PATH: SRAM location363 * @IWL_FW_INI_LOCATION_DRAM_PATH: DRAM location364 * @IWL_FW_INI_LOCATION_NPK_PATH: NPK location365 * @IWL_FW_INI_LOCATION_NUM: number of valid locations366 */367enum iwl_fw_ini_buffer_location {368 IWL_FW_INI_LOCATION_INVALID,369 IWL_FW_INI_LOCATION_SRAM_PATH,370 IWL_FW_INI_LOCATION_DRAM_PATH,371 IWL_FW_INI_LOCATION_NPK_PATH,372 IWL_FW_INI_LOCATION_NUM,373}; /* FW_DEBUG_TLV_BUFFER_LOCATION_E_VER_1 */374 375/**376 * enum iwl_fw_ini_region_type377 *378 * @IWL_FW_INI_REGION_INVALID: invalid379 * @IWL_FW_INI_REGION_TLV: uCode and debug TLVs380 * @IWL_FW_INI_REGION_INTERNAL_BUFFER: monitor SMEM buffer381 * @IWL_FW_INI_REGION_DRAM_BUFFER: monitor DRAM buffer382 * @IWL_FW_INI_REGION_TXF: TX fifos383 * @IWL_FW_INI_REGION_RXF: RX fifo384 * @IWL_FW_INI_REGION_LMAC_ERROR_TABLE: lmac error table385 * @IWL_FW_INI_REGION_UMAC_ERROR_TABLE: umac error table386 * @IWL_FW_INI_REGION_RSP_OR_NOTIF: FW response or notification data387 * @IWL_FW_INI_REGION_DEVICE_MEMORY: device internal memory388 * @IWL_FW_INI_REGION_PERIPHERY_MAC: periphery registers of MAC389 * @IWL_FW_INI_REGION_PERIPHERY_PHY: periphery registers of PHY390 * @IWL_FW_INI_REGION_PERIPHERY_AUX: periphery registers of AUX391 * @IWL_FW_INI_REGION_PAGING: paging memory392 * @IWL_FW_INI_REGION_CSR: CSR registers393 * @IWL_FW_INI_REGION_DRAM_IMR: IMR memory394 * @IWL_FW_INI_REGION_PCI_IOSF_CONFIG: PCI/IOSF config395 * @IWL_FW_INI_REGION_SPECIAL_DEVICE_MEMORY: special device memory396 * @IWL_FW_INI_REGION_DBGI_SRAM: periphery registers of DBGI SRAM397 * @IWL_FW_INI_REGION_PERIPHERY_MAC_RANGE: a range of periphery registers of MAC398 * @IWL_FW_INI_REGION_PERIPHERY_PHY_RANGE: a range of periphery registers of PHY399 * @IWL_FW_INI_REGION_PERIPHERY_SNPS_DPHYIP: periphery registers of SNPS DPHYIP400 * @IWL_FW_INI_REGION_NUM: number of region types401 */402enum iwl_fw_ini_region_type {403 IWL_FW_INI_REGION_INVALID,404 IWL_FW_INI_REGION_TLV,405 IWL_FW_INI_REGION_INTERNAL_BUFFER,406 IWL_FW_INI_REGION_DRAM_BUFFER,407 IWL_FW_INI_REGION_TXF,408 IWL_FW_INI_REGION_RXF,409 IWL_FW_INI_REGION_LMAC_ERROR_TABLE,410 IWL_FW_INI_REGION_UMAC_ERROR_TABLE,411 IWL_FW_INI_REGION_RSP_OR_NOTIF,412 IWL_FW_INI_REGION_DEVICE_MEMORY,413 IWL_FW_INI_REGION_PERIPHERY_MAC,414 IWL_FW_INI_REGION_PERIPHERY_PHY,415 IWL_FW_INI_REGION_PERIPHERY_AUX,416 IWL_FW_INI_REGION_PAGING,417 IWL_FW_INI_REGION_CSR,418 IWL_FW_INI_REGION_DRAM_IMR,419 IWL_FW_INI_REGION_PCI_IOSF_CONFIG,420 IWL_FW_INI_REGION_SPECIAL_DEVICE_MEMORY,421 IWL_FW_INI_REGION_DBGI_SRAM,422 IWL_FW_INI_REGION_PERIPHERY_MAC_RANGE,423 IWL_FW_INI_REGION_PERIPHERY_PHY_RANGE,424 IWL_FW_INI_REGION_PERIPHERY_SNPS_DPHYIP,425 IWL_FW_INI_REGION_NUM426}; /* FW_TLV_DEBUG_REGION_TYPE_API_E */427 428enum iwl_fw_ini_region_device_memory_subtype {429 IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_HW_SMEM = 1,430 IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_UMAC_ERROR_TABLE = 5,431 IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_LMAC_1_ERROR_TABLE = 7,432 IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_LMAC_2_ERROR_TABLE = 10,433 IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_TCM_1_ERROR_TABLE = 14,434 IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_TCM_2_ERROR_TABLE = 16,435 IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_RCM_1_ERROR_TABLE = 18,436 IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_RCM_2_ERROR_TABLE = 20,437}; /* FW_TLV_DEBUG_REGION_DEVICE_MEMORY_SUBTYPE_API_E */438 439/**440 * enum iwl_fw_ini_time_point441 *442 * Hard coded time points in which the driver can send hcmd or perform dump443 * collection444 *445 * @IWL_FW_INI_TIME_POINT_INVALID: invalid timepoint446 * @IWL_FW_INI_TIME_POINT_EARLY: pre loading the FW447 * @IWL_FW_INI_TIME_POINT_AFTER_ALIVE: first cmd from host after alive notif448 * @IWL_FW_INI_TIME_POINT_POST_INIT: last cmd in series of init sequence449 * @IWL_FW_INI_TIME_POINT_FW_ASSERT: FW assert450 * @IWL_FW_INI_TIME_POINT_FW_HW_ERROR: FW HW error451 * @IWL_FW_INI_TIME_POINT_FW_TFD_Q_HANG: TFD queue hang452 * @IWL_FW_INI_TIME_POINT_FW_DHC_NOTIFICATION: DHC cmd response and notif453 * @IWL_FW_INI_TIME_POINT_FW_RSP_OR_NOTIF: FW response or notification.454 * data field holds id and group455 * @IWL_FW_INI_TIME_POINT_USER_TRIGGER: user trigger time point456 * @IWL_FW_INI_TIME_POINT_PERIODIC: periodic timepoint that fires in constant457 * intervals. data field holds the interval time in msec458 * @IWL_FW_INI_TIME_POINT_RESERVED: reserved459 * @IWL_FW_INI_TIME_POINT_HOST_ASSERT: Unused460 * @IWL_FW_INI_TIME_POINT_HOST_ALIVE_TIMEOUT: alive timeout461 * @IWL_FW_INI_TIME_POINT_HOST_DEVICE_ENABLE: device enable462 * @IWL_FW_INI_TIME_POINT_HOST_DEVICE_DISABLE: device disable463 * @IWL_FW_INI_TIME_POINT_HOST_D3_START: D3 start464 * @IWL_FW_INI_TIME_POINT_HOST_D3_END: D3 end465 * @IWL_FW_INI_TIME_POINT_MISSED_BEACONS: missed beacons466 * @IWL_FW_INI_TIME_POINT_ASSOC_FAILED: association failure467 * @IWL_FW_INI_TIME_POINT_TX_FAILED: Tx frame failed468 * @IWL_FW_INI_TIME_POINT_TX_WFD_ACTION_FRAME_FAILED: wifi direct action469 * frame failed470 * @IWL_FW_INI_TIME_POINT_TX_LATENCY_THRESHOLD: Tx latency threshold471 * @IWL_FW_INI_TIME_POINT_HANG_OCCURRED: hang occurred472 * @IWL_FW_INI_TIME_POINT_EAPOL_FAILED: EAPOL failed473 * @IWL_FW_INI_TIME_POINT_FAKE_TX: fake Tx474 * @IWL_FW_INI_TIME_POINT_DEASSOC: de association475 * @IWL_FW_INI_TIME_POINT_PRESET_OVERRIDE_EXT_REQ: request to override preset476 * @IWL_FW_INI_TIME_POINT_PRESET_OVERRIDE_START: start handling override preset477 * request478 * @IWL_FW_INI_TIME_SCAN_FAILURE: failed scan channel list479 * @IWL_FW_INI_TIME_ESR_LINK_UP: EMLSR is active (several links are activated)480 * @IWL_FW_INI_TIME_ESR_LINK_DOWN: EMLSR is inactive (only one active link left)481 * @IWL_FW_INI_TIME_POINT_NUM: number of time points482 */483enum iwl_fw_ini_time_point {484 IWL_FW_INI_TIME_POINT_INVALID,485 IWL_FW_INI_TIME_POINT_EARLY,486 IWL_FW_INI_TIME_POINT_AFTER_ALIVE,487 IWL_FW_INI_TIME_POINT_POST_INIT,488 IWL_FW_INI_TIME_POINT_FW_ASSERT,489 IWL_FW_INI_TIME_POINT_FW_HW_ERROR,490 IWL_FW_INI_TIME_POINT_FW_TFD_Q_HANG,491 IWL_FW_INI_TIME_POINT_FW_DHC_NOTIFICATION,492 IWL_FW_INI_TIME_POINT_FW_RSP_OR_NOTIF,493 IWL_FW_INI_TIME_POINT_USER_TRIGGER,494 IWL_FW_INI_TIME_POINT_PERIODIC,495 IWL_FW_INI_TIME_POINT_RESERVED,496 IWL_FW_INI_TIME_POINT_HOST_ASSERT,497 IWL_FW_INI_TIME_POINT_HOST_ALIVE_TIMEOUT,498 IWL_FW_INI_TIME_POINT_HOST_DEVICE_ENABLE,499 IWL_FW_INI_TIME_POINT_HOST_DEVICE_DISABLE,500 IWL_FW_INI_TIME_POINT_HOST_D3_START,501 IWL_FW_INI_TIME_POINT_HOST_D3_END,502 IWL_FW_INI_TIME_POINT_MISSED_BEACONS,503 IWL_FW_INI_TIME_POINT_ASSOC_FAILED,504 IWL_FW_INI_TIME_POINT_TX_FAILED,505 IWL_FW_INI_TIME_POINT_TX_WFD_ACTION_FRAME_FAILED,506 IWL_FW_INI_TIME_POINT_TX_LATENCY_THRESHOLD,507 IWL_FW_INI_TIME_POINT_HANG_OCCURRED,508 IWL_FW_INI_TIME_POINT_EAPOL_FAILED,509 IWL_FW_INI_TIME_POINT_FAKE_TX,510 IWL_FW_INI_TIME_POINT_DEASSOC,511 IWL_FW_INI_TIME_POINT_PRESET_OVERRIDE_EXT_REQ,512 IWL_FW_INI_TIME_POINT_PRESET_OVERRIDE_START,513 IWL_FW_INI_TIME_SCAN_FAILURE,514 IWL_FW_INI_TIME_ESR_LINK_UP,515 IWL_FW_INI_TIME_ESR_LINK_DOWN,516 IWL_FW_INI_TIME_POINT_NUM,517}; /* FW_TLV_DEBUG_TIME_POINT_API_E */518 519/**520 * enum iwl_fw_ini_trigger_apply_policy - Determines how to apply triggers521 *522 * @IWL_FW_INI_APPLY_POLICY_MATCH_TIME_POINT: match by time point523 * @IWL_FW_INI_APPLY_POLICY_MATCH_DATA: match by trigger data524 * @IWL_FW_INI_APPLY_POLICY_OVERRIDE_REGIONS: override regions mask.525 * Append otherwise526 * @IWL_FW_INI_APPLY_POLICY_OVERRIDE_CFG: override trigger configuration527 * @IWL_FW_INI_APPLY_POLICY_OVERRIDE_DATA: override trigger data.528 * Append otherwise529 * @IWL_FW_INI_APPLY_POLICY_DUMP_COMPLETE_CMD: send cmd once dump collected530 */531enum iwl_fw_ini_trigger_apply_policy {532 IWL_FW_INI_APPLY_POLICY_MATCH_TIME_POINT = BIT(0),533 IWL_FW_INI_APPLY_POLICY_MATCH_DATA = BIT(1),534 IWL_FW_INI_APPLY_POLICY_OVERRIDE_REGIONS = BIT(8),535 IWL_FW_INI_APPLY_POLICY_OVERRIDE_CFG = BIT(9),536 IWL_FW_INI_APPLY_POLICY_OVERRIDE_DATA = BIT(10),537 IWL_FW_INI_APPLY_POLICY_DUMP_COMPLETE_CMD = BIT(16),538};539 540/**541 * enum iwl_fw_ini_trigger_reset_fw_policy - Determines how to handle reset542 *543 * @IWL_FW_INI_RESET_FW_MODE_NOTHING: do not stop FW and reload (default)544 * @IWL_FW_INI_RESET_FW_MODE_STOP_FW_ONLY: stop FW without reload FW545 * @IWL_FW_INI_RESET_FW_MODE_STOP_AND_RELOAD_FW: stop FW with reload FW546 */547enum iwl_fw_ini_trigger_reset_fw_policy {548 IWL_FW_INI_RESET_FW_MODE_NOTHING = 0,549 IWL_FW_INI_RESET_FW_MODE_STOP_FW_ONLY,550 IWL_FW_INI_RESET_FW_MODE_STOP_AND_RELOAD_FW551};552 553/**554 * enum iwl_fw_ini_dump_policy - Determines how to handle dump based on enabled flags555 *556 * @IWL_FW_INI_DEBUG_DUMP_POLICY_NO_LIMIT: OS has no limit of dump size557 * @IWL_FW_INI_DEBUG_DUMP_POLICY_MAX_LIMIT_600KB: mini dump only 600KB region dump558 * @IWL_FW_IWL_DEBUG_DUMP_POLICY_MAX_LIMIT_5MB: mini dump 5MB size dump559 */560enum iwl_fw_ini_dump_policy {561 IWL_FW_INI_DEBUG_DUMP_POLICY_NO_LIMIT = BIT(0),562 IWL_FW_INI_DEBUG_DUMP_POLICY_MAX_LIMIT_600KB = BIT(1),563 IWL_FW_IWL_DEBUG_DUMP_POLICY_MAX_LIMIT_5MB = BIT(2),564 565};566 567/**568 * enum iwl_fw_ini_dump_type - Determines dump type based on size defined by FW.569 *570 * @IWL_FW_INI_DUMP_BRIEF : only dump the most important regions571 * @IWL_FW_INI_DUMP_MEDIUM: dump more regions than "brief", but not all regions572 * @IWL_FW_INI_DUMP_VERBOSE : dump all regions573 */574enum iwl_fw_ini_dump_type {575 IWL_FW_INI_DUMP_BRIEF,576 IWL_FW_INI_DUMP_MEDIUM,577 IWL_FW_INI_DUMP_VERBOSE,578};579#endif580