diff options
author | Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> | 2016-11-29 13:45:51 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-11-30 13:15:25 +0100 |
commit | a0458284f0625ade5eff2118bab89b2d4bbacc3e (patch) | |
tree | 0f14a6905e9882dfec5158fafbcf122da8ea8512 /arch/powerpc/include/asm/kexec.h | |
parent | powerpc: Change places using CONFIG_KEXEC to use CONFIG_KEXEC_CORE instead. (diff) | |
download | linux-a0458284f0625ade5eff2118bab89b2d4bbacc3e.tar.xz linux-a0458284f0625ade5eff2118bab89b2d4bbacc3e.zip |
powerpc: Add support code for kexec_file_load()
This patch adds the support code needed for implementing
kexec_file_load() on powerpc.
This consists of functions to load the ELF kernel, either big or little
endian, and setup the purgatory enviroment which switches from the first
kernel to the second kernel.
None of this code is built yet, as it depends on CONFIG_KEXEC_FILE which
we have not yet defined. Although we could define CONFIG_KEXEC_FILE in
this patch, we'd then have a window in history where the kconfig symbol
is present but the syscall is not, which would be awkward.
Signed-off-by: Josh Sklar <sklar@linux.vnet.ibm.com>
Signed-off-by: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/kexec.h')
-rw-r--r-- | arch/powerpc/include/asm/kexec.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kexec.h b/arch/powerpc/include/asm/kexec.h index eca2f975bf44..6c3b71502fbc 100644 --- a/arch/powerpc/include/asm/kexec.h +++ b/arch/powerpc/include/asm/kexec.h @@ -91,6 +91,16 @@ static inline bool kdump_in_progress(void) return crashing_cpu >= 0; } +#ifdef CONFIG_KEXEC_FILE +extern struct kexec_file_ops kexec_elf64_ops; + +int setup_purgatory(struct kimage *image, const void *slave_code, + const void *fdt, unsigned long kernel_load_addr, + unsigned long fdt_load_addr); +int setup_new_fdt(void *fdt, unsigned long initrd_load_addr, + unsigned long initrd_len, const char *cmdline); +#endif /* CONFIG_KEXEC_FILE */ + #else /* !CONFIG_KEXEC_CORE */ static inline void crash_kexec_secondary(struct pt_regs *regs) { } |