From 2ee9f10b07b5b03b3db90ee6837cd85ac6d1de5b Mon Sep 17 00:00:00 2001 From: qjb Date: Wed, 7 Jan 2015 15:16:14 +0800 Subject: [PATCH] TrustZone: TLK before the start of the temporary closure of MMU --- arch/arm/boot/compressed/head.S | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index a8264aa9b03a..81288b49625b 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S @@ -11,6 +11,9 @@ #include #include +#ifdef CONFIG_ARM_TRUSTZONE +#undef CONFIG_MMU +#endif .arch armv7-a /* * Debugging stuff @@ -179,6 +182,9 @@ not_angel: @ determine final kernel image address mov r4, pc and r4, r4, #0xf8000000 +#ifdef CONFIG_ARM_TRUSTZONE + mov r4, #0 +#endif add r4, r4, #TEXT_OFFSET #else ldr r4, =zreladdr @@ -713,6 +719,9 @@ __armv7_mmu_cache_on: movne r1, #0xfffffffd @ domain 0 = client bic r6, r6, #1 << 31 @ 32-bit translation system bic r6, r6, #3 << 0 @ use only ttbr0 +#ifdef CONFIG_ARM_TRUSTZONE + mov r6, #0 +#endif 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 -- 2.34.1