user_space #4
@ -162,7 +162,8 @@ int pageMap(vaddr_t vaddr, paddr_t paddr, int flags)
|
||||
|
||||
__native_flush_tlb_single((vaddr_t)pt);
|
||||
memset((void *)pt, 0, PAGE_SIZE);
|
||||
} else {
|
||||
}
|
||||
{
|
||||
|
||||
// Already mapped ? Remove old mapping
|
||||
if (pt[ptEntry].present) {
|
||||
@ -223,7 +224,7 @@ paddr_t pagingGetPaddr(vaddr_t vaddr)
|
||||
/* Get the page directory entry and table entry index for this
|
||||
address */
|
||||
unsigned pdEntry = vaddr >> PD_SHIFT;
|
||||
unsigned ptEntry = vaddr >> PT_SHIFT;
|
||||
unsigned ptEntry = vaddr >> PT_SHIFT & PTE_MASK;
|
||||
unsigned pageOffset = vaddr & PAGE_MASK;
|
||||
|
||||
// Thank to mirroring, we can access the PD
|
||||
|
Loading…
Reference in New Issue
Block a user