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

Function pmap_pte2

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

* If the given pmap is not the current or kernel pmap, the returned * pte2 must be released by passing it to pmap_pte2_release(). */

Source from the content-addressed store, hash-verified

1861 * pte2 must be released by passing it to pmap_pte2_release().
1862 */
1863static pt2_entry_t *
1864pmap_pte2(pmap_t pmap, vm_offset_t va)
1865{
1866 pt1_entry_t pte1;
1867 vm_paddr_t pt2pg_pa;
1868
1869 pte1 = pte1_load(pmap_pte1(pmap, va));
1870 if (pte1_is_section(pte1))
1871 panic("%s: attempt to map PTE1", __func__);
1872 if (pte1_is_link(pte1)) {
1873 /* Are we current address space or kernel? */
1874 if (pmap_is_current(pmap))
1875 return (pt2map_entry(va));
1876 /* Note that L2 page table size is not equal to PAGE_SIZE. */
1877 pt2pg_pa = trunc_page(pte1_link_pa(pte1));
1878 mtx_lock(&PMAP2mutex);
1879 if (pte2_pa(pte2_load(PMAP2)) != pt2pg_pa) {
1880 pte2_store(PMAP2, PTE2_KPT(pt2pg_pa));
1881 tlb_flush((vm_offset_t)PADDR2);
1882 }
1883 return (PADDR2 + (arm32_btop(va) & (NPTE2_IN_PG - 1)));
1884 }
1885 return (NULL);
1886}
1887
1888/*
1889 * Releases a pte2 that was obtained from pmap_pte2().

Callers 5

pmap_extractFunction · 0.85
pmap_extract_and_holdFunction · 0.85
pmap_pv_reclaimFunction · 0.85
pmap_mincoreFunction · 0.85
pmap_pid_dumpFunction · 0.85

Calls 13

pte1_loadFunction · 0.85
pmap_pte1Function · 0.85
pte1_is_sectionFunction · 0.85
pte1_is_linkFunction · 0.85
pt2map_entryFunction · 0.85
pte1_link_paFunction · 0.85
pte2_paFunction · 0.85
pte2_loadFunction · 0.85
pte2_storeFunction · 0.85
tlb_flushFunction · 0.85
pmap_is_currentFunction · 0.70
panicFunction · 0.50

Tested by

no test coverage detected