Fix flag usage
This commit is contained in:
parent
a120647ecb
commit
8f5c68efaf
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user