Commit 5a9f5890 authored by Konstantin Porotchkin's avatar Konstantin Porotchkin Committed by Manish Pandey
Browse files

plat/marvell/armada: cleanup MSS SRAM if used for copy



This patch cleans up the MSS SRAM if it was used for MSS image
copy (secure boot mode).

Change-Id: I23f600b512050f75e63d59541b9c21cef21ed313
Signed-off-by: default avatarKonstantin Porotchkin <kostap@marvell.com>
Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/boot/atf/+/30099

Reviewed-by: default avatarStefan Chulski <stefanc@marvell.com>
Tested-by: default avatarsa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com>
parent 109873cf
......@@ -161,6 +161,11 @@ static int mss_image_load(uint32_t src_addr, uint32_t size,
bl2_plat_configure_mss_windows(mss_regs);
/* Wipe the MSS SRAM after using it as copy buffer */
if (sram) {
memset((void *)sram, 0, MSS_SRAM_SIZE);
}
/* Release M3 from reset */
mmio_write_32(MSS_M3_RSTCR(mss_regs),
(MSS_M3_RSTCR_RST_OFF << MSS_M3_RSTCR_RST_OFFSET));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment