HomeFreeBSD

Currently the Linux character device mmap handling only supports mmap

Description

Currently the Linux character device mmap handling only supports mmap
operations that map a single page that has an associated vm_page_t.
This does not permit mapping larger regions (such as a PCI memory
BAR) and it does not permit mapping addresses beyond the top of RAM
(such as a 64-bit BAR located above the top of RAM).

Instead of using a single OBJT_DEVICE object and passing the physaddr via
the offset as a hack, create a new sglist and OBJT_SG object for each
mmap request. The requested memory attribute is applied to the object
thus affecting all pages mapped by the request.

Reviewed by: hselasky, np
MFC after: 1 week
Sponsored by: Chelsio
Differential Revision: https://reviews.freebsd.org/D3386

Details

Provenance
jhbAuthored on
Reviewer
hselasky
Differential Revision
D3386: Rework handling for Linux character device mmap handling.
Parents
rS287439: MFC 283622:
Branches
Unknown
Tags
Unknown