"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".
Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
emulation of managed pages. This required the following `interesting' changes:
* File system buffers must be entered with an access type of
VM_PROT_READ|VM_PROT_WRITE, so that the pages will be accessible immediately.
Otherwise we would have to teach pagemove() to update the R/M information.
Since they're never eligible for paging, the latter is overkill.
* We must insure that pages allocated before the pmap is completely set up
(that is, pages allocated early by the VM system) are not eligible for R/M
emulation, since the memory needed for this isn't available. We do this by
allocating the pmap's internal memory with uvm_pageboot_alloc(). This also
fixes an absolutely horrible hack where the pmap only worked because page 0
happened to be mapped.
to be mapped.
Also:
* Push the wired page counting into the p->v list maintenance functions. This
avoids code duplication, and fixes some cases where we were confused about
which pages to do it with.
* Fix lots of problems associated with pmap_nightmare() (and rename it to
pmap_vac_me_harder()).
* Since the early pages are no longer considered `managed', just make
pmap_*_pv() panic if !pmap_initialized.
- returned EOPNOTSUPP rather than -1.
- no check for negative offset.
many of these fix potential security problems in these drivers.
XXX XXX XXX
the d_mmap cdev routine should be changed to have a prototype like:
paddr_t (*d_mmap) __P((dev_t, off_t, int));
by someone!
Reference Design NetBSD source code, obtained from the pages under
http://www.research.digital.com/SRC/iag . Some of this code (badly)
needs to be cleaned up, and as-is it doesn't compile. However, getting
it in the tree is a start.