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

Function pmap_large_map_pte

freebsd/amd64/amd64/pmap.c:10154–10175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10152}
10153
10154static pt_entry_t *
10155pmap_large_map_pte(vm_offset_t va)
10156{
10157 pd_entry_t *pde;
10158 vm_page_t m;
10159 vm_paddr_t mphys;
10160
10161retry:
10162 pde = pmap_large_map_pde(va);
10163 if (*pde == 0) {
10164 m = pmap_large_map_getptp();
10165 if (m == NULL)
10166 goto retry;
10167 mphys = VM_PAGE_TO_PHYS(m);
10168 *pde = mphys | X86_PG_A | X86_PG_RW | X86_PG_V | pg_nx;
10169 PHYS_TO_VM_PAGE(DMAP_TO_PHYS((uintptr_t)pde))->ref_count++;
10170 } else {
10171 MPASS((*pde & X86_PG_PS) == 0);
10172 mphys = *pde & PG_FRAME;
10173 }
10174 return ((pt_entry_t *)PHYS_TO_DMAP(mphys) + pmap_pte_index(va));
10175}
10176
10177static vm_paddr_t
10178pmap_large_map_kextract(vm_offset_t va)

Callers 2

pmap_large_mapFunction · 0.85
pmap_large_map_wb_largeFunction · 0.85

Calls 4

pmap_large_map_pdeFunction · 0.85
pmap_large_map_getptpFunction · 0.85
PHYS_TO_VM_PAGEFunction · 0.85
pmap_pte_indexFunction · 0.85

Tested by

no test coverage detected