Changeset View
Changeset View
Standalone View
Standalone View
sys/i386/i386/pmap.c
Show First 20 Lines • Show All 2,151 Lines • ▼ Show 20 Lines | _pmap_allocpte(pmap_t pmap, u_int ptepindex, u_int flags) | ||||
/* | /* | ||||
* Map the pagetable page into the process address space, if | * Map the pagetable page into the process address space, if | ||||
* it isn't already there. | * it isn't already there. | ||||
*/ | */ | ||||
pmap->pm_stats.resident_count++; | pmap->pm_stats.resident_count++; | ||||
ptepa = VM_PAGE_TO_PHYS(m); | ptepa = VM_PAGE_TO_PHYS(m); | ||||
KASSERT((pmap->pm_pdir[ptepindex] & PG_V) == 0, | |||||
("%s: page directory entry %#jx is valid", | |||||
__func__, (uintmax_t)pmap->pm_pdir[ptepindex])); | |||||
pmap->pm_pdir[ptepindex] = | pmap->pm_pdir[ptepindex] = | ||||
(pd_entry_t) (ptepa | PG_U | PG_RW | PG_V | PG_A | PG_M); | (pd_entry_t)(ptepa | PG_U | PG_RW | PG_V | PG_A | PG_M); | ||||
return (m); | return (m); | ||||
} | } | ||||
static vm_page_t | static vm_page_t | ||||
pmap_allocpte(pmap_t pmap, vm_offset_t va, u_int flags) | pmap_allocpte(pmap_t pmap, vm_offset_t va, u_int flags) | ||||
{ | { | ||||
u_int ptepindex; | u_int ptepindex; | ||||
▲ Show 20 Lines • Show All 4,239 Lines • Show Last 20 Lines |