-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Description
When zeroing a range of normal memory, it is much more efficient to use the DC VZA instruction (if the implementation supports it) than store instructions . Trusted Firmware currently doesn't make use of this instruction. The DCZID_EL0 register should be read to determine if DC VZA is supported and the block size to use.
In particular:
- The
memset()implementation inlib/stdlib/mem.cis often called with zero as the val argument, which results in a loop of STRB instructions. - The
zeromem16implementation inlib/aarch64/misc_helpers.Suses STP and STRB instructions. This is used for zeroing out the BSS and coherent RAM sections.
There may be other places.