summaryrefslogtreecommitdiff
path: root/kernel/kexec_elf.c
AgeCommit message (Collapse)AuthorFilesLines
2019-09-06kexec_elf: support 32 bit ELF filesSven Schnelle1-15/+42
The powerpc version only supported 64 bit. Add some code to switch decoding of fields during runtime so we can kexec a 32 bit kernel from a 64 bit kernel and vice versa. Signed-off-by: Sven Schnelle <svens@stackframe.org> Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com> Signed-off-by: Helge Deller <deller@gmx.de>
2019-09-06kexec_elf: remove unused variable in kexec_elf_load()Sven Schnelle1-5/+2
base was never assigned, so we can remove it. Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr> Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com> Signed-off-by: Sven Schnelle <svens@stackframe.org> Signed-off-by: Helge Deller <deller@gmx.de>
2019-09-06kexec_elf: remove Elf_Rel macroSven Schnelle1-4/+0
It wasn't used anywhere, so lets drop it. Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr> Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com> Signed-off-by: Sven Schnelle <svens@stackframe.org> Signed-off-by: Helge Deller <deller@gmx.de>
2019-09-06kexec_elf: remove PURGATORY_STACK_SIZESven Schnelle1-2/+0
It's not used anywhere so just drop it. Signed-off-by: Sven Schnelle <svens@stackframe.org> Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com> Signed-off-by: Helge Deller <deller@gmx.de>
2019-09-06kexec_elf: remove parsing of section headersSven Schnelle1-137/+0
We're not using them, so we can drop the parsing. Signed-off-by: Sven Schnelle <svens@stackframe.org> Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com> Signed-off-by: Helge Deller <deller@gmx.de>
2019-09-06kexec_elf: change order of elf_*_to_cpu() functionsSven Schnelle1-6/+6
Change the order to have a 64/32/16 order, no functional change. Signed-off-by: Sven Schnelle <svens@stackframe.org> Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com> Signed-off-by: Helge Deller <deller@gmx.de>
2019-09-06kexec: add KEXEC_ELFSven Schnelle1-0/+549
Right now powerpc provides an implementation to read elf files with the kexec_file_load() syscall. Make that available as a public kexec interface so it can be re-used on other architectures. Signed-off-by: Sven Schnelle <svens@stackframe.org> Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com> Signed-off-by: Helge Deller <deller@gmx.de>