SEL4PROJ / elfloader-tool

DEPRECATED: This has been moved to https://github.com/seL4/seL4_tools
Other
4 stars 7 forks source link

elf loader doesnt flush ITLB #2

Closed newsham closed 9 years ago

newsham commented 9 years ago

The boot loader is flushing the DTLB but not the ITLB when turning on the MMU. This causes problems on AM335x during boot. The following patch fixes this issue:

project tools/elfloader/
diff --git a/src/arch-arm/mmu-v7a.S b/src/arch-arm/mmu-v7a.S
index ce40478..8be824a 100644
--- a/src/arch-arm/mmu-v7a.S
+++ b/src/arch-arm/mmu-v7a.S
@@ -55,8 +55,8 @@ arm_enable_mmu:
     ldr     r0, =_boot_pd
     orr     r1, r0, #0x19
     mcr     p15, 0, r1, c2, c0, 0
-    /* Invalidate TLB */
-    mcr     p15, 0, r1, c8, c6, 0 
+    /* Invalidate ITLB and DTLB */
+    mcr     p15, 0, r1, c8, c7, 0

     /*
      * Setup client to only have access to domain 0, and setup
AdrianDanis commented 9 years ago

Fixed by https://github.com/seL4/elfloader-tool/commit/d2e060c8ed4bcde7d61f97a90506493f6fa3999a