summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-09-15 12:33:10 +0200
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-11-01 23:20:55 +0100
commit8917f697af3ac3f2fd7fbfdc3f23c4f663422d4c (patch)
treec4390ccb1b14a6f21c142c16faf804a461ef7f9f /include
parentb80123230cda30eacd465e945c065e1a7e068877 (diff)
rockchip: back-to-bootrom: replace assembly-implementation with C-code
The back-to-bootrom implementation for Rockchip has always relied on the stack-pointer being valid on entry, so there was little reason to have this as an assembly implementation. This provides a new C-only implementation of save_boot_params and back_to_bootrom (relying on setjmp/longjmp) and removes the older assembly-only implementation. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Andy Yan <andy.yan@rock-chips.com> Series-cc: Andy Yan <andy.yan@rock-chips.com> Series-cc: Klaus Goger <klaus.goger@theobroma-systems.com> Series-cc: Heiko Stuebner <hs@sntech.de> Series-cc: sjg Series-version: 5 Cover-letter: rockchip: back-to-bootrom: replace assembly-implementation with C-code 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. END
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions