Merge branch 'master' of git://git.denx.de/u-boot-arm

This commit is contained in:
Stefano Babic
2014-09-16 16:30:11 +02:00
10 changed files with 107 additions and 17 deletions

View File

@@ -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 */

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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