diff options
author | York Sun | 2014-03-31 14:40:32 -0700 |
---|---|---|
committer | Albert ARIBAUD | 2014-04-07 22:19:00 +0200 |
commit | 88590148fa8b7e2d7ca910a7a03b5c5700af58e4 (patch) | |
tree | f7e4f3bf60c3fc2446fafb779a5bc560a2ce452f | |
parent | 0883b0b58eac1a82e4c332f4506cdaeb92e09727 (diff) |
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: York Sun <yorksun@freescale.com>
Acked-by: David.Feng <fenghua@phytium.com.cn>
-rw-r--r-- | arch/arm/lib/bootm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index a8295bf1f1e..9782ddbb244 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -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(); |