mmap() in device driver

Bob Felderman (
Thu, 17 Aug 95 23:22:10 PDT

I have a PCI board that I want to mmap() from user space.
I can do so manually using /dev/mem, but that requires
that I know the offset of the device in main memory so
that I can ask to get a pointer to that location.

In the BSD/sysV world I can create an mmap() call as part of a
character driver. What I'm looking for is the code I need to put in the
kernel function. Do I have to perform the mapping myself? In a BSD
devname_mmap(), all I do is return a page pointer relative to the base
address of the device. Higher-level mmap() kernel functions take care
of the actual mapping.

I've looked through the source tree and I don't see any example

The KHG says that it'll eventually add a pointer to the "new VMM"
stuff. I can't find anything on that in my docs.

Any pointers would be appreciated.

I'm using 1.2.11.

Bob Felderman