diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2017-04-21 09:41:33 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-04-21 09:41:32 -0700 |
| commit | c571b68a7c4e2d54728890fc3c1d3c0c849f33af (patch) | |
| tree | b54bef020e24e8e35a8ae1336509759d9889d482 /include | |
| parent | c30ff10a7032bf627b8dcad73492cdc081d93b09 (diff) | |
| parent | 3906d34c64e54e0656f23a4ec93062c6d872b4bc (diff) | |
Merge "soc: qcom: Add Minidump support"
Diffstat (limited to 'include')
| -rw-r--r-- | include/soc/qcom/minidump.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/include/soc/qcom/minidump.h b/include/soc/qcom/minidump.h new file mode 100644 index 000000000000..9d993a17fb89 --- /dev/null +++ b/include/soc/qcom/minidump.h @@ -0,0 +1,48 @@ +/* Copyright (c) 2017 The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef __MINIDUMP_H +#define __MINIDUMP_H + +#define MAX_NAME_LENGTH 16 +/* md_region - Minidump table entry + * @name: Entry name, Minidump will dump binary with this name. + * @id: Entry ID, used only for SDI dumps. + * @virt_addr: Address of the entry. + * @phys_addr: Physical address of the entry to dump. + * @size: Number of byte to dump from @address location + * it should be 4 byte aligned. + */ +struct md_region { + char name[MAX_NAME_LENGTH]; + u32 id; + u64 virt_addr; + u64 phys_addr; + u64 size; +}; + +/* Register an entry in Minidump table + * Returns: + * Zero: on successful addition + * Negetive error number on failures + */ +#ifdef CONFIG_QCOM_MINIDUMP +extern int msm_minidump_add_region(const struct md_region *entry); +extern bool msm_minidump_enabled(void); +#else +static inline int msm_minidump_add_region(const struct md_region *entry) +{ + return -ENODEV; +} +static inline bool msm_minidump_enabled(void) { return false; } +#endif +#endif |
