xref: /freebsd/share/man/man9/pmap_map.9 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
18019c643SBruce M Simpson.\"
28019c643SBruce M Simpson.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
38019c643SBruce M Simpson.\" All rights reserved.
48019c643SBruce M Simpson.\"
58019c643SBruce M Simpson.\" Redistribution and use in source and binary forms, with or without
68019c643SBruce M Simpson.\" modification, are permitted provided that the following conditions
78019c643SBruce M Simpson.\" are met:
88019c643SBruce M Simpson.\" 1. Redistributions of source code must retain the above copyright
98019c643SBruce M Simpson.\"    notice, this list of conditions and the following disclaimer.
108019c643SBruce M Simpson.\" 2. Redistributions in binary form must reproduce the above copyright
118019c643SBruce M Simpson.\"    notice, this list of conditions and the following disclaimer in the
128019c643SBruce M Simpson.\"    documentation and/or other materials provided with the distribution.
138019c643SBruce M Simpson.\"
148019c643SBruce M Simpson.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
158019c643SBruce M Simpson.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
168019c643SBruce M Simpson.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
178019c643SBruce M Simpson.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
188019c643SBruce M Simpson.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
198019c643SBruce M Simpson.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
208019c643SBruce M Simpson.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
218019c643SBruce M Simpson.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
228019c643SBruce M Simpson.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
238019c643SBruce M Simpson.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
248019c643SBruce M Simpson.\" SUCH DAMAGE.
258019c643SBruce M Simpson.\"
268019c643SBruce M Simpson.Dd July 21, 2003
278019c643SBruce M Simpson.Dt PMAP_MAP 9
28b4ca3754SRuslan Ermilov.Os
298019c643SBruce M Simpson.Sh NAME
308019c643SBruce M Simpson.Nm pmap_map
318019c643SBruce M Simpson.Nd map a physical memory range into kernel virtual address (KVA) space
328019c643SBruce M Simpson.Sh SYNOPSIS
338019c643SBruce M Simpson.In sys/param.h
348019c643SBruce M Simpson.In vm/vm.h
358019c643SBruce M Simpson.In vm/pmap.h
368019c643SBruce M Simpson.Ft vm_offset_t
371772ac3fSRuslan Ermilov.Fo pmap_map
381772ac3fSRuslan Ermilov.Fa "vm_offset_t *virt" "vm_paddr_t start" "vm_paddr_t end" "int prot"
391772ac3fSRuslan Ermilov.Fc
408019c643SBruce M Simpson.Sh DESCRIPTION
418019c643SBruce M SimpsonThe
428019c643SBruce M Simpson.Fn pmap_map
438019c643SBruce M Simpsonfunction maps a range of physical addresses into kernel virtual address (KVA)
448019c643SBruce M Simpsonspace, from
458019c643SBruce M Simpson.Fa start
468019c643SBruce M Simpsonto
478019c643SBruce M Simpson.Fa end ,
488019c643SBruce M Simpsonwith protection bits
498019c643SBruce M Simpson.Fa prot .
508019c643SBruce M Simpson.Pp
518019c643SBruce M SimpsonThe value passed in
528019c643SBruce M Simpson.Fa *virt
538019c643SBruce M Simpsonis treated as a hint for the virtual address of the beginning of the mapping.
548019c643SBruce M Simpson.Sh IMPLEMENTATION NOTES
558019c643SBruce M SimpsonThe
568019c643SBruce M Simpson.Fa prot
578019c643SBruce M Simpsonargument is currently ignored by machine-dependent implementations.
588019c643SBruce M Simpson.Pp
598019c643SBruce M SimpsonArchitectures which can support a direct mapped physical to virtual
608019c643SBruce M Simpsonregion can return the appropriate address within that region, leaving
618019c643SBruce M Simpson.Fa *virt
628019c643SBruce M Simpsonunchanged.
638019c643SBruce M Simpson.Sh RETURN VALUES
648019c643SBruce M SimpsonThe
658019c643SBruce M Simpson.Fn pmap_map
668019c643SBruce M Simpsonfunction returns the virtual address of the beginning of the mapping, if
678019c643SBruce M Simpsonthe mapping was successfully made;
688019c643SBruce M Simpson.Fa *virt
698019c643SBruce M Simpsonwill also be updated with the first usable address after the mapped region.
708019c643SBruce M Simpson.Pp
718019c643SBruce M SimpsonIf the function is unsuccessful,
728019c643SBruce M Simpson.Dv NULL
738019c643SBruce M Simpsonis returned.
748019c643SBruce M Simpson.Sh SEE ALSO
758019c643SBruce M Simpson.Xr pmap 9
768019c643SBruce M Simpson.Sh AUTHORS
778019c643SBruce M SimpsonThis manual page was written by
78*8a7314fcSBaptiste Daroussin.An Bruce M Simpson Aq Mt bms@spc.org .
79