From owner-freebsd-arch Tue Feb 12 18:36: 3 2002 Delivered-To: freebsd-arch@freebsd.org Received: from b.mx.canon.com.au (bexfield.research.canon.com.au [203.12.172.125]) by hub.freebsd.org (Postfix) with ESMTP id 5E2A237B405 for ; Tue, 12 Feb 2002 18:36:00 -0800 (PST) Received: from bellmann.research.canon.com.au (kwanon.research.canon.com.au [203.12.172.254]) by b.mx.canon.com.au (Postfix) with ESMTP id 095171AC721; Wed, 13 Feb 2002 02:35:59 +0000 (GMT) Received: from blow.research.canon.com.au (blow.research.canon.com.au [10.8.1.4]) by bellmann.research.canon.com.au (Postfix) with ESMTP id D6A4D8B37; Wed, 13 Feb 2002 13:13:06 +1100 (EST) Received: by blow.research.canon.com.au (Postfix, from userid 683) id 17C3732711; Wed, 13 Feb 2002 13:35:14 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by blow.research.canon.com.au (Postfix) with ESMTP id 060A2326C5; Wed, 13 Feb 2002 13:35:14 +1100 (EST) Date: Wed, 13 Feb 2002 13:35:13 +1100 (EST) From: Iain Templeton To: mike varga Cc: freebsd-arch@freebsd.org Subject: Re: bus_dma_load_uio() function In-Reply-To: <000701c1b42e$7835eda0$b210a8c0@netscreen5> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 12 Feb 2002, mike varga wrote: > Yes I did, but thank you > for replying. > > My question essentially > boils down to,"How do you > map and lock user pages (buffers) > for use in a driver that wants > to do a DMA directly > from/to them. > > It removes unnecessary > copies. > We use vm_map_user_pageable() for our device driver, seems to work. We get the physical address as part of the callback for bus_dmamap_load(). We manage the data in the uio struct ourselves, as the data has some extra header information that needs to be processed. Iain To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message