summaryrefslogtreecommitdiff
path: root/plat/intel
diff options
context:
space:
mode:
authorTien Hock, Loh <tien.hock.loh@intel.com>2019-03-07 11:28:05 +0800
committerTien Hock, Loh <tien.hock.loh@intel.com>2019-03-07 11:28:05 +0800
commitbf8b8fb657a6145699550258a5a6839bd412aeff (patch)
treee6c0b8a3e5131a91c5da59529bc8a959baae97ab /plat/intel
parent1cf55aba4902d43c95e5a24acf6d85de96923dc0 (diff)
plat: intel: Improve ECC scrubbing performance
We should be using zeromem to scrub memory instead of memset. This would improve the performance by 200x Signed-off-by: Tien Hock, Loh <tien.hock.loh@intel.com>
Diffstat (limited to 'plat/intel')
-rw-r--r--plat/intel/soc/stratix10/soc/s10_memory_controller.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/plat/intel/soc/stratix10/soc/s10_memory_controller.c b/plat/intel/soc/stratix10/soc/s10_memory_controller.c
index 851fc59a..ed06f549 100644
--- a/plat/intel/soc/stratix10/soc/s10_memory_controller.c
+++ b/plat/intel/soc/stratix10/soc/s10_memory_controller.c
@@ -8,6 +8,7 @@
#include <arch_helpers.h>
#include <errno.h>
#include <lib/mmio.h>
+#include <lib/utils.h>
#include <common/debug.h>
#include <drivers/delay_timer.h>
#include <platform_def.h>
@@ -403,7 +404,7 @@ void configure_hmc_adaptor_regs(void)
INFO("Scrubbing ECC\n");
/* ECC Scrubbing */
- memset(DRAM_BASE, 0, DRAM_SIZE);
+ zeromem(DRAM_BASE, DRAM_SIZE);
} else {
INFO("ECC is disabled.\n");
}