From owner-freebsd-current@FreeBSD.ORG Tue Jan 10 20:54:37 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85D8A106564A for ; Tue, 10 Jan 2012 20:54:37 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id 4A53D8FC12 for ; Tue, 10 Jan 2012 20:54:36 +0000 (UTC) Received: from ns1.feral.com (localhost [127.0.0.1]) by ns1.feral.com (8.14.4/8.14.4) with ESMTP id q0AKsa7i086384 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Jan 2012 12:54:36 -0800 (PST) (envelope-from mj@feral.com) Received: from localhost (mjacob@localhost) by ns1.feral.com (8.14.4/8.14.4/Submit) with ESMTP id q0AKsahq086381; Tue, 10 Jan 2012 12:54:36 -0800 (PST) (envelope-from mj@feral.com) X-Authentication-Warning: ns1.feral.com: mjacob owned process doing -bs Date: Tue, 10 Jan 2012 12:54:36 -0800 (PST) From: Matthew Jacob To: Andriy Gapon In-Reply-To: <4F0C9D14.60705@FreeBSD.org> Message-ID: References: <4F0C9D14.60705@FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=UTF-8; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (ns1.feral.com [127.0.0.1]); Tue, 10 Jan 2012 12:54:36 -0800 (PST) Cc: FreeBSD current Subject: Re: bus dma: a flag/quirk for page zero X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mj@feral.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2012 20:54:37 -0000 I think it would be just simpler to disallow page zero usage period. Can you think of any case where physical page 0 is ever a valid DMA address? At the very least, require bounce buffers. On Tue, 10 Jan 2012, Andriy Gapon wrote: > > > Some hardware interfaces may reserve a special meaning for a (physical) memory > address value of zero. One example is the OHCI specification where a zero value > in CurrentBufferPointer doesn't mean a physical address, but has a reserved > meaning. To be honest I don't have another example :) but don't preclude its > existence. > > To deal with this peculiarity we could use a special flag/quirk that would > instruct the bus dma code to never use the page zero for communication with the > hardware. > Here's a proof of concept patch that implements the idea: > http://people.freebsd.org/~avg/usb-dma-pagezero.diff > > Some concerns: > - not sure if BUS_DMA_NO_PAGEZERO is the best name for the flag > - the patch implements the flag only for x86 at the moment > - usb code uses the flag regardless of the actual controller type > > What do you think? > > -- > Andriy Gapon > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >