xref: /freebsd/share/man/man9/pmap_kextract.9 (revision 2e620256bd76c449c835c604e404483437743011)
1.\"
2.\" SPDX-License-Identifier: BSD-2-Clause
3.\"
4.\" Copyright (c) 2023 The FreeBSD Foundation
5.\"
6.\" This manual page was written by Mina Galić <FreeBSD@igalic.co> under
7.\" sponsorship from the FreeBSD Foundation.
8.\"
9.Dd August 24, 2023
10.Dt PMAP_KEXTRACT 9
11.Os
12.Sh NAME
13.Nm pmap_kextract ,
14.Nm vtophys
15.Nd extract a physical address from the kernel page table
16.Sh SYNOPSIS
17.In sys/param.h
18.In vm/vm.h
19.In vm/pmap.h
20.Ft vm_paddr_t
21.Fo pmap_kextract
22.Fa "vm_offset_t va"
23.Fc
24.Ft vm_paddr_t
25.Fo vtophys
26.Fa "vm_offset_t va"
27.Fc
28.Sh DESCRIPTION
29The
30.Fn pmap_kextract
31function retrieves the underlying physical memory address corresponding to the given kernel virtual address
32.Fa va .
33The value of
34.Fa va
35must correlate to an active mapping in the kernel address space.
36.Pp
37.Fn vtophys
38is an alias for
39.Fn pmap_kextract
40and behaves identically.
41.Sh RETURN VALUES
42The
43.Fn pmap_kextract
44function will return the physical address
45.Pq Vt vm_paddr_t
46associated with the kernel virtual address
47.Fa va .
48.Pp
49.Fn pmap_kextract
50generally does not fail.
51However, if supplied with an illegitimate value for
52.Fa va ,
53the function may return zero, an invalid non-zero value, or call
54.Xr panic 9 .
55.Sh SEE ALSO
56.Xr pmap 9 ,
57.Xr pmap_extract 9
58.Sh AUTHORS
59.An -nosplit
60This manual page was written by
61.An Mina Galić Aq Mt FreeBSD@igalic.co ,
62based on the
63.Xr pmap_extract 9
64page written by
65.An Bruce M Simpson Aq Mt bms@spc.org .
66