1 /******************************************************************************
2  *
3  * This file is provided under a dual BSD/GPLv2 license.  When using or
4  * redistributing this file, you may do so under either license.
5  *
6  * GPL LICENSE SUMMARY
7  *
8  * Copyright (C) 2018 - 2019 Intel Corporation
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of version 2 of the GNU General Public License as
12  * published by the Free Software Foundation.
13  *
14  * This program is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * General Public License for more details.
18  *
19  * The full GNU General Public License is included in this distribution
20  * in the file called COPYING.
21  *
22  * Contact Information:
23  *  Intel Linux Wireless <linuxwifi@intel.com>
24  * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
25  *
26  * BSD LICENSE
27  *
28  * Copyright (C) 2018 - 2019 Intel Corporation
29  * All rights reserved.
30  *
31  * Redistribution and use in source and binary forms, with or without
32  * modification, are permitted provided that the following conditions
33  * are met:
34  *
35  *  * Redistributions of source code must retain the above copyright
36  *    notice, this list of conditions and the following disclaimer.
37  *  * Redistributions in binary form must reproduce the above copyright
38  *    notice, this list of conditions and the following disclaimer in
39  *    the documentation and/or other materials provided with the
40  *    distribution.
41  *  * Neither the name Intel Corporation nor the names of its
42  *    contributors may be used to endorse or promote products derived
43  *    from this software without specific prior written permission.
44  *
45  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
46  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
47  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
48  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
49  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
50  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
51  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
52  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
53  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
54  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
55  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
56  *
57  *****************************************************************************/
58 #ifndef __iwl_fw_dbg_tlv_h__
59 #define __iwl_fw_dbg_tlv_h__
60 
61 #include <linux/bitops.h>
62 
63 /**
64  * struct iwl_fw_ini_header: Common Header for all debug group TLV's structures
65  *
66  * @tlv_version: version info
67  * @apply_point: &enum iwl_fw_ini_apply_point
68  * @data: TLV data followed
69  */
70 struct iwl_fw_ini_header {
71 	__le32 tlv_version;
72 	__le32 apply_point;
73 	u8 data[];
74 } __packed; /* FW_DEBUG_TLV_HEADER_S */
75 
76 /**
77  * struct iwl_fw_ini_allocation_tlv - (IWL_UCODE_TLV_TYPE_BUFFER_ALLOCATION)
78  * buffer allocation TLV - for debug
79  *
80  * @iwl_fw_ini_header: header
81  * @allocation_id: &enum iwl_fw_ini_allocation_id - to bind allocation and hcmd
82  *	if needed (DBGC1/DBGC2/SDFX/...)
83  * @buffer_location: type of iwl_fw_ini_buffer_location
84  * @size: size in bytes
85  * @max_fragments: the maximum allowed fragmentation in the desired memory
86  *	allocation above
87  * @min_frag_size: the minimum allowed fragmentation size in bytes
88  */
89 struct iwl_fw_ini_allocation_tlv {
90 	struct iwl_fw_ini_header header;
91 	__le32 allocation_id;
92 	__le32 buffer_location;
93 	__le32 size;
94 	__le32 max_fragments;
95 	__le32 min_frag_size;
96 } __packed; /* FW_DEBUG_TLV_BUFFER_ALLOCATION_TLV_S_VER_1 */
97 
98 /**
99  * enum iwl_fw_ini_dbg_domain - debug domains
100  * allows to send host cmd or collect memory region if a given domain is enabled
101  *
102  * @IWL_FW_INI_DBG_DOMAIN_ALWAYS_ON: the default domain, always on
103  * @IWL_FW_INI_DBG_DOMAIN_REPORT_PS: power save domain
104  */
105 enum iwl_fw_ini_dbg_domain {
106 	IWL_FW_INI_DBG_DOMAIN_ALWAYS_ON = 0,
107 	IWL_FW_INI_DBG_DOMAIN_REPORT_PS,
108 }; /* FW_DEBUG_TLV_DOMAIN_API_E_VER_1 */
109 
110 /**
111  * struct iwl_fw_ini_hcmd
112  *
113  * @id: the debug configuration command type for instance: 0xf6 / 0xf5 / DHC
114  * @group: the desired cmd group
115  * @reserved: to align to FW struct
116  * @data: all of the relevant command data to be sent
117  */
118 struct iwl_fw_ini_hcmd {
119 	u8 id;
120 	u8 group;
121 	__le16 reserved;
122 	u8 data[0];
123 } __packed; /* FW_DEBUG_TLV_HCMD_DATA_API_S_VER_1 */
124 
125 /**
126  * struct iwl_fw_ini_hcmd_tlv - (IWL_UCODE_TLV_TYPE_HCMD)
127  * Generic Host command pass through TLV
128  *
129  * @header: header
130  * @domain: send command only if the specific domain is enabled
131  *	&enum iwl_fw_ini_dbg_domain
132  * @period_msec: period in which the hcmd will be sent to FW. Measured in msec
133  *	(0 = one time command).
134  * @hcmd: a variable length host-command to be sent to apply the configuration.
135  */
136 struct iwl_fw_ini_hcmd_tlv {
137 	struct iwl_fw_ini_header header;
138 	__le32 domain;
139 	__le32 period_msec;
140 	struct iwl_fw_ini_hcmd hcmd;
141 } __packed; /* FW_DEBUG_TLV_HCMD_API_S_VER_1 */
142 
143 #define IWL_FW_INI_MAX_REGION_ID	64
144 #define IWL_FW_INI_MAX_NAME		32
145 
146 /**
147  * struct iwl_fw_ini_region_cfg_dhc - defines dhc response to dump.
148  *
149  * @id_and_grp: id and group of dhc response.
150  * @desc: dhc response descriptor.
151  */
152 struct iwl_fw_ini_region_cfg_dhc {
153 	__le32 id_and_grp;
154 	__le32 desc;
155 } __packed; /* FW_DEBUG_TLV_REGION_DHC_API_S_VER_1 */
156 
157 /**
158  * struct iwl_fw_ini_region_cfg_internal - meta data of internal memory region
159  *
160  * @num_of_range: the amount of ranges in the region
161  * @range_data_size: size of the data to read per range, in bytes.
162  */
163 struct iwl_fw_ini_region_cfg_internal {
164 	__le32 num_of_ranges;
165 	__le32 range_data_size;
166 } __packed; /* FW_DEBUG_TLV_REGION_NIC_INTERNAL_RANGES_S */
167 
168 /**
169  * struct iwl_fw_ini_region_cfg_fifos - meta data of fifos region
170  *
171  * @fid1: fifo id 1 - bitmap of lmac tx/rx fifos to include in the region
172  * @fid2: fifo id 2 - bitmap of umac rx fifos to include in the region.
173  *	It is unused for tx.
174  * @num_of_registers: number of prph registers in the region, each register is
175  *	4 bytes size.
176  * @header_only: none zero value indicates that this region does not include
177  *	fifo data and includes only the given registers.
178  */
179 struct iwl_fw_ini_region_cfg_fifos {
180 	__le32 fid1;
181 	__le32 fid2;
182 	__le32 num_of_registers;
183 	__le32 header_only;
184 } __packed; /* FW_DEBUG_TLV_REGION_FIFOS_S */
185 
186 /**
187  * struct iwl_fw_ini_region_cfg
188  *
189  * @region_id: ID of this dump configuration
190  * @region_type: &enum iwl_fw_ini_region_type
191  * @domain: dump this region only if the specific domain is enabled
192  *	&enum iwl_fw_ini_dbg_domain
193  * @name_len: name length
194  * @name: file name to use for this region
195  * @internal: used in case the region uses internal memory.
196  * @allocation_id: For DRAM type field substitutes for allocation_id
197  * @fifos: used in case of fifos region.
198  * @dhc_desc: dhc response descriptor.
199  * @notif_id_and_grp: dump this region only if the specific notification
200  *	occurred.
201  * @offset: offset to use for each memory base address
202  * @start_addr: array of addresses.
203  */
204 struct iwl_fw_ini_region_cfg {
205 	__le32 region_id;
206 	__le32 region_type;
207 	__le32 domain;
208 	__le32 name_len;
209 	u8 name[IWL_FW_INI_MAX_NAME];
210 	union {
211 		struct iwl_fw_ini_region_cfg_internal internal;
212 		__le32 allocation_id;
213 		struct iwl_fw_ini_region_cfg_fifos fifos;
214 		struct iwl_fw_ini_region_cfg_dhc dhc_desc;
215 		__le32 notif_id_and_grp;
216 	}; /* FW_DEBUG_TLV_REGION_EXT_INT_PARAMS_API_U_VER_1 */
217 	__le32 offset;
218 	__le32 start_addr[];
219 } __packed; /* FW_DEBUG_TLV_REGION_CONFIG_API_S_VER_1 */
220 
221 /**
222  * struct iwl_fw_ini_region_tlv - (IWL_UCODE_TLV_TYPE_REGIONS)
223  * defines memory regions to dump
224  *
225  * @header: header
226  * @num_regions: how many different region section and IDs are coming next
227  * @region_config: list of dump configurations
228  */
229 struct iwl_fw_ini_region_tlv {
230 	struct iwl_fw_ini_header header;
231 	__le32 num_regions;
232 	struct iwl_fw_ini_region_cfg region_config[];
233 } __packed; /* FW_DEBUG_TLV_REGIONS_API_S_VER_1 */
234 
235 /**
236  * struct iwl_fw_ini_trigger
237  *
238  * @trigger_id: &enum iwl_fw_ini_trigger_id
239  * @override_trig: determines how apply trigger in case a trigger with the
240  *	same id is already in use. Using the first 2 bytes:
241  *	Byte 0: if 0, override trigger configuration, otherwise use the
242  *	existing configuration.
243  *	Byte 1: if 0, override trigger regions, otherwise append regions to
244  *	existing trigger.
245  * @dump_delay: delay from trigger fire to dump, in usec
246  * @occurrences: max amount of times to be fired
247  * @reserved: to align to FW struct
248  * @ignore_consec: ignore consecutive triggers, in usec
249  * @force_restart: force FW restart
250  * @multi_dut: initiate debug dump data on several DUTs
251  * @trigger_data: generic data to be utilized per trigger
252  * @num_regions: number of dump regions defined for this trigger
253  * @data: region IDs
254  */
255 struct iwl_fw_ini_trigger {
256 	__le32 trigger_id;
257 	__le32 override_trig;
258 	__le32 dump_delay;
259 	__le32 occurrences;
260 	__le32 reserved;
261 	__le32 ignore_consec;
262 	__le32 force_restart;
263 	__le32 multi_dut;
264 	__le32 trigger_data;
265 	__le32 num_regions;
266 	__le32 data[];
267 } __packed; /* FW_TLV_DEBUG_TRIGGER_CONFIG_API_S_VER_1 */
268 
269 /**
270  * struct iwl_fw_ini_trigger_tlv - (IWL_UCODE_TLV_TYPE_TRIGGERS)
271  * Triggers that hold memory regions to dump in case a trigger fires
272  *
273  * @header: header
274  * @num_triggers: how many different triggers section and IDs are coming next
275  * @trigger_config: list of trigger configurations
276  */
277 struct iwl_fw_ini_trigger_tlv {
278 	struct iwl_fw_ini_header header;
279 	__le32 num_triggers;
280 	struct iwl_fw_ini_trigger trigger_config[];
281 } __packed; /* FW_TLV_DEBUG_TRIGGERS_API_S_VER_1 */
282 
283 #define IWL_FW_INI_MAX_IMG_NAME_LEN 32
284 #define IWL_FW_INI_MAX_DBG_CFG_NAME_LEN 64
285 
286 /**
287  * struct iwl_fw_ini_debug_info_tlv - (IWL_UCODE_TLV_TYPE_DEBUG_INFO)
288  *
289  * holds image name and debug configuration name
290  *
291  * @header: header
292  * @img_name_len: length of the image name string
293  * @img_name: image name string
294  * @dbg_cfg_name_len : length of the debug configuration name string
295  * @dbg_cfg_name: debug configuration name string
296  */
297 struct iwl_fw_ini_debug_info_tlv {
298 	struct iwl_fw_ini_header header;
299 	__le32 img_name_len;
300 	u8 img_name[IWL_FW_INI_MAX_IMG_NAME_LEN];
301 	__le32 dbg_cfg_name_len;
302 	u8 dbg_cfg_name[IWL_FW_INI_MAX_DBG_CFG_NAME_LEN];
303 } __packed; /* FW_DEBUG_TLV_INFO_API_S_VER_1 */
304 
305 /**
306  * enum iwl_fw_ini_trigger_id
307  *
308  * @IWL_FW_TRIGGER_ID_FW_ASSERT: FW assert
309  * @IWL_FW_TRIGGER_ID_FW_HW_ERROR: HW assert
310  * @IWL_FW_TRIGGER_ID_FW_TFD_Q_HANG: TFD queue hang
311  * @IWL_FW_TRIGGER_ID_FW_DEBUG_HOST_TRIGGER: FW debug notification
312  * @IWL_FW_TRIGGER_ID_FW_GENERIC_NOTIFICATION: FW generic notification
313  * @IWL_FW_TRIGGER_ID_USER_TRIGGER: User trigger
314  * @IWL_FW_TRIGGER_ID_PERIODIC_TRIGGER: triggers periodically
315  * @IWL_FW_TRIGGER_ID_HOST_PEER_CLIENT_INACTIVITY: peer inactivity
316  * @IWL_FW_TRIGGER_ID_HOST_TX_LATENCY_THRESHOLD_CROSSED: TX latency
317  *	threshold was crossed
318  * @IWL_FW_TRIGGER_ID_HOST_TX_RESPONSE_STATUS_FAILED: TX failed
319  * @IWL_FW_TRIGGER_ID_HOST_OS_REQ_DEAUTH_PEER: Deauth initiated by host
320  * @IWL_FW_TRIGGER_ID_HOST_STOP_GO_REQUEST: stop GO request
321  * @IWL_FW_TRIGGER_ID_HOST_START_GO_REQUEST: start GO request
322  * @IWL_FW_TRIGGER_ID_HOST_JOIN_GROUP_REQUEST: join P2P group request
323  * @IWL_FW_TRIGGER_ID_HOST_SCAN_START: scan started event
324  * @IWL_FW_TRIGGER_ID_HOST_SCAN_SUBMITTED: undefined
325  * @IWL_FW_TRIGGER_ID_HOST_SCAN_PARAMS: undefined
326  * @IWL_FW_TRIGGER_ID_HOST_CHECK_FOR_HANG: undefined
327  * @IWL_FW_TRIGGER_ID_HOST_BAR_RECEIVED: BAR frame was received
328  * @IWL_FW_TRIGGER_ID_HOST_AGG_TX_RESPONSE_STATUS_FAILED: agg TX failed
329  * @IWL_FW_TRIGGER_ID_HOST_EAPOL_TX_RESPONSE_FAILED: EAPOL TX failed
330  * @IWL_FW_TRIGGER_ID_HOST_FAKE_TX_RESPONSE_SUSPECTED: suspicious TX response
331  * @IWL_FW_TRIGGER_ID_HOST_AUTH_REQ_FROM_ASSOC_CLIENT: received suspicious auth
332  * @IWL_FW_TRIGGER_ID_HOST_ROAM_COMPLETE: roaming was completed
333  * @IWL_FW_TRIGGER_ID_HOST_AUTH_ASSOC_FAST_FAILED: fast assoc failed
334  * @IWL_FW_TRIGGER_ID_HOST_D3_START: D3 start
335  * @IWL_FW_TRIGGER_ID_HOST_D3_END: D3 end
336  * @IWL_FW_TRIGGER_ID_HOST_BSS_MISSED_BEACONS: missed beacon events
337  * @IWL_FW_TRIGGER_ID_HOST_P2P_CLIENT_MISSED_BEACONS: P2P missed beacon events
338  * @IWL_FW_TRIGGER_ID_HOST_PEER_CLIENT_TX_FAILURES:  undefined
339  * @IWL_FW_TRIGGER_ID_HOST_TX_WFD_ACTION_FRAME_FAILED: undefined
340  * @IWL_FW_TRIGGER_ID_HOST_AUTH_ASSOC_FAILED: authentication / association
341  *	failed
342  * @IWL_FW_TRIGGER_ID_HOST_SCAN_COMPLETE: scan complete event
343  * @IWL_FW_TRIGGER_ID_HOST_SCAN_ABORT: scan abort complete
344  * @IWL_FW_TRIGGER_ID_HOST_NIC_ALIVE: nic alive message was received
345  * @IWL_FW_TRIGGER_ID_HOST_CHANNEL_SWITCH_COMPLETE: CSA was completed
346  * @IWL_FW_TRIGGER_ID_NUM: number of trigger IDs
347  */
348 enum iwl_fw_ini_trigger_id {
349 	IWL_FW_TRIGGER_ID_INVALID				= 0,
350 
351 	/* Errors triggers */
352 	IWL_FW_TRIGGER_ID_FW_ASSERT				= 1,
353 	IWL_FW_TRIGGER_ID_FW_HW_ERROR				= 2,
354 	IWL_FW_TRIGGER_ID_FW_TFD_Q_HANG				= 3,
355 
356 	/* FW triggers */
357 	IWL_FW_TRIGGER_ID_FW_DEBUG_HOST_TRIGGER			= 4,
358 	IWL_FW_TRIGGER_ID_FW_GENERIC_NOTIFICATION		= 5,
359 
360 	/* User trigger */
361 	IWL_FW_TRIGGER_ID_USER_TRIGGER				= 6,
362 
363 	/* periodic uses the data field for the interval time */
364 	IWL_FW_TRIGGER_ID_PERIODIC_TRIGGER			= 7,
365 
366 	/* Host triggers */
367 	IWL_FW_TRIGGER_ID_HOST_PEER_CLIENT_INACTIVITY		= 8,
368 	IWL_FW_TRIGGER_ID_HOST_TX_LATENCY_THRESHOLD_CROSSED	= 9,
369 	IWL_FW_TRIGGER_ID_HOST_TX_RESPONSE_STATUS_FAILED	= 10,
370 	IWL_FW_TRIGGER_ID_HOST_OS_REQ_DEAUTH_PEER		= 11,
371 	IWL_FW_TRIGGER_ID_HOST_STOP_GO_REQUEST			= 12,
372 	IWL_FW_TRIGGER_ID_HOST_START_GO_REQUEST			= 13,
373 	IWL_FW_TRIGGER_ID_HOST_JOIN_GROUP_REQUEST		= 14,
374 	IWL_FW_TRIGGER_ID_HOST_SCAN_START			= 15,
375 	IWL_FW_TRIGGER_ID_HOST_SCAN_SUBMITTED			= 16,
376 	IWL_FW_TRIGGER_ID_HOST_SCAN_PARAMS			= 17,
377 	IWL_FW_TRIGGER_ID_HOST_CHECK_FOR_HANG			= 18,
378 	IWL_FW_TRIGGER_ID_HOST_BAR_RECEIVED			= 19,
379 	IWL_FW_TRIGGER_ID_HOST_AGG_TX_RESPONSE_STATUS_FAILED	= 20,
380 	IWL_FW_TRIGGER_ID_HOST_EAPOL_TX_RESPONSE_FAILED		= 21,
381 	IWL_FW_TRIGGER_ID_HOST_FAKE_TX_RESPONSE_SUSPECTED	= 22,
382 	IWL_FW_TRIGGER_ID_HOST_AUTH_REQ_FROM_ASSOC_CLIENT	= 23,
383 	IWL_FW_TRIGGER_ID_HOST_ROAM_COMPLETE			= 24,
384 	IWL_FW_TRIGGER_ID_HOST_AUTH_ASSOC_FAST_FAILED		= 25,
385 	IWL_FW_TRIGGER_ID_HOST_D3_START				= 26,
386 	IWL_FW_TRIGGER_ID_HOST_D3_END				= 27,
387 	IWL_FW_TRIGGER_ID_HOST_BSS_MISSED_BEACONS		= 28,
388 	IWL_FW_TRIGGER_ID_HOST_P2P_CLIENT_MISSED_BEACONS	= 29,
389 	IWL_FW_TRIGGER_ID_HOST_PEER_CLIENT_TX_FAILURES		= 30,
390 	IWL_FW_TRIGGER_ID_HOST_TX_WFD_ACTION_FRAME_FAILED	= 31,
391 	IWL_FW_TRIGGER_ID_HOST_AUTH_ASSOC_FAILED		= 32,
392 	IWL_FW_TRIGGER_ID_HOST_SCAN_COMPLETE			= 33,
393 	IWL_FW_TRIGGER_ID_HOST_SCAN_ABORT			= 34,
394 	IWL_FW_TRIGGER_ID_HOST_NIC_ALIVE			= 35,
395 	IWL_FW_TRIGGER_ID_HOST_CHANNEL_SWITCH_COMPLETE		= 36,
396 
397 	IWL_FW_TRIGGER_ID_NUM,
398 }; /* FW_DEBUG_TLV_TRIGGER_ID_E_VER_1 */
399 
400 /**
401  * enum iwl_fw_ini_allocation_id
402  *
403  * @IWL_FW_INI_ALLOCATION_INVALID: invalid
404  * @IWL_FW_INI_ALLOCATION_ID_DBGC1: allocation meant for DBGC1 configuration
405  * @IWL_FW_INI_ALLOCATION_ID_DBGC2: allocation meant for DBGC2 configuration
406  * @IWL_FW_INI_ALLOCATION_ID_DBGC3: allocation meant for DBGC3 configuration
407  * @IWL_FW_INI_ALLOCATION_ID_SDFX: for SDFX module
408  * @IWL_FW_INI_ALLOCATION_ID_FW_DUMP: used for crash and runtime dumps
409  * @IWL_FW_INI_ALLOCATION_ID_USER_DEFINED: for future user scenarios
410  * @IWL_FW_INI_ALLOCATION_NUM: number of allocation ids
411 */
412 enum iwl_fw_ini_allocation_id {
413 	IWL_FW_INI_ALLOCATION_INVALID,
414 	IWL_FW_INI_ALLOCATION_ID_DBGC1,
415 	IWL_FW_INI_ALLOCATION_ID_DBGC2,
416 	IWL_FW_INI_ALLOCATION_ID_DBGC3,
417 	IWL_FW_INI_ALLOCATION_ID_SDFX,
418 	IWL_FW_INI_ALLOCATION_ID_FW_DUMP,
419 	IWL_FW_INI_ALLOCATION_ID_USER_DEFINED,
420 	IWL_FW_INI_ALLOCATION_NUM,
421 }; /* FW_DEBUG_TLV_ALLOCATION_ID_E_VER_1 */
422 
423 /**
424  * enum iwl_fw_ini_buffer_location
425  *
426  * @IWL_FW_INI_LOCATION_INVALID: invalid
427  * @IWL_FW_INI_LOCATION_SRAM_PATH: SRAM location
428  * @IWL_FW_INI_LOCATION_DRAM_PATH: DRAM location
429  * @IWL_FW_INI_LOCATION_NPK_PATH: NPK location
430  */
431 enum iwl_fw_ini_buffer_location {
432 	IWL_FW_INI_LOCATION_INVALID,
433 	IWL_FW_INI_LOCATION_SRAM_PATH,
434 	IWL_FW_INI_LOCATION_DRAM_PATH,
435 	IWL_FW_INI_LOCATION_NPK_PATH,
436 }; /* FW_DEBUG_TLV_BUFFER_LOCATION_E_VER_1 */
437 
438 /**
439  * enum iwl_fw_ini_debug_flow
440  *
441  * @IWL_FW_INI_DEBUG_INVALID: invalid
442  * @IWL_FW_INI_DEBUG_DBTR_FLOW: undefined
443  * @IWL_FW_INI_DEBUG_TB2DTF_FLOW: undefined
444  */
445 enum iwl_fw_ini_debug_flow {
446 	IWL_FW_INI_DEBUG_INVALID,
447 	IWL_FW_INI_DEBUG_DBTR_FLOW,
448 	IWL_FW_INI_DEBUG_TB2DTF_FLOW,
449 }; /* FW_DEBUG_TLV_FLOW_E_VER_1 */
450 
451 /**
452  * enum iwl_fw_ini_region_type
453  *
454  * @IWL_FW_INI_REGION_INVALID: invalid
455  * @IWL_FW_INI_REGION_DEVICE_MEMORY: device internal memory
456  * @IWL_FW_INI_REGION_PERIPHERY_MAC: periphery registers of MAC
457  * @IWL_FW_INI_REGION_PERIPHERY_PHY: periphery registers of PHY
458  * @IWL_FW_INI_REGION_PERIPHERY_AUX: periphery registers of AUX
459  * @IWL_FW_INI_REGION_DRAM_BUFFER: DRAM buffer
460  * @IWL_FW_INI_REGION_DRAM_IMR: IMR memory
461  * @IWL_FW_INI_REGION_INTERNAL_BUFFER: undefined
462  * @IWL_FW_INI_REGION_TXF: TX fifos
463  * @IWL_FW_INI_REGION_RXF: RX fifo
464  * @IWL_FW_INI_REGION_PAGING: paging memory
465  * @IWL_FW_INI_REGION_CSR: CSR registers
466  * @IWL_FW_INI_REGION_NOTIFICATION: FW notification data
467  * @IWL_FW_INI_REGION_DHC: dhc response to dump
468  * @IWL_FW_INI_REGION_LMAC_ERROR_TABLE: lmac error table
469  * @IWL_FW_INI_REGION_UMAC_ERROR_TABLE: umac error table
470  * @IWL_FW_INI_REGION_NUM: number of region types
471  */
472 enum iwl_fw_ini_region_type {
473 	IWL_FW_INI_REGION_INVALID,
474 	IWL_FW_INI_REGION_DEVICE_MEMORY,
475 	IWL_FW_INI_REGION_PERIPHERY_MAC,
476 	IWL_FW_INI_REGION_PERIPHERY_PHY,
477 	IWL_FW_INI_REGION_PERIPHERY_AUX,
478 	IWL_FW_INI_REGION_DRAM_BUFFER,
479 	IWL_FW_INI_REGION_DRAM_IMR,
480 	IWL_FW_INI_REGION_INTERNAL_BUFFER,
481 	IWL_FW_INI_REGION_TXF,
482 	IWL_FW_INI_REGION_RXF,
483 	IWL_FW_INI_REGION_PAGING,
484 	IWL_FW_INI_REGION_CSR,
485 	IWL_FW_INI_REGION_NOTIFICATION,
486 	IWL_FW_INI_REGION_DHC,
487 	IWL_FW_INI_REGION_LMAC_ERROR_TABLE,
488 	IWL_FW_INI_REGION_UMAC_ERROR_TABLE,
489 	IWL_FW_INI_REGION_NUM
490 }; /* FW_DEBUG_TLV_REGION_TYPE_E_VER_1 */
491 
492 /**
493  * enum iwl_fw_ini_time_point
494  *
495  * Hard coded time points in which the driver can send hcmd or perform dump
496  * collection
497  *
498  * @IWL_FW_INI_TIME_POINT_EARLY: pre loading the FW
499  * @IWL_FW_INI_TIME_POINT_AFTER_ALIVE: first cmd from host after alive notif
500  * @IWL_FW_INI_TIME_POINT_POST_INIT: last cmd in series of init sequence
501  * @IWL_FW_INI_TIME_POINT_FW_ASSERT: FW assert
502  * @IWL_FW_INI_TIME_POINT_FW_HW_ERROR: FW HW error
503  * @IWL_FW_INI_TIME_POINT_FW_TFD_Q_HANG: TFD queue hang
504  * @IWL_FW_INI_TIME_POINT_FW_DHC_NOTIFOCATION: DHC cmd response and notif
505  * @IWL_FW_INI_TIME_POINT_FW_RSP_OR_NOTIF: FW response or notification.
506  *	data field holds id and group
507  * @IWL_FW_INI_TIME_POINT_USER_TRIGGER: user trigger time point
508  * @IWL_FW_INI_TIME_POINT_PERIODIC: periodic timepoint that fires in constant
509  *	intervals. data field holds the interval time in msec
510  * @IWL_FW_INI_TIME_POINT_WDG_TIMEOUT: watchdog timeout
511  * @IWL_FW_INI_TIME_POINT_HOST_ASSERT: Unused
512  * @IWL_FW_INI_TIME_POINT_HOST_ALIVE_TIMEOUT: alive timeout
513  * @IWL_FW_INI_TIME_POINT_HOST_DEVICE_ENABLE: device enable
514  * @IWL_FW_INI_TIME_POINT_HOST_DEVICE_DISABLE: device disable
515  * @IWL_FW_INI_TIME_POINT_HOST_D3_START: D3 start
516  * @IWL_FW_INI_TIME_POINT_HOST_D3_END: D3 end
517  * @IWL_FW_INI_TIME_POINT_MISSED_BEACONS: missed beacons
518  * @IWL_FW_INI_TIME_POINT_ASSOC_FAILED: association failure
519  * @IWL_FW_INI_TIME_POINT_TX_FAILED: Tx frame failed
520  * @IWL_FW_INI_TIME_POINT_TX_WFD_ACTION_FRAME_FAILED: wifi direct action
521  *	frame failed
522  * @IWL_FW_INI_TIME_POINT_TX_LATENCY_THRESHOLD: Tx latency threshold
523  * @IWL_FW_INI_TIME_POINT_HANG_OCCURRED: hang occurred
524  * @IWL_FW_INI_TIME_POINT_EAPOL_FAILED: EAPOL failed
525  * @IWL_FW_INI_TIME_POINT_FAKE_TX: fake Tx
526  * @IWL_FW_INI_TIME_POINT_DEASSOC: de association
527  * @IWL_FW_INI_TIME_POINT_NUM: number of time points
528  */
529 enum iwl_fw_ini_time_point {
530 	IWL_FW_INI_TIME_POINT_INVALID,
531 	IWL_FW_INI_TIME_POINT_EARLY,
532 	IWL_FW_INI_TIME_POINT_AFTER_ALIVE,
533 	IWL_FW_INI_TIME_POINT_POST_INIT,
534 	IWL_FW_INI_TIME_POINT_FW_ASSERT,
535 	IWL_FW_INI_TIME_POINT_FW_HW_ERROR,
536 	IWL_FW_INI_TIME_POINT_FW_TFD_Q_HANG,
537 	IWL_FW_INI_TIME_POINT_FW_DHC_NOTIFOCATION,
538 	IWL_FW_INI_TIME_POINT_FW_RSP_OR_NOTIF,
539 	IWL_FW_INI_TIME_POINT_USER_TRIGGER,
540 	IWL_FW_INI_TIME_POINT_PERIODIC,
541 	IWL_FW_INI_TIME_POINT_WDG_TIMEOUT,
542 	IWL_FW_INI_TIME_POINT_HOST_ASSERT,
543 	IWL_FW_INI_TIME_POINT_HOST_ALIVE_TIMEOUT,
544 	IWL_FW_INI_TIME_POINT_HOST_DEVICE_ENABLE,
545 	IWL_FW_INI_TIME_POINT_HOST_DEVICE_DISABLE,
546 	IWL_FW_INI_TIME_POINT_HOST_D3_START,
547 	IWL_FW_INI_TIME_POINT_HOST_D3_END,
548 	IWL_FW_INI_TIME_POINT_MISSED_BEACONS,
549 	IWL_FW_INI_TIME_POINT_ASSOC_FAILED,
550 	IWL_FW_INI_TIME_POINT_TX_FAILED,
551 	IWL_FW_INI_TIME_POINT_TX_WFD_ACTION_FRAME_FAILED,
552 	IWL_FW_INI_TIME_POINT_TX_LATENCY_THRESHOLD,
553 	IWL_FW_INI_TIME_POINT_HANG_OCCURRED,
554 	IWL_FW_INI_TIME_POINT_EAPOL_FAILED,
555 	IWL_FW_INI_TIME_POINT_FAKE_TX,
556 	IWL_FW_INI_TIME_POINT_DEASSOC,
557 	IWL_FW_INI_TIME_POINT_NUM,
558 }; /* FW_TLV_DEBUG_TIME_POINT_API_E */
559 
560 #endif
561