• Alexei Fedorov's avatar
    libc/memset: Implement function in assembler · e7d344de
    Alexei Fedorov authored
    
    
    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: default avatarAlexei Fedorov <Alexei.Fedorov@arm.com>
    e7d344de
libc.mk 733 Bytes