FreeBSD/sys/arm/arm/pmap-v4.c
/*
 * pmap_map_section:
 *
 *	Create a single section mapping.
 */
Create a single section mapping.
Create a single section mapping .
void
pmap_map_section(vm_offset_t l1pt, vm_offset_t va, vm_offset_t pa,
    int prot, int cache)
{
	pd_entry_t *pde = (pd_entry_t *) l1pt;
	pd_entry_t fl;
	KASSERT(((va | pa) & L1_S_OFFSET) == 0, ("ouin2"));
	switch (cache) {
	case PTE_NOCACHE:
	default:
		fl = 0;
		break;
	case PTE_CACHE:
		fl = pte_l1_s_cache_mode;
		break;
	case PTE_PAGETABLE:
		fl = pte_l1_s_cache_mode_pt;
		break;
	}
	pde[va >> L1_S_SHIFT] = L1_S_PROTO | pa |
	    L1_S_PROT(PTE_KERNEL, prot) | fl | L1_S_DOM(PMAP_DOMAIN_KERNEL);
	PTE_SYNC(&pde[va >> L1_S_SHIFT]);
}
void pmap_map_section ( vm_offset_t l1pt , vm_offset_t va , vm_offset_t pa , int prot , int cache ) { pd_entry_t * pde = ( pd_entry_t * ) l1pt ; pd_entry_t fl ; KASSERT ( ( ( va | pa ) & L1_S_OFFSET ) == 0 , ( " " ) ) ; switch ( cache ) { case PTE_NOCACHE : default : fl = 0 ; break ; case PTE_CACHE : fl = pte_l1_s_cache_mode ; break ; case PTE_PAGETABLE : fl = pte_l1_s_cache_mode_pt ; break ; } pde [ va >> L1_S_SHIFT ] = L1_S_PROTO | pa | L1_S_PROT ( PTE_KERNEL , prot ) | fl | L1_S_DOM ( PMAP_DOMAIN_KERNEL ) ; PTE_SYNC ( & pde [ va >> L1_S_SHIFT ] ) ; }
pmap_map_section:
      Create a single section mapping.
pmap_map_section : Create a single section mapping .