Skip to content

rockchip: back-to-bootrom: replace assembly-implementation with C-code

Heiko Stuebner u-boot 6 versions – New

Get series with b4
b4 am 3469318.ZWUX5ZKbK4@phil

Versions newest first · linked by author and title

  1. v5 Latest0 of 18 patches 0 repliesNew
  2. v3 posting 3/30 of 6 patches 0 repliesSuperseded
  3. v3 posting 2/30 of 6 patches 0 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v3 posting 1/30 of 6 patches0 repliesSuperseded
v2 posting 2/20 of 5 patches0 repliesSuperseded
v2 posting 1/20 of 5 patches0 repliesSuperseded

Patches in v5 No applies recorded yet

None of the 18 patches the cover letter announces are in this archive.

Reviews trailers per patch

PatchHeiko Stuebner
SeriesT-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [U-Boot] [PATCH v5 00/18] rockchip: back-to-bootrom: replace assembly-implementation with C-code

Am Dienstag, 10. Oktober 2017, 16:21:00 CEST schrieb Philipp Tomsich:

Quoted 20 lines

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).

Quoted 5 lines

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

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