On Thu, 2002-05-30 at 13:14, Tom Tang wrote:
> Hello,
> 
>   I have a question about implementing mmap functions in
> device drivers.  Thinking it would be simple, I contigmalloc'd
> a buffer of PAGE_SIZE and returned it using atop like other
> mmap device implementations.  However when my userland program
> mmaps the device with offset 0, when I try accessing the returned
> pointer, it returns me invalid memory address.  Any help would
> be appreciated...

An associated question: while I was looking at the DRM's mmap for the
shared memory area, I think I figured out that you didn't need memory
that was going to be mmapped to be physically contiguous (since the
device pager would get each page of it separately).  Was I right?

-- 
Eric Anholt <[EMAIL PROTECTED]>
http://gladstone.uoregon.edu/~eanholt/dri/



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to