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>
This commit is contained in:
Tien Hock, Loh 2019-03-07 11:28:05 +08:00
parent 1cf55aba49
commit bf8b8fb657
1 changed files with 2 additions and 1 deletions

View File

@ -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");
}