提交 88590148 编写于 作者: Y York Sun 提交者: Albert ARIBAUD

armv8: Flush dcache before switching to EL2

For ARMv8, U-boot has been running at EL3 with cache and MMU enabled.
Without proper setup for EL2, cache and MMU are both disabled (out of
reset). Before switching, we need to flush the dcache to make sure the
data is in the main memory.
Signed-off-by: NYork Sun <yorksun@freescale.com>
Acked-by: NDavid.Feng <fenghua@phytium.com.cn>
上级 0883b0b5
......@@ -199,6 +199,7 @@ static void do_nonsec_virt_switch(void)
#ifdef CONFIG_ARM64
smp_kick_all_cpus();
flush_dcache_all(); /* flush cache before swtiching to EL2 */
armv8_switch_to_el2();
#ifdef CONFIG_ARMV8_SWITCH_TO_EL1
armv8_switch_to_el1();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册