From owner-freebsd-usb@FreeBSD.ORG Wed Aug 7 06:25:35 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 55BC923F for ; Wed, 7 Aug 2013 06:25:35 +0000 (UTC) (envelope-from hps@bitfrost.no) Received: from mta.bitpro.no (mta.bitpro.no [92.42.64.202]) by mx1.freebsd.org (Postfix) with ESMTP id D7A0729DE for ; Wed, 7 Aug 2013 06:25:34 +0000 (UTC) Received: from mail.lockless.no (mail.lockless.no [46.29.221.38]) by mta.bitpro.no (Postfix) with ESMTP id 733937A16E; Wed, 7 Aug 2013 08:10:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.lockless.no (Postfix) with ESMTP id D00D48F20A5; Wed, 7 Aug 2013 08:10:16 +0200 (CEST) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at lockless.no Received: from mail.lockless.no ([127.0.0.1]) by localhost (mail.lockless.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P4pv5Kw1RmiQ; Wed, 7 Aug 2013 08:10:16 +0200 (CEST) Received: from laptop015.hselasky.homeunix.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) by mail.lockless.no (Postfix) with ESMTPSA id 0A78C8F20A4; Wed, 7 Aug 2013 08:10:15 +0200 (CEST) Message-ID: <5201E517.3050200@bitfrost.no> Date: Wed, 07 Aug 2013 08:11:35 +0200 From: Hans Petter Selasky Organization: Bitfrost A/S User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130522 Thunderbird/17.0.6 MIME-Version: 1.0 To: "aseem.jolly" Subject: Re: USB DMA memory Allocation References: <1375489015367-5833506.post@n5.nabble.com> <1375551235535-5833585.post@n5.nabble.com> <1375752286864-5834206.post@n5.nabble.com> <52009EEB.1040404@bitfrost.no> <1375842752147-5834384.post@n5.nabble.com> In-Reply-To: <1375842752147-5834384.post@n5.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org 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 06:25:35 -0000 On 08/07/13 04:32, aseem.jolly wrote: > 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. > Yes, that is correct. Not all structures can reside anywhere in memory. BTW: There is no such limitation for the XHCI controller. --HPS