arm-trusted-firmware/lib/libc
Alexei Fedorov e7d344de01 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>
2020-08-19 18:21:39 +00:00
..
aarch32 libc/memset: Implement function in assembler 2020-08-19 18:21:39 +00:00
aarch64 libc/memset: Implement function in assembler 2020-08-19 18:21:39 +00:00
abort.c Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
assert.c libc: fix sparse warning for __assert() 2019-09-11 11:28:46 +09:00
exit.c libc: Fix some MISRA defects 2018-08-30 16:21:59 +01:00
libc.mk libc/memset: Implement function in assembler 2020-08-19 18:21:39 +00:00
memchr.c libc: fix memchr implementation 2019-06-20 09:59:24 +01:00
memcmp.c Remove several warnings reported with W=1 2019-04-01 10:43:42 +01:00
memcpy.c Remove several warnings reported with W=1 2019-04-01 10:43:42 +01:00
memmove.c libc: Cleanup remaining files 2018-08-22 10:26:04 +01:00
memrchr.c libc: add memrchr 2019-12-11 08:51:26 +01:00
printf.c Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
putchar.c Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
puts.c libc: Fix some MISRA defects 2018-08-30 16:21:59 +01:00
snprintf.c Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
strchr.c libc: Cleanup FreeBSD files 2018-08-22 10:26:05 +01:00
strcmp.c libc: Cleanup FreeBSD files 2018-08-22 10:26:05 +01:00
strlcpy.c libc: Adapt strlcpy to this codebase 2018-11-02 13:41:33 +00:00
strlen.c libc: Introduce cdefs.h, assert.h and strlen.c 2018-08-22 10:26:04 +01:00
strncmp.c libc: Cleanup FreeBSD files 2018-08-22 10:26:05 +01:00
strnlen.c libc: Cleanup FreeBSD files 2018-08-22 10:26:05 +01:00
strrchr.c libc: Integrate strrchr in libc 2018-10-23 18:27:45 +01:00