Replace some memset call by zeromem
Replace all use of memset by zeromem when zeroing moderately-sized
structure by applying the following transformation:
memset(x, 0, sizeof(x)) => zeromem(x, sizeof(x))

As the Trusted Firmware is compiled with -ffreestanding, it forbids the
compiler from using __builtin_memset and forces it to generate calls to
the slow memset implementation. Zeromem is a near drop in replacement
for this use case, with a more efficient implementation on both AArch32
and AArch64.

Change-Id: Ia7f3a90e888b96d056881be09f0b4d65b41aa79e
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
1 parent 308d359 commit 32f0d3c6c3fb1fb9353ec0b82ddb099281b9328c
@Douglas Raillard Douglas Raillard authored on 26 Jan 2017
Showing 18 changed files
View
bl32/sp_min/sp_min_main.c
View
drivers/auth/mbedtls/mbedtls_x509_parser.c
View
drivers/emmc/emmc.c
View
drivers/io/io_block.c
View
drivers/io/io_fip.c
View
drivers/io/io_memmap.c
View
drivers/partition/gpt.c
View
lib/el3_runtime/aarch32/context_mgmt.c
View
lib/el3_runtime/aarch64/context_mgmt.c
View
lib/psci/psci_common.c
View
plat/arm/common/arm_bl2_setup.c
View
plat/arm/css/drivers/scpi/css_scpi.c
View
plat/nvidia/tegra/common/drivers/memctrl/memctrl.c
View
plat/qemu/qemu_bl2_setup.c
View
plat/rockchip/rk3399/drivers/dram/dram_spec_timing.c
View
plat/xilinx/zynqmp/pm_service/pm_client.c
View
services/spd/opteed/opteed_common.c
View
services/spd/tspd/tspd_common.c