Skip to content

Commit 2a60271

Browse files
arve-androidfourkbomb
authored andcommitted
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: Arve Hjønnevåg <arve@android.com>
1 parent 34fb31d commit 2a60271

File tree

1 file changed

+2
-0
lines changed
  • arch/arm/boot/compressed

1 file changed

+2
-0
lines changed

arch/arm/boot/compressed/head.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,8 @@ __armv7_mmu_cache_on:
794794
bic r6, r6, #1 << 31 @ 32-bit translation system
795795
bic r6, r6, #(7 << 0) | (1 << 4) @ use only ttbr0
796796
mcrne p15, 0, r3, c2, c0, 0 @ load page table pointer
797+
mcrne p15, 0, r0, c8, c7, 0 @ flush I,D TLBs
798+
mcr p15, 0, r0, c7, c5, 4 @ ISB
797799
mcrne p15, 0, r1, c3, c0, 0 @ load domain access control
798800
mcrne p15, 0, r6, c2, c0, 2 @ load ttb control
799801
#endif

0 commit comments

Comments
 (0)