Lines Matching full:pte

94 #include <machine/pte.h>
342 * Called when removing pte entry from ptbl.
377 * Free ptbl pages if there are no pte etries in this ptbl. in ptbl_unhold()
392 * Increment hold count for ptbl pages. This routine is used when a new pte
424 * Clean pte entry, try to free page table page if requested.
435 pte_t *pte; in pte_remove() local
444 pte = &ptbl[ptbl_idx]; in pte_remove()
446 if (pte == NULL || !PTE_ISVALID(pte)) in pte_remove()
449 if (PTE_ISWIRED(pte)) in pte_remove()
452 /* Get vm_page_t for mapped pte. */ in pte_remove()
453 m = PHYS_TO_VM_PAGE(PTE_PA(pte)); in pte_remove()
456 if (PTE_ISMANAGED(pte)) { in pte_remove()
457 if (PTE_ISMODIFIED(pte)) in pte_remove()
460 if (PTE_ISREFERENCED(pte)) in pte_remove()
479 *pte = 0; in pte_remove()
496 * Insert PTE for a given page and virtual address.
504 pte_t *ptbl, *pte, pte_tmp; in pte_enter() local
520 pte = &ptbl[ptbl_idx]; in pte_enter()
526 pte = &pmap->pm_pdir[pdir_idx][ptbl_idx]; in pte_enter()
527 if (PTE_ISVALID(pte)) { in pte_enter()
531 * pte is not used, increment hold count in pte_enter()
559 *pte = pte_tmp; in pte_enter()
571 pte_t *pte; in pte_vatopa() local
573 pte = pte_find(pmap, va); in pte_vatopa()
574 if ((pte != NULL) && PTE_ISVALID(pte)) in pte_vatopa()
575 pa = (PTE_PA(pte) | (va & PTE_PA_MASK)); in pte_vatopa()
579 /* Get a pointer to a PTE in a page table. */
594 /* Get a pointer to a PTE in a page table, or the next closest (greater) one. */
600 pte_t *pte; in pte_find_next() local
613 pte = &pdir[i][j]; in pte_find_next()
614 if (!PTE_ISVALID(pte)) in pte_find_next()
617 return (pte); in pte_find_next()
627 pte_t *pte; in kernel_pte_alloc() local
650 pte = &(kernel_pmap->pm_pdir[PDIR_IDX(va)][PTBL_IDX(va)]); in kernel_pte_alloc()
652 *pte = PTE_RPN_FROM_PA(kernload + (va - kernstart)); in kernel_pte_alloc()
653 *pte |= PTE_M | PTE_SR | PTE_SW | PTE_SX | PTE_WIRED | in kernel_pte_alloc()
672 /* Allocate PTE tables for kernel KVA. */ in mmu_booke_alloc_kernel_pgtables()
726 pte_t *pte; in mmu_booke_sync_icache() local
739 pte = pte_find(pm, va); in mmu_booke_sync_icache()
740 valid = (pte != NULL && PTE_ISVALID(pte)) ? 1 : 0; in mmu_booke_sync_icache()
742 pa = PTE_PA(pte); in mmu_booke_sync_icache()
880 pte_t *pte; in mmu_booke_quick_enter_page() local
891 pte = pte_find(kernel_pmap, qaddr); in mmu_booke_quick_enter_page()
893 KASSERT(*pte == 0, ("mmu_booke_quick_enter_page: PTE busy")); in mmu_booke_quick_enter_page()
903 *pte = PTE_RPN_FROM_PA(paddr) | flags; in mmu_booke_quick_enter_page()
915 pte_t *pte; in mmu_booke_quick_remove_page() local
917 pte = pte_find(kernel_pmap, addr); in mmu_booke_quick_remove_page()
921 KASSERT(*pte != 0, in mmu_booke_quick_remove_page()
922 ("mmu_booke_quick_remove_page: PTE not in use")); in mmu_booke_quick_remove_page()
924 *pte = 0; in mmu_booke_quick_remove_page()