summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/kexec.h
diff options
context:
space:
mode:
authorHari Bathini <hbathini@linux.ibm.com>2020-07-29 17:12:58 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2020-07-29 23:47:54 +1000
commit1a1cf93c200581c72a3cd521e1e0a1a3b5d0077d (patch)
treecb3c966e21b0bd1d04a7d33fa2199d5d1109a2ae /arch/powerpc/include/asm/kexec.h
parent7c64e21a1c5a5bcd651d895b8faa68e9cdcc433d (diff)
powerpc/kexec_file: Setup backup region for kdump kernel
Though kdump kernel boots from loaded address, the first 64KB of it is copied down to real 0. So, setup a backup region and let purgatory copy the first 64KB of crashed kernel into this backup region before booting into kdump kernel. Update reserve map with backup region and crashed kernel's memory to avoid kdump kernel from accidentially using that memory. Signed-off-by: Hari Bathini <hbathini@linux.ibm.com> Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/159602294718.575379.16216507537038008623.stgit@hbathini
Diffstat (limited to 'arch/powerpc/include/asm/kexec.h')
-rw-r--r--arch/powerpc/include/asm/kexec.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kexec.h b/arch/powerpc/include/asm/kexec.h
index 639f31e13593..807bb58ed8fa 100644
--- a/arch/powerpc/include/asm/kexec.h
+++ b/arch/powerpc/include/asm/kexec.h
@@ -105,6 +105,9 @@ extern const struct kexec_file_ops kexec_elf64_ops;
struct kimage_arch {
struct crash_mem *exclude_ranges;
+ unsigned long backup_start;
+ void *backup_buf;
+
#ifdef CONFIG_IMA_KEXEC
phys_addr_t ima_buffer_addr;
size_t ima_buffer_size;
@@ -120,6 +123,10 @@ int setup_new_fdt(const struct kimage *image, void *fdt,
int delete_fdt_mem_rsv(void *fdt, unsigned long start, unsigned long size);
#ifdef CONFIG_PPC64
+struct kexec_buf;
+
+int load_crashdump_segments_ppc64(struct kimage *image,
+ struct kexec_buf *kbuf);
int setup_purgatory_ppc64(struct kimage *image, const void *slave_code,
const void *fdt, unsigned long kernel_load_addr,
unsigned long fdt_load_addr);