Path: blob/main/sys/contrib/dev/athk/ath12k/coredump.h
178703 views
/* SPDX-License-Identifier: BSD-3-Clause-Clear */1/*2* Copyright (c) 2020 The Linux Foundation. All rights reserved.3* Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.4*/5#ifndef _ATH12K_COREDUMP_H_6#define _ATH12K_COREDUMP_H_78#define ATH12K_FW_CRASH_DUMP_V2 2910enum ath12k_fw_crash_dump_type {11FW_CRASH_DUMP_PAGING_DATA,12FW_CRASH_DUMP_RDDM_DATA,13FW_CRASH_DUMP_REMOTE_MEM_DATA,14FW_CRASH_DUMP_PAGEABLE_DATA,15FW_CRASH_DUMP_M3_DUMP,16FW_CRASH_DUMP_NONE,17FW_CRASH_DUMP_MLO_GLOBAL_DATA,1819/* keep last */20FW_CRASH_DUMP_TYPE_MAX,21};2223#define COREDUMP_TLV_HDR_SIZE 82425struct ath12k_tlv_dump_data {26/* see ath11k_fw_crash_dump_type above */27__le32 type;2829/* in bytes */30__le32 tlv_len;3132/* pad to 32-bit boundaries as needed */33u8 tlv_data[];34} __packed;3536struct ath12k_dump_file_data {37/* "ATH12K-FW-DUMP" */38char df_magic[16];39/* total dump len in bytes */40__le32 len;41/* file dump version */42__le32 version;43/* pci device id */44__le32 chip_id;45/* qrtr instance id */46__le32 qrtr_id;47/* pci domain id */48__le32 bus_id;49guid_t guid;50/* time-of-day stamp */51__le64 tv_sec;52/* time-of-day stamp, nano-seconds */53__le64 tv_nsec;54/* room for growth w/out changing binary format */55u8 unused[128];56u8 data[];57} __packed;5859#ifdef CONFIG_ATH12K_COREDUMP60enum ath12k_fw_crash_dump_type ath12k_coredump_get_dump_type61(enum ath12k_qmi_target_mem type);62void ath12k_coredump_upload(struct work_struct *work);63void ath12k_coredump_collect(struct ath12k_base *ab);64#else65static inline enum ath12k_fw_crash_dump_type ath12k_coredump_get_dump_type66(enum ath12k_qmi_target_mem type)67{68return FW_CRASH_DUMP_TYPE_MAX;69}7071static inline void ath12k_coredump_upload(struct work_struct *work)72{73}7475static inline void ath12k_coredump_collect(struct ath12k_base *ab)76{77}78#endif7980#endif818283