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

Function pmap_pml4e

freebsd/amd64/amd64/pmap.c:1350–1367  ·  view source on GitHub ↗

Return a pointer to the PML4 slot that corresponds to a VA */

Source from the content-addressed store, hash-verified

1348
1349/* Return a pointer to the PML4 slot that corresponds to a VA */
1350static __inline pml4_entry_t *
1351pmap_pml4e(pmap_t pmap, vm_offset_t va)
1352{
1353 pml5_entry_t *pml5e;
1354 pml4_entry_t *pml4e;
1355 pt_entry_t PG_V;
1356
1357 if (pmap_is_la57(pmap)) {
1358 pml5e = pmap_pml5e(pmap, va);
1359 PG_V = pmap_valid_bit(pmap);
1360 if ((*pml5e & PG_V) == 0)
1361 return (NULL);
1362 pml4e = (pml4_entry_t *)PHYS_TO_DMAP(*pml5e & PG_FRAME);
1363 } else {
1364 pml4e = pmap->pm_pmltop;
1365 }
1366 return (&pml4e[pmap_pml4e_index(va)]);
1367}
1368
1369static __inline pml4_entry_t *
1370pmap_pml4e_u(pmap_t pmap, vm_offset_t va)

Callers 12

pmap_pdpeFunction · 0.85
_pmap_unwire_ptpFunction · 0.85
pmap_allocpte_nosleepFunction · 0.85
pmap_removeFunction · 0.85
pmap_protectFunction · 0.85
pmap_enter_largepageFunction · 0.85
pmap_unwireFunction · 0.85
pmap_copyFunction · 0.85
pmap_adviseFunction · 0.85
pmap_get_mappingFunction · 0.85
pmap_pkru_update_rangeFunction · 0.85
pmap.cFile · 0.85

Calls 4

pmap_is_la57Function · 0.85
pmap_pml5eFunction · 0.85
pmap_valid_bitFunction · 0.85
pmap_pml4e_indexFunction · 0.85

Tested by

no test coverage detected