diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -266,6 +266,7 @@ pmap_copy.9 \ pmap_enter.9 \ pmap_extract.9 \ + pmap_kextract.9 \ pmap_growkernel.9 \ pmap_init.9 \ pmap_is_modified.9 \ @@ -1806,6 +1807,7 @@ PHOLD.9 PROC_ASSERT_NOT_HELD.9 MLINKS+=pmap_copy.9 pmap_copy_page.9 MLINKS+=pmap_extract.9 pmap_extract_and_hold.9 +MLINKS+=pmap_kextract.9 vtophys.9 MLINKS+=pmap_init.9 pmap_init2.9 MLINKS+=pmap_is_modified.9 pmap_ts_referenced.9 MLINKS+=pmap_pinit.9 pmap_pinit0.9 \ diff --git a/share/man/man9/pmap_kextract.9 b/share/man/man9/pmap_kextract.9 new file mode 100644 --- /dev/null +++ b/share/man/man9/pmap_kextract.9 @@ -0,0 +1,74 @@ +.\" +.\" Copyright (c) 2023 Mina Galić +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.Dd August 22, 2023 +.Dt PMAP_KEXTRACT 9 +.Os +.Sh NAME +.Nm pmap_kextract , +.Nm vtophys +.Nd extract from kernel page table to a physical address +.Sh SYNOPSIS +.In sys/param.h +.In vm/vm.h +.In vm/pmap.h +.Ft vm_paddr_t +.Fo pmap_kextract +.Fa "vm_offset_t va" +.Fc +.Ft vm_paddr_t +.Fo vtophys +.Fa "vm_offset_t va" +.Fc +.Sh DESCRIPTION +The +.Fn pmap_kextract +function and its alias +.Fn vtophys +map a virtual kernel address to a physical page. +.Pp +.Sh RETURN VALUES +The +.Fn pmap_kextract +function will return the physical page address associated with the +virtual kernel address +.Fa va +inside the physical map of the address space. +In case of failure, some platform's implementation of +.Fn pmap_kextract +returns +.Dv NULL , +while other platforms +.Xr panic 9 . +.Sh SEE ALSO +.Xr mutex 9 , +.Xr pmap 9 +.Sh AUTHORS +.An -nosplit +This manual page was written by +.An Mina Galić Aq Mt FreeBSD@igalic.co , +based on the +.Xr pmap_extract 9 +page written by +.An Bruce M Simpson Aq Mt bms@spc.org .