Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
0002 /*
0003  * Copyright (C) 2018-2022 Intel Corporation
0004  */
0005 #ifndef __iwl_fw_dbg_tlv_h__
0006 #define __iwl_fw_dbg_tlv_h__
0007 
0008 #include <linux/bitops.h>
0009 
0010 #define IWL_FW_INI_MAX_REGION_ID        64
0011 #define IWL_FW_INI_MAX_NAME         32
0012 #define IWL_FW_INI_MAX_CFG_NAME         64
0013 #define IWL_FW_INI_DOMAIN_ALWAYS_ON     0
0014 #define IWL_FW_INI_REGION_ID_MASK       GENMASK(15, 0)
0015 #define IWL_FW_INI_REGION_DUMP_POLICY_MASK  GENMASK(31, 16)
0016 
0017 /**
0018  * struct iwl_fw_ini_hcmd
0019  *
0020  * @id: the debug configuration command type for instance: 0xf6 / 0xf5 / DHC
0021  * @group: the desired cmd group
0022  * @reserved: to align to FW struct
0023  * @data: all of the relevant command data to be sent
0024  */
0025 struct iwl_fw_ini_hcmd {
0026     u8 id;
0027     u8 group;
0028     __le16 reserved;
0029     u8 data[];
0030 } __packed; /* FW_DEBUG_TLV_HCMD_DATA_API_S_VER_1 */
0031 
0032 /**
0033  * struct iwl_fw_ini_header - Common Header for all ini debug TLV's structures
0034  *
0035  * @version: TLV version
0036  * @domain: domain of the TLV. One of &enum iwl_fw_ini_dbg_domain
0037  */
0038 struct iwl_fw_ini_header {
0039     __le32 version;
0040     __le32 domain;
0041     /* followed by the data */
0042 } __packed; /* FW_TLV_DEBUG_HEADER_S_VER_1 */
0043 
0044 /**
0045  * struct iwl_fw_ini_region_dev_addr - Configuration to read device addresses
0046  *
0047  * @size: size of each memory chunk
0048  * @offset: offset to add to the base address of each chunk
0049  */
0050 struct iwl_fw_ini_region_dev_addr {
0051     __le32 size;
0052     __le32 offset;
0053 } __packed; /* FW_TLV_DEBUG_DEVICE_ADDR_API_S_VER_1 */
0054 
0055 /**
0056  * struct iwl_fw_ini_region_fifos - Configuration to read Tx/Rx fifos
0057  *
0058  * @fid: fifos ids array. Used to determine what fifos to collect
0059  * @hdr_only: if non zero, collect only the registers
0060  * @offset: offset to add to the registers addresses
0061  */
0062 struct iwl_fw_ini_region_fifos {
0063     __le32 fid[2];
0064     __le32 hdr_only;
0065     __le32 offset;
0066 } __packed; /* FW_TLV_DEBUG_REGION_FIFOS_API_S_VER_1 */
0067 
0068 /**
0069  * struct iwl_fw_ini_region_err_table - error table region data
0070  *
0071  * Configuration to read Umac/Lmac error table
0072  *
0073  * @version: version of the error table
0074  * @base_addr: base address of the error table
0075  * @size: size of the error table
0076  * @offset: offset to add to &base_addr
0077  */
0078 struct iwl_fw_ini_region_err_table {
0079     __le32 version;
0080     __le32 base_addr;
0081     __le32 size;
0082     __le32 offset;
0083 } __packed; /* FW_TLV_DEBUG_REGION_ERROR_TABLE_API_S_VER_1 */
0084 
0085 /**
0086  * struct iwl_fw_ini_region_special_device_memory - special device memory
0087  *
0088  * Configuration to read a special memory
0089  *
0090  * @type: type of the special memory
0091  * @version: version of the special memory
0092  * @base_addr: base address of the error table
0093  * @size: size of the error table
0094  * @offset: offset to add to &base_addr
0095  */
0096 struct iwl_fw_ini_region_special_device_memory {
0097     __le16 type;
0098     __le16 version;
0099     __le32 base_addr;
0100     __le32 size;
0101     __le32 offset;
0102 } __packed; /* FW_TLV_DEBUG_REGION_SPECIAL_DEVICE_ADDR_API_S_VER_1 */
0103 
0104 /**
0105  * struct iwl_fw_ini_region_internal_buffer - internal buffer region data
0106  *
0107  * Configuration to read internal monitor buffer
0108  *
0109  * @alloc_id: allocation id one of &enum iwl_fw_ini_allocation_id
0110  * @base_addr: internal buffer base address
0111  * @size: size internal buffer size
0112  */
0113 struct iwl_fw_ini_region_internal_buffer {
0114     __le32 alloc_id;
0115     __le32 base_addr;
0116     __le32 size;
0117 } __packed; /* FW_TLV_DEBUG_REGION_INTERNAL_BUFFER_API_S_VER_1 */
0118 
0119 /**
0120  * struct iwl_fw_ini_region_tlv - region TLV
0121  *
0122  * Configures parameters for region data collection
0123  *
0124  * @hdr: debug header
0125  * @id: region id. Max id is &IWL_FW_INI_MAX_REGION_ID
0126  * @type: region type. One of &enum iwl_fw_ini_region_type
0127  * @sub_type: region sub type
0128  * @sub_type_ver: region sub type version
0129  * @reserved: not in use
0130  * @name: region name
0131  * @dev_addr: device address configuration. Used by
0132  *  &IWL_FW_INI_REGION_DEVICE_MEMORY, &IWL_FW_INI_REGION_PERIPHERY_MAC,
0133  *  &IWL_FW_INI_REGION_PERIPHERY_PHY, &IWL_FW_INI_REGION_PERIPHERY_AUX,
0134  *  &IWL_FW_INI_REGION_PAGING, &IWL_FW_INI_REGION_CSR,
0135  *  &IWL_FW_INI_REGION_DRAM_IMR and &IWL_FW_INI_REGION_PCI_IOSF_CONFIG
0136  *  &IWL_FW_INI_REGION_DBGI_SRAM, &FW_TLV_DEBUG_REGION_TYPE_DBGI_SRAM,
0137  * @fifos: fifos configuration. Used by &IWL_FW_INI_REGION_TXF and
0138  *  &IWL_FW_INI_REGION_RXF
0139  * @err_table: error table configuration. Used by
0140  *  IWL_FW_INI_REGION_LMAC_ERROR_TABLE and
0141  *  IWL_FW_INI_REGION_UMAC_ERROR_TABLE
0142  * @internal_buffer: internal monitor buffer configuration. Used by
0143  *  &IWL_FW_INI_REGION_INTERNAL_BUFFER
0144  * @dram_alloc_id: dram allocation id. One of &enum iwl_fw_ini_allocation_id.
0145  *  Used by &IWL_FW_INI_REGION_DRAM_BUFFER
0146  * @tlv_mask: tlv collection mask. Used by &IWL_FW_INI_REGION_TLV
0147  * @addrs: array of addresses attached to the end of the region tlv
0148  */
0149 struct iwl_fw_ini_region_tlv {
0150     struct iwl_fw_ini_header hdr;
0151     __le32 id;
0152     u8 type;
0153     u8 sub_type;
0154     u8 sub_type_ver;
0155     u8 reserved;
0156     u8 name[IWL_FW_INI_MAX_NAME];
0157     union {
0158         struct iwl_fw_ini_region_dev_addr dev_addr;
0159         struct iwl_fw_ini_region_fifos fifos;
0160         struct iwl_fw_ini_region_err_table err_table;
0161         struct iwl_fw_ini_region_internal_buffer internal_buffer;
0162         struct iwl_fw_ini_region_special_device_memory special_mem;
0163         __le32 dram_alloc_id;
0164         __le32 tlv_mask;
0165     }; /* FW_TLV_DEBUG_REGION_CONF_PARAMS_API_U_VER_1 */
0166     __le32 addrs[];
0167 } __packed; /* FW_TLV_DEBUG_REGION_API_S_VER_1 */
0168 
0169 /**
0170  * struct iwl_fw_ini_debug_info_tlv
0171  *
0172  * debug configuration name for a specific image
0173  *
0174  * @hdr: debug header
0175  * @image_type: image type
0176  * @debug_cfg_name: debug configuration name
0177  */
0178 struct iwl_fw_ini_debug_info_tlv {
0179     struct iwl_fw_ini_header hdr;
0180     __le32 image_type;
0181     u8 debug_cfg_name[IWL_FW_INI_MAX_CFG_NAME];
0182 } __packed; /* FW_TLV_DEBUG_INFO_API_S_VER_1 */
0183 
0184 /**
0185  * struct iwl_fw_ini_allocation_tlv - Allocates DRAM buffers
0186  *
0187  * @hdr: debug header
0188  * @alloc_id: allocation id. One of &enum iwl_fw_ini_allocation_id
0189  * @buf_location: buffer location. One of &enum iwl_fw_ini_buffer_location
0190  * @req_size: requested buffer size
0191  * @max_frags_num: maximum number of fragments
0192  * @min_size: minimum buffer size
0193  */
0194 struct iwl_fw_ini_allocation_tlv {
0195     struct iwl_fw_ini_header hdr;
0196     __le32 alloc_id;
0197     __le32 buf_location;
0198     __le32 req_size;
0199     __le32 max_frags_num;
0200     __le32 min_size;
0201 } __packed; /* FW_TLV_DEBUG_BUFFER_ALLOCATION_API_S_VER_1 */
0202 
0203 /**
0204  * struct iwl_fw_ini_trigger_tlv - trigger TLV
0205  *
0206  * Trigger that upon firing, determines what regions to collect
0207  *
0208  * @hdr: debug header
0209  * @time_point: time point. One of &enum iwl_fw_ini_time_point
0210  * @trigger_reason: trigger reason
0211  * @apply_policy: uses &enum iwl_fw_ini_trigger_apply_policy
0212  * @dump_delay: delay from trigger fire to dump, in usec
0213  * @occurrences: max trigger fire occurrences allowed
0214  * @reserved: unused
0215  * @ignore_consec: ignore consecutive triggers, in usec
0216  * @reset_fw: if non zero, will reset and reload the FW
0217  * @multi_dut: initiate debug dump data on several DUTs
0218  * @regions_mask: mask of regions to collect
0219  * @data: trigger data
0220  */
0221 struct iwl_fw_ini_trigger_tlv {
0222     struct iwl_fw_ini_header hdr;
0223     __le32 time_point;
0224     __le32 trigger_reason;
0225     __le32 apply_policy;
0226     __le32 dump_delay;
0227     __le32 occurrences;
0228     __le32 reserved;
0229     __le32 ignore_consec;
0230     __le32 reset_fw;
0231     __le32 multi_dut;
0232     __le64 regions_mask;
0233     __le32 data[];
0234 } __packed; /* FW_TLV_DEBUG_TRIGGER_API_S_VER_1 */
0235 
0236 /**
0237  * struct iwl_fw_ini_hcmd_tlv - Generic Host command pass through TLV
0238  *
0239  * @hdr: debug header
0240  * @time_point: time point. One of &enum iwl_fw_ini_time_point
0241  * @period_msec: interval at which the hcmd will be sent to the FW.
0242  *  Measured in msec (0 = one time command)
0243  * @hcmd: a variable length host-command to be sent to apply the configuration
0244  */
0245 struct iwl_fw_ini_hcmd_tlv {
0246     struct iwl_fw_ini_header hdr;
0247     __le32 time_point;
0248     __le32 period_msec;
0249     struct iwl_fw_ini_hcmd hcmd;
0250 } __packed; /* FW_TLV_DEBUG_HCMD_API_S_VER_1 */
0251 
0252 /**
0253 * struct iwl_fw_ini_addr_val - Address and value to set it to
0254 *
0255 * @address: the base address
0256 * @value: value to set at address
0257 */
0258 struct iwl_fw_ini_addr_val {
0259     __le32 address;
0260     __le32 value;
0261 } __packed; /* FW_TLV_DEBUG_ADDR_VALUE_VER_1 */
0262 
0263 /**
0264  * struct iwl_fw_ini_conf_tlv - configuration TLV to set register/memory.
0265  *
0266  * @hdr: debug header
0267  * @time_point: time point to apply config. One of &enum iwl_fw_ini_time_point
0268  * @set_type: write access type preset token for time point.
0269  *  one of &enum iwl_fw_ini_config_set_type
0270  * @addr_offset: the offset to add to any item in address[0] field
0271  * @addr_val: address value pair
0272  */
0273 struct iwl_fw_ini_conf_set_tlv {
0274     struct iwl_fw_ini_header hdr;
0275     __le32 time_point;
0276     __le32 set_type;
0277     __le32 addr_offset;
0278     struct iwl_fw_ini_addr_val addr_val[];
0279 } __packed; /* FW_TLV_DEBUG_CONFIG_SET_API_S_VER_1 */
0280 
0281 /**
0282  * enum iwl_fw_ini_config_set_type
0283  *
0284  * @IWL_FW_INI_CONFIG_SET_TYPE_INVALID: invalid config set
0285  * @IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_MAC: for PERIPHERY MAC configuration
0286  * @IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_PHY: for PERIPHERY PHY configuration
0287  * @IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_AUX: for PERIPHERY AUX configuration
0288  * @IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_MEMORY: for DEVICE MEMORY configuration
0289  * @IWL_FW_INI_CONFIG_SET_TYPE_CSR: for CSR configuration
0290  * @IWL_FW_INI_CONFIG_SET_TYPE_DBGC_DRAM_ADDR: for DBGC_DRAM_ADDR configuration
0291  * @IWL_FW_INI_CONFIG_SET_TYPE_PERIPH_SCRATCH_HWM: for PERIPH SCRATCH HWM configuration
0292  * @IWL_FW_INI_ALLOCATION_NUM: max number of configuration supported
0293 */
0294 
0295 enum iwl_fw_ini_config_set_type {
0296     IWL_FW_INI_CONFIG_SET_TYPE_INVALID = 0,
0297     IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_MAC,
0298     IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_PHY,
0299     IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_AUX,
0300     IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_MEMORY,
0301     IWL_FW_INI_CONFIG_SET_TYPE_CSR,
0302     IWL_FW_INI_CONFIG_SET_TYPE_DBGC_DRAM_ADDR,
0303     IWL_FW_INI_CONFIG_SET_TYPE_PERIPH_SCRATCH_HWM,
0304     IWL_FW_INI_CONFIG_SET_TYPE_MAX_NUM,
0305 } __packed;
0306 
0307 /**
0308  * enum iwl_fw_ini_allocation_id
0309  *
0310  * @IWL_FW_INI_ALLOCATION_INVALID: invalid
0311  * @IWL_FW_INI_ALLOCATION_ID_DBGC1: allocation meant for DBGC1 configuration
0312  * @IWL_FW_INI_ALLOCATION_ID_DBGC2: allocation meant for DBGC2 configuration
0313  * @IWL_FW_INI_ALLOCATION_ID_DBGC3: allocation meant for DBGC3 configuration
0314  * @IWL_FW_INI_ALLOCATION_ID_DBGC4: allocation meant for DBGC4 configuration
0315  * @IWL_FW_INI_ALLOCATION_NUM: number of allocation ids
0316 */
0317 enum iwl_fw_ini_allocation_id {
0318     IWL_FW_INI_ALLOCATION_INVALID,
0319     IWL_FW_INI_ALLOCATION_ID_DBGC1,
0320     IWL_FW_INI_ALLOCATION_ID_DBGC2,
0321     IWL_FW_INI_ALLOCATION_ID_DBGC3,
0322     IWL_FW_INI_ALLOCATION_ID_DBGC4,
0323     IWL_FW_INI_ALLOCATION_NUM,
0324 }; /* FW_DEBUG_TLV_ALLOCATION_ID_E_VER_1 */
0325 
0326 /**
0327  * enum iwl_fw_ini_buffer_location
0328  *
0329  * @IWL_FW_INI_LOCATION_INVALID: invalid
0330  * @IWL_FW_INI_LOCATION_SRAM_PATH: SRAM location
0331  * @IWL_FW_INI_LOCATION_DRAM_PATH: DRAM location
0332  * @IWL_FW_INI_LOCATION_NPK_PATH: NPK location
0333  */
0334 enum iwl_fw_ini_buffer_location {
0335     IWL_FW_INI_LOCATION_INVALID,
0336     IWL_FW_INI_LOCATION_SRAM_PATH,
0337     IWL_FW_INI_LOCATION_DRAM_PATH,
0338     IWL_FW_INI_LOCATION_NPK_PATH,
0339     IWL_FW_INI_LOCATION_NUM,
0340 }; /* FW_DEBUG_TLV_BUFFER_LOCATION_E_VER_1 */
0341 
0342 /**
0343  * enum iwl_fw_ini_region_type
0344  *
0345  * @IWL_FW_INI_REGION_INVALID: invalid
0346  * @IWL_FW_INI_REGION_TLV: uCode and debug TLVs
0347  * @IWL_FW_INI_REGION_INTERNAL_BUFFER: monitor SMEM buffer
0348  * @IWL_FW_INI_REGION_DRAM_BUFFER: monitor DRAM buffer
0349  * @IWL_FW_INI_REGION_TXF: TX fifos
0350  * @IWL_FW_INI_REGION_RXF: RX fifo
0351  * @IWL_FW_INI_REGION_LMAC_ERROR_TABLE: lmac error table
0352  * @IWL_FW_INI_REGION_UMAC_ERROR_TABLE: umac error table
0353  * @IWL_FW_INI_REGION_RSP_OR_NOTIF: FW response or notification data
0354  * @IWL_FW_INI_REGION_DEVICE_MEMORY: device internal memory
0355  * @IWL_FW_INI_REGION_PERIPHERY_MAC: periphery registers of MAC
0356  * @IWL_FW_INI_REGION_PERIPHERY_PHY: periphery registers of PHY
0357  * @IWL_FW_INI_REGION_PERIPHERY_AUX: periphery registers of AUX
0358  * @IWL_FW_INI_REGION_PAGING: paging memory
0359  * @IWL_FW_INI_REGION_CSR: CSR registers
0360  * @IWL_FW_INI_REGION_DRAM_IMR: IMR memory
0361  * @IWL_FW_INI_REGION_PCI_IOSF_CONFIG: PCI/IOSF config
0362  * @IWL_FW_INI_REGION_SPECIAL_DEVICE_MEMORY: special device memory
0363  * @IWL_FW_INI_REGION_DBGI_SRAM: periphery registers of DBGI SRAM
0364  * @IWL_FW_INI_REGION_NUM: number of region types
0365  */
0366 enum iwl_fw_ini_region_type {
0367     IWL_FW_INI_REGION_INVALID,
0368     IWL_FW_INI_REGION_TLV,
0369     IWL_FW_INI_REGION_INTERNAL_BUFFER,
0370     IWL_FW_INI_REGION_DRAM_BUFFER,
0371     IWL_FW_INI_REGION_TXF,
0372     IWL_FW_INI_REGION_RXF,
0373     IWL_FW_INI_REGION_LMAC_ERROR_TABLE,
0374     IWL_FW_INI_REGION_UMAC_ERROR_TABLE,
0375     IWL_FW_INI_REGION_RSP_OR_NOTIF,
0376     IWL_FW_INI_REGION_DEVICE_MEMORY,
0377     IWL_FW_INI_REGION_PERIPHERY_MAC,
0378     IWL_FW_INI_REGION_PERIPHERY_PHY,
0379     IWL_FW_INI_REGION_PERIPHERY_AUX,
0380     IWL_FW_INI_REGION_PAGING,
0381     IWL_FW_INI_REGION_CSR,
0382     IWL_FW_INI_REGION_DRAM_IMR,
0383     IWL_FW_INI_REGION_PCI_IOSF_CONFIG,
0384     IWL_FW_INI_REGION_SPECIAL_DEVICE_MEMORY,
0385     IWL_FW_INI_REGION_DBGI_SRAM,
0386     IWL_FW_INI_REGION_NUM
0387 }; /* FW_TLV_DEBUG_REGION_TYPE_API_E */
0388 
0389 enum iwl_fw_ini_region_device_memory_subtype {
0390     IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_HW_SMEM = 1,
0391     IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_UMAC_ERROR_TABLE = 5,
0392     IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_LMAC_1_ERROR_TABLE = 7,
0393     IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_LMAC_2_ERROR_TABLE = 10,
0394     IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_TCM_1_ERROR_TABLE = 14,
0395     IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_TCM_2_ERROR_TABLE = 16,
0396     IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_RCM_1_ERROR_TABLE = 18,
0397     IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_RCM_2_ERROR_TABLE = 20,
0398 }; /* FW_TLV_DEBUG_REGION_DEVICE_MEMORY_SUBTYPE_API_E */
0399 
0400 /**
0401  * enum iwl_fw_ini_time_point
0402  *
0403  * Hard coded time points in which the driver can send hcmd or perform dump
0404  * collection
0405  *
0406  * @IWL_FW_INI_TIME_POINT_EARLY: pre loading the FW
0407  * @IWL_FW_INI_TIME_POINT_AFTER_ALIVE: first cmd from host after alive notif
0408  * @IWL_FW_INI_TIME_POINT_POST_INIT: last cmd in series of init sequence
0409  * @IWL_FW_INI_TIME_POINT_FW_ASSERT: FW assert
0410  * @IWL_FW_INI_TIME_POINT_FW_HW_ERROR: FW HW error
0411  * @IWL_FW_INI_TIME_POINT_FW_TFD_Q_HANG: TFD queue hang
0412  * @IWL_FW_INI_TIME_POINT_FW_DHC_NOTIFICATION: DHC cmd response and notif
0413  * @IWL_FW_INI_TIME_POINT_FW_RSP_OR_NOTIF: FW response or notification.
0414  *  data field holds id and group
0415  * @IWL_FW_INI_TIME_POINT_USER_TRIGGER: user trigger time point
0416  * @IWL_FW_INI_TIME_POINT_PERIODIC: periodic timepoint that fires in constant
0417  *  intervals. data field holds the interval time in msec
0418  * @IWL_FW_INI_TIME_POINT_RESERVED: reserved
0419  * @IWL_FW_INI_TIME_POINT_HOST_ASSERT: Unused
0420  * @IWL_FW_INI_TIME_POINT_HOST_ALIVE_TIMEOUT: alive timeout
0421  * @IWL_FW_INI_TIME_POINT_HOST_DEVICE_ENABLE: device enable
0422  * @IWL_FW_INI_TIME_POINT_HOST_DEVICE_DISABLE: device disable
0423  * @IWL_FW_INI_TIME_POINT_HOST_D3_START: D3 start
0424  * @IWL_FW_INI_TIME_POINT_HOST_D3_END: D3 end
0425  * @IWL_FW_INI_TIME_POINT_MISSED_BEACONS: missed beacons
0426  * @IWL_FW_INI_TIME_POINT_ASSOC_FAILED: association failure
0427  * @IWL_FW_INI_TIME_POINT_TX_FAILED: Tx frame failed
0428  * @IWL_FW_INI_TIME_POINT_TX_WFD_ACTION_FRAME_FAILED: wifi direct action
0429  *  frame failed
0430  * @IWL_FW_INI_TIME_POINT_TX_LATENCY_THRESHOLD: Tx latency threshold
0431  * @IWL_FW_INI_TIME_POINT_HANG_OCCURRED: hang occurred
0432  * @IWL_FW_INI_TIME_POINT_EAPOL_FAILED: EAPOL failed
0433  * @IWL_FW_INI_TIME_POINT_FAKE_TX: fake Tx
0434  * @IWL_FW_INI_TIME_POINT_DEASSOC: de association
0435  * @IWL_FW_INI_TIME_POINT_NUM: number of time points
0436  */
0437 enum iwl_fw_ini_time_point {
0438     IWL_FW_INI_TIME_POINT_INVALID,
0439     IWL_FW_INI_TIME_POINT_EARLY,
0440     IWL_FW_INI_TIME_POINT_AFTER_ALIVE,
0441     IWL_FW_INI_TIME_POINT_POST_INIT,
0442     IWL_FW_INI_TIME_POINT_FW_ASSERT,
0443     IWL_FW_INI_TIME_POINT_FW_HW_ERROR,
0444     IWL_FW_INI_TIME_POINT_FW_TFD_Q_HANG,
0445     IWL_FW_INI_TIME_POINT_FW_DHC_NOTIFICATION,
0446     IWL_FW_INI_TIME_POINT_FW_RSP_OR_NOTIF,
0447     IWL_FW_INI_TIME_POINT_USER_TRIGGER,
0448     IWL_FW_INI_TIME_POINT_PERIODIC,
0449     IWL_FW_INI_TIME_POINT_RESERVED,
0450     IWL_FW_INI_TIME_POINT_HOST_ASSERT,
0451     IWL_FW_INI_TIME_POINT_HOST_ALIVE_TIMEOUT,
0452     IWL_FW_INI_TIME_POINT_HOST_DEVICE_ENABLE,
0453     IWL_FW_INI_TIME_POINT_HOST_DEVICE_DISABLE,
0454     IWL_FW_INI_TIME_POINT_HOST_D3_START,
0455     IWL_FW_INI_TIME_POINT_HOST_D3_END,
0456     IWL_FW_INI_TIME_POINT_MISSED_BEACONS,
0457     IWL_FW_INI_TIME_POINT_ASSOC_FAILED,
0458     IWL_FW_INI_TIME_POINT_TX_FAILED,
0459     IWL_FW_INI_TIME_POINT_TX_WFD_ACTION_FRAME_FAILED,
0460     IWL_FW_INI_TIME_POINT_TX_LATENCY_THRESHOLD,
0461     IWL_FW_INI_TIME_POINT_HANG_OCCURRED,
0462     IWL_FW_INI_TIME_POINT_EAPOL_FAILED,
0463     IWL_FW_INI_TIME_POINT_FAKE_TX,
0464     IWL_FW_INI_TIME_POINT_DEASSOC,
0465     IWL_FW_INI_TIME_POINT_NUM,
0466 }; /* FW_TLV_DEBUG_TIME_POINT_API_E */
0467 
0468 /**
0469  * enum iwl_fw_ini_trigger_apply_policy - Determines how to apply triggers
0470  *
0471  * @IWL_FW_INI_APPLY_POLICY_MATCH_TIME_POINT: match by time point
0472  * @IWL_FW_INI_APPLY_POLICY_MATCH_DATA: match by trigger data
0473  * @IWL_FW_INI_APPLY_POLICY_OVERRIDE_REGIONS: override regions mask.
0474  *  Append otherwise
0475  * @IWL_FW_INI_APPLY_POLICY_OVERRIDE_CFG: override trigger configuration
0476  * @IWL_FW_INI_APPLY_POLICY_OVERRIDE_DATA: override trigger data.
0477  *  Append otherwise
0478  * @IWL_FW_INI_APPLY_POLICY_DUMP_COMPLETE_CMD: send cmd once dump collected
0479  */
0480 enum iwl_fw_ini_trigger_apply_policy {
0481     IWL_FW_INI_APPLY_POLICY_MATCH_TIME_POINT    = BIT(0),
0482     IWL_FW_INI_APPLY_POLICY_MATCH_DATA      = BIT(1),
0483     IWL_FW_INI_APPLY_POLICY_OVERRIDE_REGIONS    = BIT(8),
0484     IWL_FW_INI_APPLY_POLICY_OVERRIDE_CFG        = BIT(9),
0485     IWL_FW_INI_APPLY_POLICY_OVERRIDE_DATA       = BIT(10),
0486     IWL_FW_INI_APPLY_POLICY_DUMP_COMPLETE_CMD   = BIT(16),
0487 };
0488 
0489 /**
0490  * enum iwl_fw_ini_trigger_reset_fw_policy - Determines how to handle reset
0491  *
0492  * @IWL_FW_INI_RESET_FW_MODE_NOTHING: do not stop FW and reload (default)
0493  * @IWL_FW_INI_RESET_FW_MODE_STOP_FW_ONLY: stop FW without reload FW
0494  * @IWL_FW_INI_RESET_FW_MODE_STOP_AND_RELOAD_FW: stop FW with reload FW
0495  */
0496 enum iwl_fw_ini_trigger_reset_fw_policy {
0497     IWL_FW_INI_RESET_FW_MODE_NOTHING = 0,
0498     IWL_FW_INI_RESET_FW_MODE_STOP_FW_ONLY,
0499     IWL_FW_INI_RESET_FW_MODE_STOP_AND_RELOAD_FW
0500 };
0501 
0502 /**
0503  * enum iwl_fw_ini_dump_policy - Determines how to handle dump based on enabled flags
0504  *
0505  * @IWL_FW_INI_DEBUG_DUMP_POLICY_NO_LIMIT: OS has no limit of dump size
0506  * @IWL_FW_INI_DEBUG_DUMP_POLICY_MAX_LIMIT_600KB: mini dump only 600KB region dump
0507  * @IWL_FW_IWL_DEBUG_DUMP_POLICY_MAX_LIMIT_5MB: mini dump 5MB size dump
0508  */
0509 enum iwl_fw_ini_dump_policy {
0510     IWL_FW_INI_DEBUG_DUMP_POLICY_NO_LIMIT           = BIT(0),
0511     IWL_FW_INI_DEBUG_DUMP_POLICY_MAX_LIMIT_600KB    = BIT(1),
0512     IWL_FW_IWL_DEBUG_DUMP_POLICY_MAX_LIMIT_5MB      = BIT(2),
0513 
0514 };
0515 
0516 /**
0517  * enum iwl_fw_ini_dump_type - Determines dump type based on size defined by FW.
0518  *
0519  * @IWL_FW_INI_DUMP_BRIEF : only dump the most important regions
0520  * @IWL_FW_INI_DEBUG_MEDIUM: dump more regions than "brief", but not all regions
0521  * @IWL_FW_INI_DUMP_VERBOSE : dump all regions
0522  */
0523 enum iwl_fw_ini_dump_type {
0524     IWL_FW_INI_DUMP_BRIEF,
0525     IWL_FW_INI_DUMP_MEDIUM,
0526     IWL_FW_INI_DUMP_VERBOSE,
0527 };
0528 #endif