mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2026-07-01 12:29:00 +00:00
It has been observed that enabling the MMU and the D-cache via
bl31_plat_enable_mmu() during warm reset path can cause the stack to
become corrupted. Thus, the caller of bl31_plat_enable_mmu() must
operate under the assumption that there's no usable stack until
MMU/D-cache are enabled.
Calling bl31_plat_enable_mmu() as part of bl31_warmboot() breaks this
assumption and, thus, returning from bl31_warmboot() will cause an
exception as the stack has been compromised by that point.
Fix this by enabling MMU/D-cache right before invoking bl31_warmboot().
This behavior has been observed on NXP's IMX95 platform.
Change-Id: I2a55020405057f893ac6688edf9e591a6cf79c65
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
(cherry picked from commit 5654972c4d)