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: Konstantin Porotchkin <kostap@marvell.com>
Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/boot/atf/+/30099
Reviewed-by: Stefan Chulski <stefanc@marvell.com>
Tested-by: sa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com>
This commit is contained in:
Konstantin Porotchkin 2020-06-17 13:07:15 +03:00 committed by Manish Pandey
parent 109873cf4a
commit 5a9f589051
1 changed files with 5 additions and 0 deletions

View File

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