u-boot/arch
Albert ARIBAUD adc421e4ce arm: move gd handling outside of C code
As of gcc 5.2.1 for Thumb-1, it is not possible any
more to assign gd from C code, as gd is mapped to r9,
and r9 may now be saved in the prolog sequence, and
restored in the epilog sequence, of any C functions.

Therefore arch_setup_gd(), which is supposed to set
r9, may actually have no effect, causing U-Boot to
use a bad address to access GD.

Fix this by never calling arch_setup_gd() for ARM,
and instead setting r9 in arch/arm/lib/crt0.S, to
the value returned by board_init_f_alloc_reserve().

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-01-13 21:05:18 -05:00
..
arc Fix board init code to respect the C runtime environment 2016-01-13 21:05:17 -05:00
arm arm: move gd handling outside of C code 2016-01-13 21:05:18 -05:00
avr32 avr32: Use the generic bitops headers 2015-11-05 10:52:31 -05:00
blackfin Move console definitions into a new console.h file 2015-11-19 20:27:50 -07:00
m68k m68k: add private libgcc 2015-12-13 20:22:00 -05:00
microblaze Fix board init code to respect the C runtime environment 2016-01-13 21:05:17 -05:00
mips Merge branch 'master' of git://git.denx.de/u-boot-mips 2015-11-06 09:17:17 -05:00
nds32 nds32: Use the generic bitops headers 2015-11-05 10:52:21 -05:00
nios2 Fix board init code to respect the C runtime environment 2016-01-13 21:05:17 -05:00
openrisc openrisc: updating build tools naming convention 2015-11-12 18:13:20 -05:00
powerpc Fix board init code to respect the C runtime environment 2016-01-13 21:05:17 -05:00
sandbox sandbox: eth-raw-os.c: Ensure that our interface name is not too long 2016-01-12 10:19:09 -07:00
sh Move console definitions into a new console.h file 2015-11-19 20:27:50 -07:00
sparc sparc: Remove non-generic board init files: board.c, time.c 2015-12-03 13:15:50 +02:00
x86 Fix board init code to respect the C runtime environment 2016-01-13 21:05:17 -05:00
.gitignore .gitignore: drop include/asm/proc from ignore pattern 2014-06-19 11:18:54 -04:00
Kconfig m68k: add private libgcc 2015-12-13 20:22:00 -05:00