FreeBSD/sys/i386/i386/pmap.c
/*
 * Removes a 2- or 4MB page mapping from the kernel pmap.
 */
Removes a 2- or 4MB page mapping from the kernel pmap.
Removes a 2 - or 4MB page mapping from the kernel pmap .
static void
pmap_remove_kernel_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va)
{
	pd_entry_t newpde;
	vm_paddr_t mptepa;
	vm_page_t mpte;
	PMAP_LOCK_ASSERT(pmap, MA_OWNED);
	mpte = pmap_lookup_pt_page(pmap, va);
	if (mpte == NULL)
		panic("pmap_remove_kernel_pde: Missing pt page.");
	pmap_remove_pt_page(pmap, mpte);
	mptepa = VM_PAGE_TO_PHYS(mpte);
	newpde = mptepa | PG_M | PG_A | PG_RW | PG_V;
	pagezero((void *)&KPTmap[i386_btop(trunc_4mpage(va))]);
	if (workaround_erratum383)
		pmap_update_pde(pmap, va, pde, newpde);
	else 
		pmap_kenter_pde(va, newpde);
	pmap_invalidate_page(pmap, (vm_offset_t)vtopte(va));
}
static void pmap_remove_kernel_pde ( pmap_t pmap , pd_entry_t * pde , vm_offset_t va ) { pd_entry_t newpde ; vm_paddr_t mptepa ; vm_page_t mpte ; PMAP_LOCK_ASSERT ( pmap , MA_OWNED ) ; mpte = pmap_lookup_pt_page ( pmap , va ) ; if ( mpte == NULL ) panic ( " " ) ; pmap_remove_pt_page ( pmap , mpte ) ; mptepa = VM_PAGE_TO_PHYS ( mpte ) ; newpde = mptepa | PG_M | PG_A | PG_RW | PG_V ; pagezero ( ( void * ) & KPTmap [ i386_btop ( trunc_4mpage ( va ) ) ] ) ; if ( workaround_erratum383 ) pmap_update_pde ( pmap , va , pde , newpde ) ; else pmap_kenter_pde ( va , newpde ) ; pmap_invalidate_page ( pmap , ( vm_offset_t ) vtopte ( va ) ) ; }
Removes a 2- or 4MB page mapping from the kernel pmap.
Removes a 2 - or 4MB page mapping from the kernel pmap .
/*
	 * Initialize the page table page.
	 */ /*
	 * Remove the mapping.
	 */ /*
	 * Invalidate the recursive mapping of the page table page.
	 */