MCPcopy Create free account
hub / github.com/F-Stack/f-stack / pmap_pt2pg_init

Function pmap_pt2pg_init

freebsd/arm/arm/pmap-v6.c:1682–1708  ·  view source on GitHub ↗

* Init just allocated page as L2 page table(s) holder * and return its physical address. */

Source from the content-addressed store, hash-verified

1680 * and return its physical address.
1681 */
1682static __inline vm_paddr_t
1683pmap_pt2pg_init(pmap_t pmap, vm_offset_t va, vm_page_t m)
1684{
1685 vm_paddr_t pa;
1686 pt2_entry_t *pte2p;
1687
1688 /* Check page attributes. */
1689 if (m->md.pat_mode != pt_memattr)
1690 pmap_page_set_memattr(m, pt_memattr);
1691
1692 /* Zero page and init wire counts. */
1693 pa = pmap_pt2pg_zero(m);
1694 pt2_wirecount_init(m);
1695
1696 /*
1697 * Map page to PT2MAP address space for given pmap.
1698 * Note that PT2MAP space is shared with all pmaps.
1699 */
1700 if (pmap == kernel_pmap)
1701 pmap_kenter_pt2tab(va, PTE2_KPT(pa));
1702 else {
1703 pte2p = pmap_pt2tab_entry(pmap, va);
1704 pt2tab_store(pte2p, PTE2_KPT_NG(pa));
1705 }
1706
1707 return (pa);
1708}
1709
1710/*
1711 * Initialize the pmap module.

Callers 3

pmap_growkernelFunction · 0.85
_pmap_allocpte2Function · 0.85
pmap_demote_pte1Function · 0.85

Calls 6

pmap_pt2pg_zeroFunction · 0.85
pt2_wirecount_initFunction · 0.85
pmap_kenter_pt2tabFunction · 0.85
pmap_pt2tab_entryFunction · 0.85
pt2tab_storeFunction · 0.85
pmap_page_set_memattrFunction · 0.70

Tested by

no test coverage detected