powerpc/kexec_file: Setup backup region for kdump kernel
authorHari Bathini <hbathini@linux.ibm.com>
Wed, 29 Jul 2020 11:42:58 +0000 (17:12 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 29 Jul 2020 13:47:54 +0000 (23:47 +1000)
commit1a1cf93c200581c72a3cd521e1e0a1a3b5d0077d
treecb3c966e21b0bd1d04a7d33fa2199d5d1109a2ae
parent7c64e21a1c5a5bcd651d895b8faa68e9cdcc433d
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
arch/powerpc/include/asm/crashdump-ppc64.h [new file with mode: 0644]
arch/powerpc/include/asm/kexec.h
arch/powerpc/kexec/elf_64.c
arch/powerpc/kexec/file_load_64.c
arch/powerpc/purgatory/trampoline_64.S