From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 9 21:32:39 2004 Return-Path: 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 26B2D16A4CE for ; Thu, 9 Dec 2004 21:32:39 +0000 (GMT) Received: from mailfe06.swip.net (mailfe06.swip.net [212.247.154.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5990043D46 for ; Thu, 9 Dec 2004 21:32:38 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: Y1QAsIk9O44SO+J/q9KNyQ== Received: from [193.217.205.233] (HELO curly.tele2.no) by mailfe06.swip.net (CommuniGate Pro SMTP 4.2.7) with ESMTP id 235249365 for freebsd-hackers@freebsd.org; Thu, 09 Dec 2004 22:32:36 +0100 Received: (from root@localhost) by curly.tele2.no (8.12.5/8.12.3) id iB9LchW2003074 for freebsd-hackers@freebsd.org; Thu, 9 Dec 2004 22:38:43 +0100 (CET) (envelope-from hselasky@c2i.net) Date: Thu, 9 Dec 2004 22:38:41 +0100 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Message-ID: <20041209223840.A3042@curly.tele2.no> References: <41B20B19.3090204@acm.org> <20041206025126.GO19624@funkthat.com> <41B3F24B.1000903@acm.org> <20041206074237.GP19624@funkthat.com> <41B5DF9B.50501@acm.org> <20041207221919.GQ19624@funkthat.com> <20041207222115.GA74736@freebie.xs4all.nl> <41B68DF5.6070708@acm.org> <20041208090504.GT19624@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20041208090504.GT19624@funkthat.com>; from gurney_j@resnet.uoregon.edu on Wed, Dec 08, 2004 at 01:05:04AM -0800 Subject: Re: mmap() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Dec 2004 21:32:39 -0000 On Wed, Dec 08, 2004 at 01:05:04AM -0800, John-Mark Gurney wrote: > Kamal R. Prasad wrote this message on Wed, Dec 08, 2004 at 10:45 +0530: > > Wilko Bulte wrote: > > > > >On Tue, Dec 07, 2004 at 02:19:19PM -0800, John-Mark Gurney wrote.. > > > > > >>Kamal R. Prasad wrote this message on Tue, Dec 07, 2004 at 22:21 +0530: > > >> > > >>>There was a bug in my interface routine which probably resulted in too > > >>>many calls. > > >>>Something like *paddr=vtophys(base) instead of > > >>>*paddr=vtophys(base+offset) should result in lots of calls to the > > >>>interface. > > >>> > > >>Just remeber that vtophys is not a supported interface in HEAD, (if it > > >>still works, it will probably be removed shortly).. Also, vtophys only > > >>works on limited archs, like i386 and alpha... > > > > > >s/limited/some/ > > > > So what would be the equivalent supported interface in HEAD? > > bus_dma(9) It's a bit more complicated though... Why is there not a simple interface to it? I'd suggest something like: void * xxx_alloc_mem(u_int32_t size, u_int8_t align_power); u_int32_t xxx_vtophys(void *ptr, u_int32_t size); void xxx_free_mem(void *ptr, u_int32_t size); Yours -HPS