OSDN Git Service

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)
commit7c64e21a1c5a5bcd651d895b8faa68e9cdcc433d
tree505e46c94ad36b24416ec4b96a7934436886b09c
parentadfefc609e55edc5dce18a68d1526af6d70aaf86
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