powerpc: Add purgatory for kexec_file_load implementation.
This purgatory implementation comes from kexec-tools, almost unchanged.
In order to use boot/string.S in ppc64 big endian mode, the functions
defined in it need to have dot symbols so that they can be called from C
code. Therefore, change the file to use a DOTSYM macro if one is defined,
so that the purgatory can add those dot symbols.
The changes made to the purgatory code relative to the version in
kexec-tools were:
The sha256_regions global variable was renamed to sha_regions to match
what kexec_file_load expects, and to use the sha256.c file from x86's
purgatory (this avoids adding yet another SHA-256 implementation).
The global variables in purgatory.c and purgatory-ppc64.c now use a
__section attribute to put them in the .data section instead of being
initialized to zero. It doesn't matter what their initial value is,
because they will be set by the kernel when preparing the kexec image.
Also, since we don't support loading a crashdump kernel via
kexec_file_load yet, the code related to that functionality has been
removed.
Finally, some checkpatch.pl warnings were fixed.
Signed-off-by: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
18 files changed