summaryrefslogtreecommitdiffstats
path: root/kernel/kexec_elf.c
Commit message (Collapse)AuthorAgeFilesLines
* kexec_elf: support 32 bit ELF filesSven Schnelle2019-09-061-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>
* kexec_elf: remove unused variable in kexec_elf_load()Sven Schnelle2019-09-061-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>
* kexec_elf: remove Elf_Rel macroSven Schnelle2019-09-061-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>
* kexec_elf: remove PURGATORY_STACK_SIZESven Schnelle2019-09-061-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>
* kexec_elf: remove parsing of section headersSven Schnelle2019-09-061-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>
* kexec_elf: change order of elf_*_to_cpu() functionsSven Schnelle2019-09-061-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>
* kexec: add KEXEC_ELFSven Schnelle2019-09-061-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>