arm:clarify pagetable code.
Make it clear that non RW mapped memory is mapped RO.
This commit is contained in:
parent
b08490a35b
commit
b82f01ea69
1 changed files with 6 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue