72 lines · 1.5 KB · Text
RawDownload
.TH VMAP 9.SH NAMEvmap. vmappat \- physical to virtual mapping.SH SYNOPSIS.de PB.PP.ft L.nf..#include "fns.h".PBenum {	PATUC		= 0,		/* uncachable */	PATWC		= 1,		/* use write-combining buffers */	PATWT		= 4,		/* write-through */	PATWP		= 5,		/* write protect */	PATWB		= 6,		/* write back */	PATUCMINUS	= 7,		/* UC-; strongly uncacheable */};.PB.PD 0.ta +\w'\fL      'u +\w'\fL    'u +6n +4nvoid*	vmap(uintmem base, usize size).PBvoid*	vmappat(uintmem base, usize size, uint pattype).PBvoid	vunmap(void*).PBint	vmapsync(uintmem addr).SH DESCRIPTION.I Vmapcreates and returns a virtual address for the physicaladdress.I baseon the local processor.The most common use for this is to map PCI BARs..PPThe actual map may be larger than the requested sizeif the base is not smallest page-aligned or the size isnot a multiple of the smallest page size.  It is an errorto map the same region of memory twice, but overlapis calculated before rounding to smallest page size.It is also an error to map an unknown region.The defaultmemory type is uncachable memory, or.BR PATUC .But.I vmappatallows the memory type to be user-selected..PPIf the new map is accessed on another processorit will fault..I Faultcan restore the mapping with.IR vmapsync ,which returns 0 if a matching map is found andrestored, and -1 otherwise..SH SOURCE.B /sys/src/nix/*/mmu.c.SH "SEE ALSO".IR adr (9nix).SH DIAGNOSTICS.I Vmapand.I Vmappatreturn.B nilon failure..I Vmapsyncreturns -1 if no map is found..SH BUGSPAT is x86- and x86-64-specific.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t