Manual Page Search Parameters

PMAP_KEXTRACT(9) Kernel Developer's Manual PMAP_KEXTRACT(9)

pmap_kextract, vtophysextract a physical address from the kernel page table

#include <sys/param.h>
#include <vm/vm.h>
#include <vm/pmap.h>

vm_paddr_t
pmap_kextract(vm_offset_t va);

vm_paddr_t
vtophys(vm_offset_t va);

The () function retrieves the underlying physical memory address corresponding to the given kernel virtual address va. The caller is responsible for ensuring that va belongs to a valid mapping in the kernel address space. The returned physical address is only meaningful as long as the mapping remains stable, so the caller must also have some knowledge or guarantee of the mapping's lifetime. For example, it is invalid to call pmap_kextract() with the address of a malloc'd object while there is a possibility for that object to be freed concurrently.

Unlike pmap_extract(9), () is safe to be called from any context; it has no internal locking or sleep.

() is an alias for pmap_kextract() and behaves identically.

The pmap_kextract() function returns the physical address of memory mapped at the kernel virtual address va.

pmap_kextract() generally does not fail. However, if supplied with an illegitimate value for va, the function may return zero, an invalid non-zero value, or call panic(9).

pmap(9), pmap_extract(9)

This manual page was written by Mina Galić <FreeBSD@igalic.co>, based on the pmap_extract(9) page written by Bruce M Simpson <bms@spc.org>.

October 16, 2023 dev