From a48cf24742b3eb02c8c01beed582be79d345ad34 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Tue, 1 Sep 2020 14:50:43 +0000 Subject: [PATCH] Ensure the tlbi has completed before setting SCTLR When enabling the MMU on arm64 we need to ensure the tlb invalidation has completed before setting the enable bit in the SCTLR register. Reported by: alc Sponsored by: Innovate UK --- sys/arm64/arm64/locore.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index 0268ab6ef00c..8054ec83affb 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -677,6 +677,8 @@ start_mmu: /* Invalidate the TLB */ tlbi vmalle1is + dsb ish + isb ldr x2, mair msr mair_el1, x2