[U-Boot] [PATCH v5 00/18] rockchip: back-to-bootrom: replace assembly-implementation with C-code
Heiko Stuebner
heiko at sntech.de
Wed Oct 11 13:07:51 UTC 2017
Am Dienstag, 10. Oktober 2017, 16:21:00 CEST schrieb Philipp Tomsich:
>
> Recent discussions confirmed (what the code always assumed): the
> Rockchip BROM always enters U-Boot with the stack-pointer valid
> (i.e. the U-Boot startup code is running off the BROM stack).
>
> We can thus replace the back-to-bootrom code (i.e. both the
> save_boot_params and back_to_bootrom implementations) using C-code
> based on setjmp/longjmp. The new implementation is already structured
> to allow an easy drop-in of Andy's changes to enter download-mode when
> returning to the BROM.
>
> This turned out to require a some tweaking to system.h (making sure
> that the prototype for save_boot_params_ret is visible for A64)and
> start.S (so binutils knows that this is a possible function entry and
> it can correctly insert A32-to-Thumb transitions) and taking the axe
> to setjmp.h (which created quite a few issues with it not expecting
> A32/T32/Thumb call-sites and some fragility from GCC being smart about
> the clobber-list of the inline assembly... which led to r9 not being
> saved or restored).
>
> For v4+: To fix issues with the RK3188 support, this also updates the
> boot0 hook changes (i.e. allowing the boot0-hook to insert code/data
> before the ARM vector table) that Kever had submitted this spring and
> implements a similar "early back-to-bootrom" as suggested by Pawel
> (for the RK3066) as a generic mechanism.
This series on rk3188-radxarock
Tested-by: Heiko Stuebner <heiko at sntech.de>
It can enter SPL and from there also enter into proper uboot.
At first I was about to complain that it broke mid-series until I
realized that I'll of course need to adapt my image build script
to not try to use a TPL binary :-D
Heiko
More information about the U-Boot
mailing list