diff options
author | Stefano Babic <sbabic@denx.de> | 2014-09-16 16:30:11 +0200 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2014-09-16 16:30:11 +0200 |
commit | d4940fc521db6220a714a800e72b5d700e5c9974 (patch) | |
tree | 757014a2dd4464e8669729f18823c98f722e0c94 /arch/arm | |
parent | 067a659317639187fd170f73b10dfc5c2a7df9da (diff) | |
parent | a7f99bf139b3aaa0d5494693fd0395084355e41a (diff) | |
download | u-boot-imx-d4940fc521db6220a714a800e72b5d700e5c9974.zip u-boot-imx-d4940fc521db6220a714a800e72b5d700e5c9974.tar.gz u-boot-imx-d4940fc521db6220a714a800e72b5d700e5c9974.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/include/asm/global_data.h | 25 | ||||
-rw-r--r-- | arch/arm/lib/eabi_compat.c | 15 | ||||
-rw-r--r-- | arch/arm/lib/spl.c | 3 | ||||
-rw-r--r-- | arch/arm/lib/vectors.S | 6 |
4 files changed, 41 insertions, 8 deletions
diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h index 63e4ad5..c69d064 100644 --- a/arch/arm/include/asm/global_data.h +++ b/arch/arm/include/asm/global_data.h @@ -44,10 +44,35 @@ struct arch_global_data { #include <asm-generic/global_data.h> +#ifdef __clang__ + +#define DECLARE_GLOBAL_DATA_PTR +#define gd get_gd() + +static inline gd_t *get_gd(void) +{ + gd_t *gd_ptr; + +#ifdef CONFIG_ARM64 + /* + * Make will already error that reserving x18 is not supported at the + * time of writing, clang: error: unknown argument: '-ffixed-x18' + */ + __asm__ volatile("mov %0, x18\n" : "=r" (gd_ptr)); +#else + __asm__ volatile("mov %0, r9\n" : "=r" (gd_ptr)); +#endif + + return gd_ptr; +} + +#else + #ifdef CONFIG_ARM64 #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("x18") #else #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r9") #endif +#endif #endif /* __ASM_GBL_DATA_H */ diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c index 10d1933..a2cb06e 100644 --- a/arch/arm/lib/eabi_compat.c +++ b/arch/arm/lib/eabi_compat.c @@ -20,8 +20,19 @@ int raise (int signum) /* Dummy function to avoid linker complaints */ void __aeabi_unwind_cpp_pr0(void) { -}; +} void __aeabi_unwind_cpp_pr1(void) { -}; +} + +/* Copy memory like memcpy, but no return value required. */ +void __aeabi_memcpy(void *dest, const void *src, size_t n) +{ + (void) memcpy(dest, src, n); +} + +void __aeabi_memset(void *dest, size_t n, int c) +{ + (void) memset(dest, c, n); +} diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c index dfcc596..75ab546 100644 --- a/arch/arm/lib/spl.c +++ b/arch/arm/lib/spl.c @@ -28,9 +28,6 @@ void __weak board_init_f(ulong dummy) /* Clear the BSS. */ memset(__bss_start, 0, __bss_end - __bss_start); - /* Set global data pointer. */ - gd = &gdata; - board_init_r(NULL, 0); } diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S index 493f337..0cb87ce 100644 --- a/arch/arm/lib/vectors.S +++ b/arch/arm/lib/vectors.S @@ -45,12 +45,13 @@ ************************************************************************* */ +_start: + #ifdef CONFIG_SYS_DV_NOR_BOOT_CFG .word CONFIG_SYS_DV_NOR_BOOT_CFG #endif -_start: - ldr pc, _reset + b reset ldr pc, _undefined_instruction ldr pc, _software_interrupt ldr pc, _prefetch_abort @@ -77,7 +78,6 @@ _start: .globl _irq .globl _fiq -_reset: .word reset _undefined_instruction: .word undefined_instruction _software_interrupt: .word software_interrupt _prefetch_abort: .word prefetch_abort |