]> git.baikalelectronics.ru Git - arm-tf.git/commit
libc/memset: Implement function in assembler
authorAlexei Fedorov <Alexei.Fedorov@arm.com>
Sun, 16 Aug 2020 15:01:13 +0000 (16:01 +0100)
committerAlexei Fedorov <Alexei.Fedorov@arm.com>
Wed, 19 Aug 2020 18:21:39 +0000 (18:21 +0000)
commite7d344de01ad11b856233634717aafe9312697e4
tree22499ab41bb46f17556f4ec45e6d8795c1012df5
parente268ea271aa3eed47ef610fce41d27abb3132b92
libc/memset: Implement function in assembler

Trace analysis of FVP_Base_AEMv8A model running in
Aarch32 mode with the build options listed below:
TRUSTED_BOARD_BOOT=1 GENERATE_COT=1
ARM_ROTPK_LOCATION=devel_ecdsa KEY_ALG=ecdsa
ROT_KEY=plat/arm/board/common/rotpk/arm_rotprivk_ecdsa.pem
shows that when auth_signature() gets called
71.84% of CPU execution time is spent in memset() function
written in C using single byte write operations,
see lib\libc\memset.c.
This patch replaces C memset() implementation with assembler
version giving the following results:
- for Aarch32 in auth_signature() call memset() CPU time
reduced to 24.84%.
- Number of CPU instructions executed during TF-A
boot stage before start of BL33 in RELEASE builds:
----------------------------------------------
|  Arch   |     C      |  assembler |    %   |
----------------------------------------------
| Aarch32 | 2073275460 | 1487400003 | -28.25 |
| Aarch64 | 2056807158 | 1244898303 | -39.47 |
----------------------------------------------
The patch also replaces memset.c with aarch64/memset.S
in plat\nvidia\tegra\platform.mk.

Change-Id: Ifbf085a2f577a25491e2d28446ee95a4ac891597
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
lib/libc/aarch32/memset.S [new file with mode: 0644]
lib/libc/aarch64/memset.S [new file with mode: 0644]
lib/libc/libc.mk
lib/libc/memset.c [deleted file]
plat/nvidia/tegra/platform.mk