OSDN Git Service

powerpc/kexec_file: Avoid stomping memory used by special regions
authorHari Bathini <hbathini@linux.ibm.com>
Wed, 29 Jul 2020 11:40:16 +0000 (17:10 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 29 Jul 2020 13:47:53 +0000 (23:47 +1000)
commitb8e55a3e5c208862eacded5aad822184f89f85d9
treee90ba99f2146c60a94aeb7efff07e7655f88ad70
parent180adfc532a83c1d74146449f7385f767d4b8059
powerpc/kexec_file: Avoid stomping memory used by special regions

crashkernel region could have an overlap with special memory regions
like OPAL, RTAS, TCE table & such. These regions are referred to as
excluded memory ranges. Setup these ranges during image probe in order
to avoid them while finding the buffer for different kdump segments.
Override arch_kexec_locate_mem_hole() to locate a memory hole taking
these ranges into account.

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/159602281047.575379.6636807148335160795.stgit@hbathini
arch/powerpc/include/asm/kexec.h
arch/powerpc/include/asm/kexec_ranges.h
arch/powerpc/kexec/elf_64.c
arch/powerpc/kexec/file_load_64.c
arch/powerpc/kexec/ranges.c