Path: blob/main/sys/contrib/dev/athk/ath11k/coredump.h
96339 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 _ATH11K_COREDUMP_H_6#define _ATH11K_COREDUMP_H_78#if defined(__FreeBSD__)9#include <linux/uuid.h>10#endif1112#define ATH11K_FW_CRASH_DUMP_V2 21314enum ath11k_fw_crash_dump_type {15FW_CRASH_DUMP_PAGING_DATA,16FW_CRASH_DUMP_RDDM_DATA,17FW_CRASH_DUMP_REMOTE_MEM_DATA,18FW_CRASH_DUMP_PAGEABLE_DATA,19FW_CRASH_DUMP_M3_DUMP,20FW_CRASH_DUMP_NONE,2122/* keep last */23FW_CRASH_DUMP_TYPE_MAX,24};2526#define COREDUMP_TLV_HDR_SIZE 82728struct ath11k_tlv_dump_data {29/* see ath11k_fw_crash_dump_type above */30__le32 type;3132/* in bytes */33__le32 tlv_len;3435/* pad to 32-bit boundaries as needed */36u8 tlv_data[];37} __packed;3839struct ath11k_dump_file_data {40/* "ATH11K-FW-DUMP" */41char df_magic[16];42/* total dump len in bytes */43__le32 len;44/* file dump version */45__le32 version;46/* pci device id */47__le32 chip_id;48/* qrtr instance id */49__le32 qrtr_id;50/* pci domain id */51__le32 bus_id;52guid_t guid;53/* time-of-day stamp */54__le64 tv_sec;55/* time-of-day stamp, nano-seconds */56__le64 tv_nsec;57/* room for growth w/out changing binary format */58u8 unused[128];59u8 data[];60} __packed;6162#ifdef CONFIG_DEV_COREDUMP63enum ath11k_fw_crash_dump_type ath11k_coredump_get_dump_type(int type);64void ath11k_coredump_upload(struct work_struct *work);65void ath11k_coredump_collect(struct ath11k_base *ab);66#else67static inline enum68ath11k_fw_crash_dump_type ath11k_coredump_get_dump_type(int type)69{70return FW_CRASH_DUMP_TYPE_MAX;71}7273static inline void ath11k_coredump_upload(struct work_struct *work)74{75}7677static inline void ath11k_coredump_collect(struct ath11k_base *ab)78{79}80#endif8182#endif838485