Home
last modified time | relevance | path

Searched hist:adc421e4cee8275cd99367b3b455ffbb5ead3990 (Results 1 – 3 of 3) sorted by relevance

/rk3399_rockchip-uboot/common/init/
H A Dboard_init.cadc421e4cee8275cd99367b3b455ffbb5ead3990 Wed Nov 25 16:56:33 UTC 2015 Albert ARIBAUD <albert.u.boot@aribaud.net> 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>
/rk3399_rockchip-uboot/arch/arm/lib/
H A Dcrt0.Sadc421e4cee8275cd99367b3b455ffbb5ead3990 Wed Nov 25 16:56:33 UTC 2015 Albert ARIBAUD <albert.u.boot@aribaud.net> 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>
/rk3399_rockchip-uboot/common/spl/
H A Dspl.cadc421e4cee8275cd99367b3b455ffbb5ead3990 Wed Nov 25 16:56:33 UTC 2015 Albert ARIBAUD <albert.u.boot@aribaud.net> 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>