Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5813f5de authored by Arve Hjønnevåg's avatar Arve Hjønnevåg Committed by John Stultz
Browse files

ARM: decompressor: Flush tlb before swiching domain 0 to client mode



If the bootloader used a page table that is incompatible with domain 0
in client mode, and boots with the mmu on, then swithing domain 0 to
client mode causes a fault if we don't flush the tlb after updating
the page table pointer.

v2: Add ISB before loading dacr.

Signed-off-by: default avatarArve Hjønnevåg <arve@android.com>
parent 69a800c9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -778,6 +778,8 @@ __armv7_mmu_cache_on:
		bic     r6, r6, #1 << 31        @ 32-bit translation system
		bic     r6, r6, #3 << 0         @ use only ttbr0
		mcrne	p15, 0, r3, c2, c0, 0	@ load page table pointer
		mcrne	p15, 0, r0, c8, c7, 0	@ flush I,D TLBs
		mcr	p15, 0, r0, c7, c5, 4	@ ISB
		mcrne	p15, 0, r1, c3, c0, 0	@ load domain access control
		mcrne   p15, 0, r6, c2, c0, 2   @ load ttb control
#endif