Commit 8f5c68ef authored by Mathieu Maret's avatar Mathieu Maret

Fix flag usage

parent a120647e
......@@ -138,7 +138,7 @@ int pageMap(vaddr_t vaddr, paddr_t paddr, int flags)
paddr_t ptPhy = allocPhyPage();
memset((void *)ptPhy, 0, PAGE_SIZE);
pd[pdEntry].user = (flags & PAGING_MEM_USER) ? 0:1;
pd[pdEntry].user = (flags & PAGING_MEM_USER) ? 1:0;
pd[pdEntry].present = 1;
pd[pdEntry].write = 1;
pd[pdEntry].pt_addr = (ptPhy >> PT_SHIFT);
......@@ -154,9 +154,9 @@ int pageMap(vaddr_t vaddr, paddr_t paddr, int flags)
refPhyPage(pd[pdEntry].pt_addr << PAGE_SHIFT);
}
pt[ptEntry].user = (flags & PAGING_MEM_USER) ? 0 : 1;
pt[ptEntry].user = (flags & PAGING_MEM_USER) ? 1 : 0;
pt[ptEntry].present = 1;
pt[ptEntry].write = (flags & PAGING_MEM_WRITE) ? 0 : 1;
pt[ptEntry].write = (flags & PAGING_MEM_WRITE) ? 1 : 0;
pt[ptEntry].paddr = paddr >> PAGE_SHIFT;
refPhyPage(paddr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment