From owner-freebsd-hackers Mon Aug 14 13:59:19 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from feral.com (feral.com [192.67.166.1]) by hub.freebsd.org (Postfix) with ESMTP id DA1D537B50C for ; Mon, 14 Aug 2000 13:59:15 -0700 (PDT) (envelope-from mjacob@feral.com) Received: from beppo.feral.com (beppo [192.67.166.79]) by feral.com (8.9.3/8.9.3) with ESMTP id NAA13044; Mon, 14 Aug 2000 13:59:12 -0700 Date: Mon, 14 Aug 2000 13:59:13 -0700 (PDT) From: Matthew Jacob Reply-To: mjacob@feral.com To: Bill Clinton Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: dma to userland address In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Look at what physio does. On Mon, 14 Aug 2000, Bill Clinton wrote: > lets say, hypothetically, that i have an ioctl interface to my device > driver that takes a buffer that looks something like: > > struct { > int length; > char *buf; > } mystruct; > > and lets say, hypothetically, that i wanted to dma directly > to/from 'buf'. how would i do that? > > i've tried doing vtophys on buf, but that doesn't seem to work. > > i've tried doing vtophys on a kernel-allocated block and the mmapping it > through /dev/mem in userland, but that doesn't seem to work either (this > may have a bug, though - it worked under linux, but was about 10x slower > than just leaving the kernel/user copy in there). > > so what am i missing here? > > - j > ________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message