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

Function devmap_ptov

freebsd/kern/subr_devmap.c:213–227  ·  view source on GitHub ↗

* Look up the given physical address in the static mapping data and return the * corresponding virtual address, or NULL if not found. */

Source from the content-addressed store, hash-verified

211 * corresponding virtual address, or NULL if not found.
212 */
213void *
214devmap_ptov(vm_paddr_t pa, vm_size_t size)
215{
216 const struct devmap_entry *pd;
217
218 if (devmap_table == NULL)
219 return (NULL);
220
221 for (pd = devmap_table; pd->pd_size != 0; ++pd) {
222 if (pa >= pd->pd_pa && pa + size <= pd->pd_pa + pd->pd_size)
223 return ((void *)(pd->pd_va + (pa - pd->pd_pa)));
224 }
225
226 return (NULL);
227}
228
229/*
230 * Look up the given virtual address in the static mapping data and return the

Callers 5

imx_soc_typeFunction · 0.85
imx_wdog_cpu_resetFunction · 0.85
imx_wdog_init_last_resetFunction · 0.85
pmap_mapdevFunction · 0.85
pmap_mapdev_attrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected