u-boot-brain/common/spl
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
..
Makefile spl: Add EXT support to SPL 2014-10-27 17:54:03 -04:00
spl_ext.c spl: mmc: remove #ifdef CONFIG_SPL_OS_BOOT check 2015-11-18 14:50:00 -05:00
spl_fat.c spl: mmc: remove #ifdef CONFIG_SPL_OS_BOOT check 2015-11-18 14:50:00 -05:00
spl_mmc.c spl: mmc: use block device number, not hard-coded 0 2015-12-14 13:42:50 -05:00
spl_nand.c spl: change return values of spl_*_load_image() 2015-11-18 14:50:02 -05:00
spl_net.c spl: change return values of spl_*_load_image() 2015-11-18 14:50:02 -05:00
spl_nor.c spl: change return values of spl_*_load_image() 2015-11-18 14:50:02 -05:00
spl_onenand.c spl: change return values of spl_*_load_image() 2015-11-18 14:50:02 -05:00
spl_sata.c spl: change return values of spl_*_load_image() 2015-11-18 14:50:02 -05:00
spl_usb.c spl: change return values of spl_*_load_image() 2015-11-18 14:50:02 -05:00
spl_ymodem.c spl: change return values of spl_*_load_image() 2015-11-18 14:50:02 -05:00
spl.c arm: move gd handling outside of C code 2016-01-13 21:05:18 -05:00