/* SPDX-License-Identifier: ISC */ /* * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. * Copyright (c) 2022, 2024 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#ifndef _COREDUMP_H_ #define _COREDUMP_H_
#include"core.h"
#define ATH10K_FW_CRASH_DUMP_VERSION 1
/** * enum ath10k_fw_crash_dump_type - types of data in the dump file * @ATH10K_FW_CRASH_DUMP_REGISTERS: Register crash dump in binary format * @ATH10K_FW_CRASH_DUMP_CE_DATA: Copy Engine crash dump data * @ATH10K_FW_CRASH_DUMP_RAM_DATA: RAM crash dump data, contains multiple * struct ath10k_dump_ram_data_hdr * @ATH10K_FW_CRASH_DUMP_MAX: Maximum enumeration
*/ enum ath10k_fw_crash_dump_type {
ATH10K_FW_CRASH_DUMP_REGISTERS = 0,
ATH10K_FW_CRASH_DUMP_CE_DATA = 1,
/* length of payload data, not including this header */
__le32 length;
u8 data[];
};
/* magic number to fill the holes not copied due to sections in regions */ #define ATH10K_MAGIC_NOT_COPIED 0xAA
/* part of user space ABI */ enum ath10k_mem_region_type {
ATH10K_MEM_REGION_TYPE_REG = 1,
ATH10K_MEM_REGION_TYPE_DRAM = 2,
ATH10K_MEM_REGION_TYPE_AXI = 3,
ATH10K_MEM_REGION_TYPE_IRAM1 = 4,
ATH10K_MEM_REGION_TYPE_IRAM2 = 5,
ATH10K_MEM_REGION_TYPE_IOSRAM = 6,
ATH10K_MEM_REGION_TYPE_IOREG = 7,
ATH10K_MEM_REGION_TYPE_MSA = 8,
};
/* Define a section of the region which should be copied. As not all parts * of the memory is possible to copy, for example some of the registers can * be like that, sections can be used to define what is safe to copy. * * To minimize the size of the array, the list must obey the format: * '{start0,stop0},{start1,stop1},{start2,stop2}....' The values below must * also obey to 'start0 < stop0 < start1 < stop1 < start2 < ...', otherwise * we may encounter error in the dump processing.
*/ struct ath10k_mem_section {
u32 start;
u32 end;
};
/* One region of a memory layout. If the sections field is null entire * region is copied. If sections is non-null only the areas specified in * sections are copied and rest of the areas are filled with * ATH10K_MAGIC_NOT_COPIED.
*/ struct ath10k_mem_region { enum ath10k_mem_region_type type;
u32 start;
u32 len;
/* Contains the memory layout of a hardware version identified with the * hardware id, split into regions.
*/ struct ath10k_hw_mem_layout {
u32 hw_id;
u32 hw_rev; enum ath10k_bus bus;
struct { conststruct ath10k_mem_region *regions; int size;
} region_table;
};
/* FIXME: where to put this? */ externunsignedlong ath10k_coredump_mask;
#ifdef CONFIG_DEV_COREDUMP
int ath10k_coredump_submit(struct ath10k *ar); struct ath10k_fw_crash_data *ath10k_coredump_new(struct ath10k *ar); int ath10k_coredump_create(struct ath10k *ar); int ath10k_coredump_register(struct ath10k *ar); void ath10k_coredump_unregister(struct ath10k *ar); void ath10k_coredump_destroy(struct ath10k *ar);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.