[PATCH v2] arm: ARMv4 assembly compatibility

Tom Rini trini at konsulko.com
Sat Sep 3 03:55:12 CEST 2022


On Sun, Aug 21, 2022 at 04:34:20PM +0300, Sergei Antonov wrote:

> There is currently a problem that U-Boot can not work on ARMv4
> because assembly imlementations of memcpy() and some other functions
> use "bx lr" instruction that is not available on ARMv4 ("mov pc, lr"
> should be used instead).
> 
> A working preprocessor-based solution to this problem is found in
> arch/arm/lib/relocate.S. Move it to the "ret" macro in
> arch/arm/include/asm/assembler.h and change all "bx lr" code
> to "ret lr" in functions that may run on ARMv4. Linux source code
> deals with this problem in the same manner.
> 
> v1 -> v2:
> Comment update. Pointed out by Andre Przywara.
> 
> Signed-off-by: Sergei Antonov <saproj at gmail.com>
> CC: Samuel Holland <samuel at sholland.org>
> CC: Ye Li <ye.li at nxp.com>
> CC: Simon Glass <sjg at chromium.org>
> CC: Andre Przywara <andre.przywara at arm.com>
> CC: Marek Vasut <marex at denx.de>
> CC: Sean Anderson <sean.anderson at seco.com>
> CC: Tom Rini <trini at konsulko.com>

Applied to u-boot/next, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220902/cd07d1bc/attachment.sig>


More information about the U-Boot mailing list