From owner-freebsd-hackers Thu May 30 12:14: 5 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from pc1.cs.ucdavis.edu (pc1.cs.ucdavis.edu [169.237.5.225]) by hub.freebsd.org (Postfix) with ESMTP id CEE0537B407 for ; Thu, 30 May 2002 12:14:01 -0700 (PDT) Received: from localhost (tangj@localhost) by pc1.cs.ucdavis.edu (8.11.2/8.11.2) with ESMTP id g4UJE1206485 for ; Thu, 30 May 2002 12:14:01 -0700 X-Authentication-Warning: pc1.cs.ucdavis.edu: tangj owned process doing -bs Date: Thu, 30 May 2002 12:14:01 -0700 (PDT) From: Tom Tang To: Subject: KLD mmap question Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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... - Tom -- Tom Tang tangj AT cs DOT ucdavis DOT edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message