diff options
author | Laurent Dufour <ldufour@linux.vnet.ibm.com> | 2013-11-15 16:01:51 +0100 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2013-11-19 09:26:28 +0900 |
commit | 75efb890f9033302d9bf27bace6268850c8a7371 (patch) | |
tree | 947f4198ee047a19bd7088ef57c0d7112d1127f1 /purgatory | |
parent | 818d45224ad76ee1cff296c7ba14b605b3a2fcc1 (diff) | |
download | kexec-tools-75efb890f9033302d9bf27bace6268850c8a7371.tar.gz |
kexec/ppc64: bring up new ppc64le architecture
This patch provides support for the new Power PC litte endian (LE) mode. The
LE mode only differs in the way the instructions and data are stored in memory
thus there is no real need to duplicate the ppc64 code.
However some compilation's options, especially for the purgatory, differ
between little and big endian mode's support. A new "SUBARCH" build variable
is introduced which is currently only used for PPC64 to specify the
endianness.
Another set of changes in this patch is fixing minor endianess issues in the
ppc64 code and fix an alignment issue raised on Power7 little endian mode.
Among these fixes, the check on the kernel binary endianess is removed,
since we can imagine kexecing a LE kernel from a BE environment, as far as
the specified root filesystem and initrd file are containing the right
binaries.
This patch depends on the patch "kexec/ppc64: use common architecture
fs2dt.c file" I sent earlier on the kexec mailing list.
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'purgatory')
-rw-r--r-- | purgatory/arch/ppc64/Makefile | 8 | ||||
-rw-r--r-- | purgatory/arch/ppc64/v2wrap.S | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/purgatory/arch/ppc64/Makefile b/purgatory/arch/ppc64/Makefile index 67f41aea..6f6716e6 100644 --- a/purgatory/arch/ppc64/Makefile +++ b/purgatory/arch/ppc64/Makefile @@ -11,7 +11,13 @@ ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/misc.S ppc64_PURGATORY_EXTRA_CFLAGS += -m64 -mcall-aixdesc -msoft-float ppc64_PURGATORY_EXTRA_ASFLAGS += -m64 -mcall-aixdesc -ppc64_PURGATORY_EXTRA_LDFLAGS += -melf64ppc +ifeq ($(SUBARCH),BE) + ppc64_PURGATORY_EXTRA_LDFLAGS += -melf64ppc +else + ppc64_PURGATORY_EXTRA_LDFLAGS += -melf64lppc + ppc64_PURGATORY_EXTRA_CFLAGS += -mlittle-endian + ppc64_PURGATORY_EXTRA_ASFLAGS += -mlittle-endian +endif dist += purgatory/arch/ppc64/Makefile $(ppc64_PURGATORY_SRCS) \ purgatory/arch/ppc64/hvCall.h \ diff --git a/purgatory/arch/ppc64/v2wrap.S b/purgatory/arch/ppc64/v2wrap.S index 3f786202..16fb63df 100644 --- a/purgatory/arch/ppc64/v2wrap.S +++ b/purgatory/arch/ppc64/v2wrap.S @@ -46,6 +46,7 @@ ori rn,rn,name##@l .machine ppc64 + .align 8 .globl purgatory_start purgatory_start: b master .org purgatory_start + 0x5c # ABI: possible run_at_load flag at 0x5c |