From: Kees Jongenburger Date: Fri, 13 Sep 2013 07:48:45 +0000 (+0200) Subject: arm:clarify pagetable code. X-Git-Tag: v3.3.0~782 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/verify-sign/verify.pl?a=commitdiff_plain;h=refs%2Fchanges%2F57%2F857%2F1;p=minix.git arm:clarify pagetable code. Make it clear that non RW mapped memory is mapped RO. --- diff --git a/servers/vm/arch/i386/pagetable.c b/servers/vm/arch/i386/pagetable.c index 97200278a..76d285195 100644 --- a/servers/vm/arch/i386/pagetable.c +++ b/servers/vm/arch/i386/pagetable.c @@ -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)