Subject: Re: mmap'ing framebuffer memory in MI drivers...
To: None <eeh@netbsd.org>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-kern
Date: 03/05/1999 19:14:01
On Fri, 5 Mar 1999 18:50:07 -0800 (PST) 
 "Eduardo E. Horvath" <eeh@one-o.com> wrote:

 > Hold it -- why is (*d_mmap)() returning anything?  Why doesn't it call
 > pmap_enter() or the equivalent (or bus_device_whozit() that eventually
 > works its way down to pmap_enter()) in the first place, return success or
 > failure, and be done with it?  That way ports that need to can create an 
 > alternative MD entry point into pmap that can be passed all this extra
 > meta-info and we don't need to encode it into the physical address and
 > check for it every time pmap_enter() is called.

...because, for one, the first N times it's called, you're not entering
any mappings at all... You're just checking that the mapping request is
valid.

Take a look at udv_fault() for how the mappings are actually entered.

        -- Jason R. Thorpe <thorpej@nas.nasa.gov>