commit 6e4eddb298de842f598521c075df71f363aaff7f
parent b4990f01971abc97e9529bc43e285e26172d22f0
Author: oblique <psyberbits@gmail.com>
Date: Thu, 25 Apr 2013 11:31:11 +0300
mmu.c: disable SCTLR.AFE in mmu_init
this is needed for AP[2:0] access permissions model.
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/mmu.c b/kernel/mmu.c
@@ -28,14 +28,14 @@ mmu_init(void)
/* set DACR */
"ldr v1, =0x55555555 \n\t"
"mcr p15, 0, v1, c3, c0, 0 \n\t"
+ /* make sure that SCTLR.AFE is disabled */
+ "mrc p15, 0, v1, c1, c0, 0 \n\t"
+ "bic v1, v1, #(1 << 29) \n\t"
+ "mcr p15, 0, v1, c1, c0, 0 \n\t"
/* invalidate TLB */
"mcr p15, 0, v1, c8, c7, 0 \n\t"
/* completes the TLB invalidation */
"dsb \n\t"
- /* enable AFE */
- "mrc p15, 0, v1, c1, c0, 0 \n\t"
- "orr v1, v1, #(1 << 29) \n\t"
- "mcr p15, 0, v1, c1, c0, 0 \n\t"
: : : "v1", "memory"
);
}