diff options
author | Hari Bathini <hbathini@linux.ibm.com> | 2019-09-11 20:26:59 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-09-14 00:04:45 +1000 |
commit | 7b1b3b48250acbfd7f15ba950d4654b7f02a8300 (patch) | |
tree | 483109c7a7956322efab7ae8b3ed71cebb7ceec7 /arch/powerpc/platforms/pseries | |
parent | 845426f3f3443c3f60737751b7af0142e3020f08 (diff) |
powerpc/fadump: consider f/w load area
OPAL loads kernel & initrd at 512MB offset (256MB size), also exported
as ibm,opal/dump/fw-load-area. So, if boot memory size of FADump is
less than 768MB, kernel memory to be exported as '/proc/vmcore' would
be overwritten by f/w while loading kernel & initrd. To avoid such a
scenario, enforce a minimum boot memory size of 768MB on OPAL platform
and skip using FADump if a newer F/W version loads kernel & initrd
above 768MB.
Also, irrespective of RMA size, set the minimum boot memory size
expected on pseries platform at 320MB. This is to avoid inflating the
minimum memory requirements on systems with 512M/1024M RMA size.
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/156821381414.5656.1592867278535469652.stgit@hbathini.in.ibm.com
Diffstat (limited to 'arch/powerpc/platforms/pseries')
-rw-r--r-- | arch/powerpc/platforms/pseries/rtas-fadump.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/rtas-fadump.h | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/rtas-fadump.c b/arch/powerpc/platforms/pseries/rtas-fadump.c index bf1e8fc549b5..1d8f2871fa34 100644 --- a/arch/powerpc/platforms/pseries/rtas-fadump.c +++ b/arch/powerpc/platforms/pseries/rtas-fadump.c @@ -116,6 +116,11 @@ static u64 rtas_fadump_init_mem_struct(struct fw_dump *fadump_conf) return addr; } +static u64 rtas_fadump_get_bootmem_min(void) +{ + return RTAS_FADUMP_MIN_BOOT_MEM; +} + static int rtas_fadump_register(struct fw_dump *fadump_conf) { unsigned int wait_time; @@ -467,6 +472,7 @@ static void rtas_fadump_trigger(struct fadump_crash_info_header *fdh, static struct fadump_ops rtas_fadump_ops = { .fadump_init_mem_struct = rtas_fadump_init_mem_struct, + .fadump_get_bootmem_min = rtas_fadump_get_bootmem_min, .fadump_register = rtas_fadump_register, .fadump_unregister = rtas_fadump_unregister, .fadump_invalidate = rtas_fadump_invalidate, diff --git a/arch/powerpc/platforms/pseries/rtas-fadump.h b/arch/powerpc/platforms/pseries/rtas-fadump.h index 531f3f3e42b3..6602ff69e10d 100644 --- a/arch/powerpc/platforms/pseries/rtas-fadump.h +++ b/arch/powerpc/platforms/pseries/rtas-fadump.h @@ -9,6 +9,15 @@ #ifndef _PSERIES_RTAS_FADUMP_H #define _PSERIES_RTAS_FADUMP_H +/* + * On some Power systems where RMO is 128MB, it still requires minimum of + * 256MB for kernel to boot successfully. When kdump infrastructure is + * configured to save vmcore over network, we run into OOM issue while + * loading modules related to network setup. Hence we need additional 64M + * of memory to avoid OOM issue. + */ +#define RTAS_FADUMP_MIN_BOOT_MEM ((0x1UL << 28) + (0x1UL << 26)) + /* Firmware provided dump sections */ #define RTAS_FADUMP_CPU_STATE_DATA 0x0001 #define RTAS_FADUMP_HPTE_REGION 0x0002 |