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