FreeBSD/sys/arm/arm/pmap-v6.c
/*
 *  Routine: pmap_extract
 *  Function:
 * 	Extract the physical page address associated
 *	with the given map/virtual_address pair.
 */
pmap_extract
Function:
Extract the physical page address associated
with the given map/virtual_address pair.
pmap_extract Function : Extract the physical page address associated with the given map / virtual_address pair .
vm_paddr_t
pmap_extract(pmap_t pmap, vm_offset_t va)
{
	vm_paddr_t pa;
	pt1_entry_t pte1;
	pt2_entry_t *pte2p;
	PMAP_LOCK(pmap);
	pte1 = pte1_load(pmap_pte1(pmap, va));
	if (pte1_is_section(pte1))
		pa = pte1_pa(pte1) | (va & PTE1_OFFSET);
	else if (pte1_is_link(pte1)) {
		pte2p = pmap_pte2(pmap, va);
		pa = pte2_pa(pte2_load(pte2p)) | (va & PTE2_OFFSET);
		pmap_pte2_release(pte2p);
	} else
		pa = 0;
	PMAP_UNLOCK(pmap);
	return (pa);
}
vm_paddr_t pmap_extract ( pmap_t pmap , vm_offset_t va ) { vm_paddr_t pa ; pt1_entry_t pte1 ; pt2_entry_t * pte2p ; PMAP_LOCK ( pmap ) ; pte1 = pte1_load ( pmap_pte1 ( pmap , va ) ) ; if ( pte1_is_section ( pte1 ) ) pa = pte1_pa ( pte1 ) | ( va & PTE1_OFFSET ) ; else if ( pte1_is_link ( pte1 ) ) { pte2p = pmap_pte2 ( pmap , va ) ; pa = pte2_pa ( pte2_load ( pte2p ) ) | ( va & PTE2_OFFSET ) ; pmap_pte2_release ( pte2p ) ; } else pa = 0 ; PMAP_UNLOCK ( pmap ) ; return ( pa ) ; }
Routine: pmap_extract
  Function:
      Extract the physical page address associated
      with the given map/virtual_address pair.
Routine : pmap_extract Function : Extract the physical page address associated with the given map / virtual_address pair .