From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 2 19:06:24 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3443916A412 for ; Sun, 2 Jul 2006 19:06:24 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe12.swip.net [212.247.155.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8904843D49 for ; Sun, 2 Jul 2006 19:06:23 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: gvlK0tOCzrqh9CPROFOFPw== X-Cloudmark-Score: 0.000000 [] Received: from mp-216-87-158.daxnet.no ([193.216.87.158] verified) by mailfe12.swip.net (CommuniGate Pro SMTP 5.0.8) with ESMTP id 56831261; Sun, 02 Jul 2006 21:06:21 +0200 From: Hans Petter Selasky To: Ian Dowse Date: Sun, 2 Jul 2006 21:06:21 +0200 User-Agent: KMail/1.7 References: <200607021620.aa78471@nowhere.iedowse.com> In-Reply-To: <200607021620.aa78471@nowhere.iedowse.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607022106.22935.hselasky@c2i.net> Cc: David Malone , freebsd-hackers@freebsd.org Subject: Re: contiguous memory allocation problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2006 19:06:24 -0000 On Sunday 02 July 2006 17:20, Ian Dowse wrote: > In message <200607021423.aa76796@nowhere.iedowse.com>, Ian Dowse writes: > >The trick is that if the 0x6000 bytes are contiguous in virtual > >memory then they never span more than 6 pages so one iTD is enough. > > Sorry, I meant of course 6 page boundaries, which means no more > than 7 pages. This is why the 7 physical address slots in the iTD > is always enough for 8 x 3k transaction records if the 24k buffer > is contiguous in virtual memory. > Ok. So the solution to my problem is to use scatter and gather. I will see about updating my USB system to do it like that. But there is one thing I do not understand yet. When you load a page that physically resides above 4GB, because a computer has more than 4GB of memory, how does "bus_dmamap_load()" move that page down below 4GB, so that the 32-bit USB host controllers can reach it? --HPS