From owner-freebsd-usb@FreeBSD.ORG Wed Aug 7 02:32:34 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4BF62B99 for ; Wed, 7 Aug 2013 02:32:34 +0000 (UTC) (envelope-from aseem.jolly@gmail.com) Received: from sam.nabble.com (sam.nabble.com [216.139.236.26]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2C0352FE1 for ; Wed, 7 Aug 2013 02:32:33 +0000 (UTC) Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1V6tY8-0006DC-4y for freebsd-usb@freebsd.org; Tue, 06 Aug 2013 19:32:32 -0700 Date: Tue, 6 Aug 2013 19:32:32 -0700 (PDT) From: "aseem.jolly" To: freebsd-usb@freebsd.org Message-ID: <1375842752147-5834384.post@n5.nabble.com> In-Reply-To: <52009EEB.1040404@bitfrost.no> References: <1375489015367-5833506.post@n5.nabble.com> <1375551235535-5833585.post@n5.nabble.com> <1375752286864-5834206.post@n5.nabble.com> <52009EEB.1040404@bitfrost.no> Subject: Re: USB DMA memory Allocation MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Aug 2013 02:32:34 -0000 I have gone through EHCI specification(was pretty long so couldn't finish it though) and below is what that I have understood. "Control Data Structure Segment Register 'CTRLDSSEGMENT', This register allows the host software to locate all control data structures within the same 4 Gigabyte memory segment. This 32-bit register corresponds to the most significant address bits [63:32] for all EHCI data structures. If the 64-bit Addressing Capability field in Host controller configuration parametere register (HCCPARAMS) is set to 1, then 'CTRLDSSEGMENT' register is used with the link pointers to construct 64-bit addresses to EHCI control data structures. This register is concatenated with the link pointer from either the PERIODICLISTBASE, ASYNCLISTADDR, or any control data structure link field to construct a 64-bit address. We are programming 'CTRLDSSEGMENT' to the default value(00000000h) when we initialize the host controller(see ehci_init function)" I believe, we have to still confine us to a 4GB range and not specifially [0-4GB] range. On host initialization, we can set 'CTRLDSSEGMENT' register to the lowest address of a particular 4GB range and then the host controller will be able to locate all ehci data structures with in that segment by concatenation. We will accordingly adjust the address boundary restrictions in the parent dma tag. Could you please confirm once, and let me know if I have not understood it correctly. -- View this message in context: http://freebsd.1045724.n5.nabble.com/USB-DMA-memory-Allocation-tp5833506p5834384.html Sent from the freebsd-usb mailing list archive at Nabble.com.