Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pmap(9) [debian man page]

PMAP(9) 						   BSD Kernel Developer's Manual						   PMAP(9)

NAME
pmap -- machine-dependent portion of virtual memory subsystem SYNOPSIS
#include <sys/param.h> #include <vm/vm.h> #include <vm/pmap.h> DESCRIPTION
The pmap module is the machine-dependent portion of the FreeBSD VM (Virtual Memory) sub-system. Each function documented herein must have its own architecture-dependent implementation. The pmap module is responsible for managing hardware-dependent objects such as page tables, address maps, TLBs, etc. Machine-dependent code must provide the header file <machine/pmap.h>. This file contains the definition of the pmap structure: struct pmap { /* Contents defined by pmap implementation. */ }; typedef struct pmap *pmap_t; This header file may also define other data structures used by the pmap implementation. The header file <vm/pmap.h> defines a structure for tracking pmap statistics (see below). This structure is defined as: struct pmap_statistics { long resident_count; /* number of mapped pages */ long wired_count; /* number of wired pages */ }; The implementation's struct pmap must contain an instance of this structure having the name pm_stats, and it must be updated by the implemen- tation after each relevant pmap operation. SEE ALSO
pmap(9), pmap_activate(9), pmap_change_wiring(9), pmap_clear_modify(9), pmap_clear_reference(9), pmap_copy(9), pmap_copy_page(9), pmap_enter(9), pmap_extract(9), pmap_extract_and_hold(9), pmap_growkernel(9), pmap_init(9), pmap_init2(9), pmap_is_modified(9), pmap_is_prefaultable(9), pmap_map(9), pmap_mincore(9), pmap_object_init_pt(9), pmap_page_exists_quick(9), pmap_page_init(9), pmap_page_protect(9), pmap_pinit(9), pmap_pinit0(9), pmap_pinit2(9), pmap_protect(9), pmap_qenter(9), pmap_qremove(9), pmap_release(9), pmap_remove(9), pmap_remove_all(9), pmap_remove_pages(9), pmap_resident_count(9), pmap_ts_modified(9), pmap_wired_count(9), pmap_zero_area(9), pmap_zero_idle(9), pmap_zero_page(9), vm_map(9) AUTHORS
This manual page was written by Bruce M Simpson <bms@spc.org>. BSD
July 21, 2003 BSD

Check Out this Related Man Page

PMAP_ENTER(9)						   BSD Kernel Developer's Manual					     PMAP_ENTER(9)

NAME
pmap_enter -- insert a virtual page into a physical map SYNOPSIS
#include <sys/param.h> #include <vm/vm.h> #include <vm/pmap.h> int pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, u_int flags, int8_t psind); DESCRIPTION
The pmap_enter() function creates a mapping in the physical map pmap from the virtual address va to the physical page m with the protection prot. Any previous mapping at the virtual address va is destroyed. The flags argument may have the following values: VM_PROT_READ A read access to the given virtual address triggered the call. VM_PROT_WRITE A write access to the given virtual address triggered the call. VM_PROT_EXECUTE An execute access to the given virtual address triggered the call. PMAP_ENTER_WIRED The mapping should be marked as wired. PMAP_ENTER_NOSLEEP This function may not sleep during creation of the mapping. If the mapping cannot be created without sleeping, an appro- priate Mach VM error is returned. If the PMAP_ENTER_NOSLEEP flag is not specified, this function must create the requested mapping before returning. It may not fail. In order to create the requested mapping, this function may destroy any non-wired mapping in any pmap. The psind parameter specifies the page size that should be used by the mapping. The supported page sizes are described by the global array pagesizes[]. The desired page size is specified by passing the index of the array element that equals the desired page size. When the pmap_enter() function destroys or updates a managed mapping, including an existing mapping at virtual address va, it updates the vm_page structure corresponding to the previously mapped physical page. If the physical page was accessed through the managed mapping, then the vm_page structure's PGA_REFERENCED aflag is set. If the physical page was modified through the managed mapping, then the vm_page_dirty() function is called on the vm_page structure. The PGA_WRITEABLE aflag must be set for the page m if the new mapping is managed and writeable. It is advised to clear PGA_WRITEABLE for destroyed mappings if the implementation can ensure that no other writeable managed mappings for the previously mapped pages exist. If the page m is managed, the page must be busied by the caller or the owning object must be locked. In the later case, the PMAP_ENTER_NOSLEEP must be specified by the caller. The pmap_enter() function must handle the multiprocessor TLB consistency for the given address. NOTES
On amd64, arm and i386 architectures the existing implementation of the pmap_enter function is incomplete, only value 0 for psind is sup- ported. Other supported architectures have pagesizes[] array of size 1. RETURN VALUES
If successful, the pmap_enter() function returns KERN_SUCCESS. If the PMAP_ENTER_NOSLEEP flag was specified and the resources required for the mapping cannot be acquired without sleeping, KERN_RESOURCE_SHORTAGE is returned. SEE ALSO
pmap(9) AUTHORS
This manual page was first written by Bruce M Simpson <bms@spc.org> and then rewritten by Alan Cox <alc@FreeBSD.org> and Konstantin Belousov <kib@FreeBSD.org>. BSD
January 27, 2015 BSD
Man Page