arm64: arch/arm/lib: Add optimized memset/memcpy/memmove functions
authorStefan Roese <sr@denx.de>
Thu, 2 Sep 2021 15:00:17 +0000 (17:00 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 24 Sep 2021 11:48:06 +0000 (07:48 -0400)
commitdbf6b14e0a388330b0a0cb472e1bd5c8b5d711a4
tree1551323b6dc0a56a318fd343bb73878f05cdde5f
parent2c14ff587998e2b0a94bc2b693bcd43094a40b8c
arm64: arch/arm/lib: Add optimized memset/memcpy/memmove functions

Ported from https://github.com/ARM-software/optimized-routines

These files are included from this repository, including the latest
git commit ID:
string/aarch64/memcpy.S: afd6244a1f8d
string/aarch64/memset.S: e823e3abf5f8
string/asmdefs.h: e823e3abf5f8

Note that memmove is also handled by the memcpy function.

Please note that when adding these optimized functions as default memset
memcpy functions in U-Boot, U-Boot fails to boot on the LX2160ARDB.
After the initial ATF output, no U-Boot output is shown on the serial
console. Some exception is triggered here in the very early boot process
as some of the assembler opcodes need the caches to be enabled.

Because of this, a follow-up patch will add a check to use a simple
non-optimized memset for the "cache disabled" case.

Note:
I also integrated and tested with the Linux versions of these optimized
functions. They are similar to the ones now integrated but these ARM
versions are still a small bit faster.

Signed-off-by: Stefan Roese <sr@denx.de>
arch/arm/lib/Makefile
arch/arm/lib/asmdefs.h [new file with mode: 0644]
arch/arm/lib/memcpy-arm64.S [new file with mode: 0644]
arch/arm/lib/memset-arm64.S [new file with mode: 0644]