22 #ifndef __PPC64_FA_DUMP_H__
23 #define __PPC64_FA_DUMP_H__
34 #define RMA_END (ppc64_rma_size)
43 #define MIN_BOOT_MEM (((RMA_END < (0x1UL << 28)) ? (0x1UL << 28) : RMA_END) \
46 #define memblock_num_regions(memblock_type) (memblock.memblock_type.cnt)
48 #ifndef ELF_CORE_EFLAGS
49 #define ELF_CORE_EFLAGS 0
53 #define FADUMP_CPU_STATE_DATA 0x0001
54 #define FADUMP_HPTE_REGION 0x0002
55 #define FADUMP_REAL_MODE_REGION 0x0011
58 #define FADUMP_REQUEST_FLAG 0x00000001
61 #define FADUMP_REGISTER 1
62 #define FADUMP_UNREGISTER 2
63 #define FADUMP_INVALIDATE 3
66 #define FADUMP_ERROR_FLAG 0x2000
68 #define FADUMP_CPU_ID_MASK ((1UL << 32) - 1)
70 #define CPU_UNKNOWN (~((u32)0))
73 #define SKIP_TO_NEXT_CPU(reg_entry) \
75 while (reg_entry->reg_id != REG_ID("CPUEND")) \
81 struct fadump_section {
88 u64 destination_address;
92 struct fadump_section_header {
93 u32 dump_format_version;
94 u16 dump_num_sections;
96 u32 offset_first_dump_section;
102 u32 dd_offset_disk_path;
114 struct fadump_mem_struct {
115 struct fadump_section_header
header;
118 struct fadump_section cpu_state_data;
119 struct fadump_section hpte_region;
120 struct fadump_section rmr_region;
125 unsigned long cpu_state_data_size;
126 unsigned long hpte_region_size;
127 unsigned long boot_memory_size;
128 unsigned long reserve_dump_area_start;
129 unsigned long reserve_dump_area_size;
131 unsigned long reserve_bootvar;
133 unsigned long fadumphdr_addr;
134 unsigned long cpu_notes_buf;
135 unsigned long cpu_notes_buf_size;
137 int ibm_configure_kernel_dump;
139 unsigned long fadump_enabled:1;
140 unsigned long fadump_supported:1;
141 unsigned long dump_active:1;
142 unsigned long dump_registered:1;
151 static inline u64 str_to_u64(
const char *
str)
156 for (i = 0; i <
sizeof(
val); i++)
157 val = (*str) ? (val << 8) | *str++ : val << 8;
160 #define STR_TO_HEX(x) str_to_u64(x)
161 #define REG_ID(x) str_to_u64(x)
163 #define FADUMP_CRASH_INFO_MAGIC STR_TO_HEX("FADMPINF")
164 #define REGSAVE_AREA_MAGIC STR_TO_HEX("REGSAVE")
176 struct fadump_reg_save_area_header {
183 struct fadump_reg_entry {
189 struct fadump_crash_info_header {
198 #define INIT_CRASHMEM_RANGES (INIT_MEMBLOCK_REGIONS + 2)
200 struct fad_crash_memory_ranges {
201 unsigned long long base;
202 unsigned long long size;
206 const char *uname,
int depth,
void *
data);
213 extern void vmcore_cleanup(
void);