diff options
author | Hari Bathini <hbathini@linux.ibm.com> | 2019-09-11 20:26:03 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-09-14 00:04:45 +1000 |
commit | bec53196adf4791d466adf0e339b61186c7b5283 (patch) | |
tree | d21c6ffd50038faa23011ca14fddeecaabdb6fbc /arch/powerpc/include/asm/fadump-internal.h | |
parent | b2a815a554a34f0e6fab4526ae762d5528783600 (diff) | |
download | linux-bec53196adf4791d466adf0e339b61186c7b5283.tar.bz2 |
powerpc/fadump: add support to preserve crash data on FADUMP disabled kernel
Add a new kernel config option, CONFIG_PRESERVE_FA_DUMP that ensures
that crash data, from previously crash'ed kernel, is preserved. This
helps in cases where FADump is not enabled but the subsequent memory
preserving kernel boot is likely to process this crash data. One
typical usecase for this config option is petitboot kernel.
As OPAL allows registering address with it in the first kernel and
retrieving it after MPIPL, use it to store the top of boot memory.
A kernel that intends to preserve crash data retrieves it and avoids
using memory beyond this address.
Move arch_reserved_kernel_pages() function as it is needed for both
FA_DUMP and PRESERVE_FA_DUMP configurations.
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/156821375751.5656.11459483669542541602.stgit@hbathini.in.ibm.com
Diffstat (limited to 'arch/powerpc/include/asm/fadump-internal.h')
-rw-r--r-- | arch/powerpc/include/asm/fadump-internal.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/fadump-internal.h b/arch/powerpc/include/asm/fadump-internal.h index 0f2ce85ee7b9..6c2868d38bd3 100644 --- a/arch/powerpc/include/asm/fadump-internal.h +++ b/arch/powerpc/include/asm/fadump-internal.h @@ -9,6 +9,7 @@ #ifndef _ASM_POWERPC_FADUMP_INTERNAL_H #define _ASM_POWERPC_FADUMP_INTERNAL_H +#ifndef CONFIG_PRESERVE_FA_DUMP /* * The RMA region will be saved for later dumping when kernel crashes. * RMA is Real Mode Area, the first block of logical memory address owned @@ -146,6 +147,16 @@ void fadump_update_elfcore_header(char *bufp); bool is_fadump_boot_mem_contiguous(void); bool is_fadump_reserved_mem_contiguous(void); +#else /* !CONFIG_PRESERVE_FA_DUMP */ + +/* Firmware-assisted dump configuration details. */ +struct fw_dump { + u64 boot_mem_top; + u64 dump_active; +}; + +#endif /* CONFIG_PRESERVE_FA_DUMP */ + #ifdef CONFIG_PPC_PSERIES extern void rtas_fadump_dt_scan(struct fw_dump *fadump_conf, u64 node); #else |