| .. | .. |
|---|
| 94 | 94 | return crashing_cpu >= 0; |
|---|
| 95 | 95 | } |
|---|
| 96 | 96 | |
|---|
| 97 | +void relocate_new_kernel(unsigned long indirection_page, unsigned long reboot_code_buffer, |
|---|
| 98 | + unsigned long start_address) __noreturn; |
|---|
| 99 | + |
|---|
| 97 | 100 | #ifdef CONFIG_KEXEC_FILE |
|---|
| 98 | 101 | extern const struct kexec_file_ops kexec_elf64_ops; |
|---|
| 99 | 102 | |
|---|
| 100 | | -#ifdef CONFIG_IMA_KEXEC |
|---|
| 101 | 103 | #define ARCH_HAS_KIMAGE_ARCH |
|---|
| 102 | 104 | |
|---|
| 103 | 105 | struct kimage_arch { |
|---|
| 106 | + struct crash_mem *exclude_ranges; |
|---|
| 107 | + |
|---|
| 108 | + unsigned long backup_start; |
|---|
| 109 | + void *backup_buf; |
|---|
| 110 | + |
|---|
| 111 | + unsigned long elfcorehdr_addr; |
|---|
| 112 | + unsigned long elf_headers_sz; |
|---|
| 113 | + void *elf_headers; |
|---|
| 114 | + |
|---|
| 115 | +#ifdef CONFIG_IMA_KEXEC |
|---|
| 104 | 116 | phys_addr_t ima_buffer_addr; |
|---|
| 105 | 117 | size_t ima_buffer_size; |
|---|
| 106 | | -}; |
|---|
| 107 | 118 | #endif |
|---|
| 119 | +}; |
|---|
| 108 | 120 | |
|---|
| 121 | +char *setup_kdump_cmdline(struct kimage *image, char *cmdline, |
|---|
| 122 | + unsigned long cmdline_len); |
|---|
| 109 | 123 | int setup_purgatory(struct kimage *image, const void *slave_code, |
|---|
| 110 | 124 | const void *fdt, unsigned long kernel_load_addr, |
|---|
| 111 | 125 | unsigned long fdt_load_addr); |
|---|
| .. | .. |
|---|
| 113 | 127 | unsigned long initrd_load_addr, unsigned long initrd_len, |
|---|
| 114 | 128 | const char *cmdline); |
|---|
| 115 | 129 | int delete_fdt_mem_rsv(void *fdt, unsigned long start, unsigned long size); |
|---|
| 130 | + |
|---|
| 131 | +#ifdef CONFIG_PPC64 |
|---|
| 132 | +struct kexec_buf; |
|---|
| 133 | + |
|---|
| 134 | +int load_crashdump_segments_ppc64(struct kimage *image, |
|---|
| 135 | + struct kexec_buf *kbuf); |
|---|
| 136 | +int setup_purgatory_ppc64(struct kimage *image, const void *slave_code, |
|---|
| 137 | + const void *fdt, unsigned long kernel_load_addr, |
|---|
| 138 | + unsigned long fdt_load_addr); |
|---|
| 139 | +unsigned int kexec_fdt_totalsize_ppc64(struct kimage *image); |
|---|
| 140 | +int setup_new_fdt_ppc64(const struct kimage *image, void *fdt, |
|---|
| 141 | + unsigned long initrd_load_addr, |
|---|
| 142 | + unsigned long initrd_len, const char *cmdline); |
|---|
| 143 | +#endif /* CONFIG_PPC64 */ |
|---|
| 144 | + |
|---|
| 116 | 145 | #endif /* CONFIG_KEXEC_FILE */ |
|---|
| 117 | 146 | |
|---|
| 118 | 147 | #else /* !CONFIG_KEXEC_CORE */ |
|---|
| .. | .. |
|---|
| 147 | 176 | } |
|---|
| 148 | 177 | |
|---|
| 149 | 178 | #endif /* CONFIG_KEXEC_CORE */ |
|---|
| 179 | + |
|---|
| 180 | +#ifdef CONFIG_PPC_BOOK3S_64 |
|---|
| 181 | +#include <asm/book3s/64/kexec.h> |
|---|
| 182 | +#endif |
|---|
| 183 | + |
|---|
| 184 | +#ifndef reset_sprs |
|---|
| 185 | +#define reset_sprs reset_sprs |
|---|
| 186 | +static inline void reset_sprs(void) |
|---|
| 187 | +{ |
|---|
| 188 | +} |
|---|
| 189 | +#endif |
|---|
| 190 | + |
|---|
| 150 | 191 | #endif /* ! __ASSEMBLY__ */ |
|---|
| 151 | 192 | #endif /* __KERNEL__ */ |
|---|
| 152 | 193 | #endif /* _ASM_POWERPC_KEXEC_H */ |
|---|