From owner-freebsd-arch@FreeBSD.ORG Sat Jul 12 19:14:43 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0737937B401 for ; Sat, 12 Jul 2003 19:14:43 -0700 (PDT) Received: from perrin.int.nxad.com (internal.ext.nxad.com [69.1.70.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D1AD43F93 for ; Sat, 12 Jul 2003 19:14:42 -0700 (PDT) (envelope-from hmp@nxad.com) Received: by perrin.int.nxad.com (Postfix, from userid 1072) id E22EC2105E; Sat, 12 Jul 2003 19:14:41 -0700 (PDT) Date: Sat, 12 Jul 2003 19:14:41 -0700 From: Hiten Pandya To: Andrew Gallatin Message-ID: <20030713021441.GA21110@perrin.int.nxad.com> References: <3EF3C12F.9060303@btc.adaptec.com> <16124.39930.142492.356163@grasshopper.cs.duke.edu> <3EFC9F2D.6020908@btc.adaptec.com> <16124.43999.333761.397624@grasshopper.cs.duke.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16124.43999.333761.397624@grasshopper.cs.duke.edu> X-Operating-System: FreeBSD FreeBSD 4.7-STABLE User-Agent: Mutt/1.5.4i cc: Scott Long cc: freebsd-arch@freebsd.org Subject: Re: API change for bus_dma X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jul 2003 02:14:43 -0000 On Fri, Jun 27, 2003 at 04:41:03PM -0400, Andrew Gallatin wrote: > > Scott Long writes: > > > > As you hinted below, BUS_DMA_NOWAIT does what you want. It will return > > ENOMEM to the caller if the bounce buffers cannot be pre-allocated > > during bus_dmamap_load(). > > OK, thanks. I looks like sparc64 also returns ENOMEM if it runs out of > sgmap space.. > > One more question: What's the FreeBSD equivalent of Solaris' > DDI_DMA_CONSISTENT and DDI_DMA_STREAMING? As of now, the only one which comes to mind is NetBSD which supports such an equivalence; known as BUS_DMA_STREAMING. From what I can recall, the client sets the flag upon call of a DMA memory allocation or DMA load function. The flag is to be used if the client is doing sequential, uni-directional transfers that are regulated by some sort of alignment and size constraint. According to the NetBSD code, it also "takes advantage" of middle-man I/O cache hardware... I am not sure if the NetBSD bus_dma assumes coherency or not. Only a very few platforms support this... For DDI_DMA_CONSISTENT, I think it would be BUS_DMA_COHERENT which is what you are looking for if I am reading the Solaris 2.6 DDI docs correctly. Hope this helps in the slightest. Cheers. -- Hiten (hmp@FreeBSD.ORG)