xref: /freebsd/share/man/man9/pmap_kextract.9 (revision 63f537551380d2dab29fa402ad1269feae17e594)
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 October 16, 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
32given kernel virtual address
33.Fa va .
34The value of
35.Fa va
36must belong to a valid mapping in the kernel address space.
37.Pp
38.Fn vtophys
39is an alias for
40.Fn pmap_kextract
41and behaves identically.
42.Sh RETURN VALUES
43The
44.Fn pmap_kextract
45function returns the address of physical memory mapped at the kernel
46virtual 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