Module Name: src
Committed By: cegger
Date: Sat Nov 7 07:37:46 UTC 2009
Modified Files:
src/share/man/man9: pmap.9
Log Message:
Update pmap(9) manpage:
- Document new flags argument for pmap_kenter_pa
- Document new flags argument for pmap_enter as well
- Document the prot argument for pmap_kenter_pa. This is copy&pasted from
pmap_enter.
Patch showed on tech-kern@
http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006436.html
Thanks to Martin Husemann for his comments to the original patch version.
To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/share/man/man9/pmap.9
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/share/man/man9/pmap.9
diff -u src/share/man/man9/pmap.9:1.39 src/share/man/man9/pmap.9:1.40
--- src/share/man/man9/pmap.9:1.39 Wed Oct 21 23:33:32 2009
+++ src/share/man/man9/pmap.9 Sat Nov 7 07:37:46 2009
@@ -1,4 +1,4 @@
-.\" $NetBSD: pmap.9,v 1.39 2009/10/21 23:33:32 rmind Exp $
+.\" $NetBSD: pmap.9,v 1.40 2009/11/07 07:37:46 cegger Exp $
.\"
.\" Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd October 22, 2009
+.Dd November 04, 2009
.Dt PMAP 9
.Os
.Sh NAME
@@ -72,7 +72,7 @@
.Ft bool
.Fn "pmap_extract" "pmap_t pmap" "vaddr_t va" "paddr_t *pap"
.Ft void
-.Fn "pmap_kenter_pa" "vaddr_t va" "paddr_t pa" "vm_prot_t prot"
+.Fn "pmap_kenter_pa" "vaddr_t va" "paddr_t pa" "vm_prot_t prot" "u_int flags"
.Ft void
.Fn "pmap_kremove" "vaddr_t va" "vsize_t size"
.Ft void
@@ -485,6 +485,9 @@
resources, the
.Nm
module must panic.
+.It PMAP_NOCACHE
+The mapping being created is not cached. Write accesses have a
+write-through policy.
.El
.Pp
The access type provided in the
@@ -602,16 +605,35 @@
if the
.Fa pap
argument is non-NULL.
-.It void Fn "pmap_kenter_pa" "vaddr_t va" "paddr_t pa" "vm_prot_t prot"
+.It void Fn "pmap_kenter_pa" "vaddr_t va" "paddr_t pa" "vm_prot_t prot" \
+ "u_int flags"
Enter an
.Dq unmanaged
mapping for physical address
.Fa pa
at virtual address
.Fa va
-with protection
-.Fa prot
-into the kernel physical map.
+with protection specified by bits in
+.Fa prot :
+.Bl -tag -width "VM_PROT_EXECUTE " -offset indent
+.It VM_PROT_READ
+The mapping must allow reading.
+.It VM_PROT_WRITE
+The mapping must allow writing.
+.It VM_PROT_EXECUTE
+The page mapped contains instructions that will be executed by the
+processor.
+.El
+.Pp
+Information provided by
+.Fa flags :
+.Bl -tag -width "PMAP_NOCACHE " -offset indent
+.It PMAP_NOCACHE
+The mapping being created is
+.Em not
+cached. Write accesses have a write-through policy.
+.El
+.Pp
Mappings of this type are always
.Dq wired ,
and are unaffected by routines that alter the protection of pages