]> Zhao Yanbai Git Server - minix.git/commitdiff
arm:clarify pagetable code. 57/857/1
authorKees Jongenburger <kees.jongenburger@gmail.com>
Fri, 13 Sep 2013 07:48:45 +0000 (09:48 +0200)
committerKees Jongenburger <kees.jongenburger@gmail.com>
Thu, 26 Sep 2013 09:45:44 +0000 (11:45 +0200)
Make it clear that non RW mapped memory is mapped RO.

servers/vm/arch/i386/pagetable.c

index 97200278a8b64c7784600902e46a1889a84bfe71..76d285195e3bad39b0e71169b3aa471fc0db519e 100644 (file)
@@ -1139,13 +1139,16 @@ void pt_init(void)
 #endif
                        if(flags & VMMF_WRITE)
                                kern_mappings[pindex].flags |= ARCH_VM_PTE_RW;
+#if defined(__arm__)
+                       else 
+                               kern_mappings[pindex].flags |= ARCH_VM_PTE_RO;
+#endif
+
 #if defined(__i386__)
                        if(flags & VMMF_GLO)
                                kern_mappings[pindex].flags |= I386_VM_GLOBAL;
-#elif defined(__arm__)
-                       else
-                               kern_mappings[pindex].flags |= ARCH_VM_PTE_RO;
 #endif
+
                        if(addr % VM_PAGE_SIZE)
                                panic("VM: addr unaligned: %lu", addr);
                        if(len % VM_PAGE_SIZE)