diff options
Diffstat (limited to 'purgatory')
-rw-r--r-- | purgatory/arch/ppc64/Makefile | 6 | ||||
-rw-r--r-- | purgatory/arch/ppc64/hvCall.S | 5 | ||||
-rw-r--r-- | purgatory/arch/ppc64/ppc64_asm.h | 16 | ||||
-rw-r--r-- | purgatory/arch/ppc64/v2wrap.S | 4 |
4 files changed, 26 insertions, 5 deletions
diff --git a/purgatory/arch/ppc64/Makefile b/purgatory/arch/ppc64/Makefile index 6f6716e..c2d0586 100644 --- a/purgatory/arch/ppc64/Makefile +++ b/purgatory/arch/ppc64/Makefile @@ -9,10 +9,12 @@ ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/console-ppc64.c ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/crashdump_backup.c 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_CFLAGS += -m64 -msoft-float +ppc64_PURGATORY_EXTRA_ASFLAGS += -m64 ifeq ($(SUBARCH),BE) ppc64_PURGATORY_EXTRA_LDFLAGS += -melf64ppc + ppc64_PURGATORY_EXTRA_CFLAGS += -mcall-aixdesc + ppc64_PURGATORY_EXTRA_ASFLAGS += -mcall-aixdesc else ppc64_PURGATORY_EXTRA_LDFLAGS += -melf64lppc ppc64_PURGATORY_EXTRA_CFLAGS += -mlittle-endian diff --git a/purgatory/arch/ppc64/hvCall.S b/purgatory/arch/ppc64/hvCall.S index bdc4cb0..a96c489 100644 --- a/purgatory/arch/ppc64/hvCall.S +++ b/purgatory/arch/ppc64/hvCall.S @@ -9,12 +9,13 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include "ppc64_asm.h" #define HVSC .long 0x44000022 .text .machine ppc64 -.globl .plpar_hcall_norets -.plpar_hcall_norets: +.globl DOTSYM(plpar_hcall_norets) +DOTSYM(plpar_hcall_norets): or 6,6,6 # medium low priority mfcr 0 stw 0,8(1) diff --git a/purgatory/arch/ppc64/ppc64_asm.h b/purgatory/arch/ppc64/ppc64_asm.h new file mode 100644 index 0000000..b8746fd --- /dev/null +++ b/purgatory/arch/ppc64/ppc64_asm.h @@ -0,0 +1,16 @@ +/* + * ppc64_asm.h - common defines for PPC64 assembly parts + * + * This source code is licensed under the GNU General Public License, + * Version 2. See the file COPYING for more details. + */ + +/* + * ABIv1 requires dot symbol while ABIv2 does not. + */ +#if defined(_CALL_ELF) && _CALL_ELF == 2 +#define DOTSYM(a) a +#else +#define GLUE(a,b) a##b +#define DOTSYM(a) GLUE(.,a) +#endif diff --git a/purgatory/arch/ppc64/v2wrap.S b/purgatory/arch/ppc64/v2wrap.S index 16fb63d..2761c14 100644 --- a/purgatory/arch/ppc64/v2wrap.S +++ b/purgatory/arch/ppc64/v2wrap.S @@ -18,6 +18,8 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # +#include "ppc64_asm.h" + # v2wrap.S # a wrapper to call purgatory code to backup first # 32kB of first kernel into the backup region @@ -77,7 +79,7 @@ master: ld 1,0(6) #setup stack subi 1,1,112 - bl .purgatory + bl DOTSYM(purgatory) nop or 3,3,3 # ok now to high priority, lets boot |