blob: 2db61a40e2cc5a2301276cfd316c9f6f72c2e6ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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 minidump_enabled;
#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
|