aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArve Hjønnevåg <arve@android.com>2012-11-30 17:05:40 -0800
committerJoonas Kylmälä <joonas.kylmala@iki.fi>2019-09-02 13:04:55 -0400
commit85006537f34367710e7c9ae4aa0791ca5101ef46 (patch)
tree0520083c452fae4ee1f5e37022c27d971a3b762d
parenta55aa89aab90fae7c815b0551b07be37db359d76 (diff)
downloadkernel_replicant_linux-85006537f34367710e7c9ae4aa0791ca5101ef46.tar.gz
kernel_replicant_linux-85006537f34367710e7c9ae4aa0791ca5101ef46.tar.bz2
kernel_replicant_linux-85006537f34367710e7c9ae4aa0791ca5101ef46.zip
ANDROID: 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>
-rw-r--r--arch/arm/boot/compressed/head.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index e59d14679fb0..f1f4681715bf 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -834,6 +834,8 @@ __armv7_mmu_cache_on:
bic r6, r6, #1 << 31 @ 32-bit translation system
bic r6, r6, #(7 << 0) | (1 << 4) @ 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