]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/kexec_file: Restrict memory usage of kdump kernel
authorHari Bathini <hbathini@linux.ibm.com>
Wed, 29 Jul 2020 11:42:16 +0000 (17:12 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 29 Jul 2020 13:47:54 +0000 (23:47 +1000)
commit16a8e18124bbcbbf8058a35158cc9c3f8cd4800a
tree505e46c94ad36b24416ec4b96a7934436886b09c
parent7861ff7356c6ab44072f60edfb2b778556c079fc
powerpc/kexec_file: Restrict memory usage of kdump kernel

Kdump kernel, used for capturing the kernel core image, is supposed
to use only specific memory regions to avoid corrupting the image to
be captured. The regions are crashkernel range - the memory reserved
explicitly for kdump kernel, memory used for the tce-table, the OPAL
region and RTAS region as applicable. Restrict kdump kernel memory
to use only these regions by setting up usable-memory DT property.
Also, tell the kdump kernel to run at the loaded address by setting
the magic word at 0x5c.

Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Tested-by: Pingfan Liu <piliu@redhat.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/159602284284.575379.6962016255404325493.stgit@hbathini
arch/powerpc/kexec/file_load_64.c