forked from makedumpfile/makedumpfile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sadump_info.h
165 lines (132 loc) · 3.22 KB
/
sadump_info.h
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
/*
* sadump_info.h
*
* Created by: HATAYAMA, Daisuke <[email protected]>
*
* Copyright (C) 2011 FUJITSU LIMITED
* Copyright (C) 2011 NEC Corporation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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 _SADUMP_INFO_H
#define _SADUMP_INFO_H
#include "makedumpfile.h"
#ifdef __x86_64__
int sadump_virt_phys_base(void);
#else
static inline int sadump_virt_phys_base(void)
{
return TRUE;
}
#endif
#if defined(__x86__) || defined(__x86_64__)
int check_and_get_sadump_header_info(char *filename);
int sadump_copy_1st_bitmap_from_memory(void);
int sadump_initialize_bitmap_memory(void);
int sadump_num_online_cpus(void);
int sadump_set_timestamp(struct timeval *ts);
mdf_pfn_t sadump_get_max_mapnr(void);
int readpage_sadump(unsigned long long paddr, void *bufptr);
int sadump_check_debug_info(void);
int sadump_generate_vmcoreinfo_from_vmlinux(size_t *vmcoreinfo_size);
int sadump_generate_elf_note_from_dumpfile(void);
int sadump_copy_1st_bitmap_from_memory(void);
int sadump_add_diskset_info(char *name_memory);
int sadump_read_elf_note(char *buf, size_t size_note);
long sadump_page_size(void);
char *sadump_head_disk_name_memory(void);
char *sadump_format_type_name(void);
void free_sadump_info(void);
void sadump_kdump_backup_region_init(void);
static inline int sadump_is_supported_arch(void)
{
return TRUE;
}
#else
static inline int check_and_get_sadump_header_info(char *filename)
{
info->flag_sadump = SADUMP_UNKNOWN;
DEBUG_MSG("sadump: unsupported architecture\n");
return TRUE;
}
static inline int sadump_copy_1st_bitmap_from_memory(void)
{
return FALSE;
}
static inline int sadump_initialize_bitmap_memory(void)
{
return FALSE;
}
static inline int sadump_num_online_cpus(void)
{
return 0;
}
static inline int sadump_set_timestamp(struct timeval *ts)
{
return FALSE;
}
static inline mdf_pfn_t sadump_get_max_mapnr(void)
{
return 0;
}
static inline int
readpage_sadump(unsigned long long paddr, void *bufptr)
{
return FALSE;
}
static inline int sadump_check_debug_info(void)
{
return FALSE;
}
static inline int
sadump_generate_vmcoreinfo_from_vmlinux(size_t *vmcoreinfo_size)
{
return FALSE;
}
static inline int sadump_generate_elf_note_from_dumpfile(void)
{
return FALSE;
}
static inline int sadump_add_diskset_info(char *name_memory)
{
return TRUE;
}
static inline int sadump_read_elf_note(char *buf, size_t size_note)
{
return FALSE;
}
static inline long sadump_page_size(void)
{
return 0;
}
static inline char *
sadump_head_disk_name_memory(void)
{
return NULL;
}
static inline char *sadump_format_type_name(void)
{
return "";
}
static inline void free_sadump_info(void)
{
return;
}
static inline int sadump_is_supported_arch(void)
{
return FALSE;
}
static inline void sadump_kdump_backup_region_init(void)
{
return;
}
#endif
#endif /* _SADUMP_INFO_H */