Changeset View
Changeset View
Standalone View
Standalone View
head/sys/amd64/amd64/pmap.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 2,105 Lines • ▼ Show 20 Lines | for (i = 0; i < nkpt; i++) { | ||||
mpte->pindex = pmap_pde_pindex(KERNBASE) + i; | mpte->pindex = pmap_pde_pindex(KERNBASE) + i; | ||||
mpte->phys_addr = KPTphys + (i << PAGE_SHIFT); | mpte->phys_addr = KPTphys + (i << PAGE_SHIFT); | ||||
mpte->ref_count = 1; | mpte->ref_count = 1; | ||||
/* | /* | ||||
* Collect the page table pages that were replaced by a 2MB | * Collect the page table pages that were replaced by a 2MB | ||||
* page in create_pagetables(). They are zero filled. | * page in create_pagetables(). They are zero filled. | ||||
*/ | */ | ||||
if (i << PDRSHIFT < KERNend && | if ((vm_paddr_t)i << PDRSHIFT < KERNend && | ||||
pmap_insert_pt_page(kernel_pmap, mpte, false)) | pmap_insert_pt_page(kernel_pmap, mpte, false)) | ||||
panic("pmap_init: pmap_insert_pt_page failed"); | panic("pmap_init: pmap_insert_pt_page failed"); | ||||
} | } | ||||
PMAP_UNLOCK(kernel_pmap); | PMAP_UNLOCK(kernel_pmap); | ||||
vm_wire_add(nkpt); | vm_wire_add(nkpt); | ||||
/* | /* | ||||
* If the kernel is running on a virtual machine, then it must assume | * If the kernel is running on a virtual machine, then it must assume | ||||
▲ Show 20 Lines • Show All 8,564 Lines • Show Last 20 Lines |