[U-Boot] [PATCH 3/5] arm: Allow lr to be saved by board code

Albert ARIBAUD albert.u.boot at aribaud.net
Wed Feb 4 09:59:16 CET 2015


Hello Simon,

On Tue,  3 Feb 2015 21:18:52 -0700, Simon Glass <sjg at chromium.org>
wrote:
> The link register value can be required on some boards (e.g. FEL mode on
> sunxi) so stash it to r4 before jumping to save_boot_params().

I'd rather not make this there; I would like save_boot_params to start
with as unmodified a core state as possible, because r4 might
actually, now or in the future, contain important data.

I'd even go as far as saying that save_boot_params should be branched
into rather than called, and should branch back to a fixed label right
after reset, so that even lr is preserved. For SoCs which do not need
to save any boot parameters, a weak version of save_boot_params would
just do the branching back.

(this should help merging all start.S instances into a singe one,
which I still want to achieve one day)

> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list