arm:clarify pagetable code.

Make it clear that non RW mapped memory is mapped RO.
This commit is contained in:
Kees Jongenburger 2013-09-13 09:48:45 +02:00
parent b08490a35b
commit b82f01ea69

View 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)