Subject: Re: mmap'ing framebuffer memory in MI drivers...
To: None <>
From: Gordon W. Ross <>
List: tech-kern
Date: 03/05/1999 00:51:58
Eduardo E. Horvath writes:
 > On Thu, 4 Mar 1999, Jason Thorpe wrote:
 > So the concept is that it is better for the VM layer to remember keep some
 > strangely encoded cookie and pass it to pmap_enter() (which expects a
 > physical address BTW) than to call the device routine again to map the
 > framebuffer back in?  

You might find it interesting that the Solaris DDI lets you
have it both ways W.R.T. driver mmap support.  The "segmap"
entry point is called during the user-level mmap call, and
let's you do access checks by region rather than by page.
It also lets you control how the fault handler is setup,
and what will get called when the mapping is destroyed.
There is a default segmap routine for drivers that just
calls the old d_mmap entry point the old way.

If you want special, large liner mappings, I guess you could
come up with something (i.e. bus_dma_mapin?) that could be
called from an optional "segmap" driver entry point...
(Might be a nice addition.)

My bias shows here - I like the Solaris VM system design.
(and I'm glad UVM brought us a little closer to it:)