Skip site navigation (1)Skip section navigation (2)
Date:      30 May 2002 16:18:54 -0600
From:      Eric Anholt <eanholt@gladstone.uoregon.edu>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: KLD mmap question
Message-ID:  <1022797135.1008.3.camel@anholt.dyndns.org>
In-Reply-To: <Pine.LNX.4.33.0205301209280.6101-100000@pc1.cs.ucdavis.edu>
References:  <Pine.LNX.4.33.0205301209280.6101-100000@pc1.cs.ucdavis.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <eanholt@gladstone.uoregon.edu>
http://gladstone.uoregon.edu/~eanholt/dri/



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1022797135.1008.3.camel>