From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 9 16:02:33 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 541B016A4CE for ; Thu, 9 Dec 2004 16:02:33 +0000 (GMT) Received: from ims-2.prv.ampira.com (ims-2.ampira.com [66.179.231.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id D63C943D62 for ; Thu, 9 Dec 2004 16:02:32 +0000 (GMT) (envelope-from kamalp@acm.org) Received: from [202.142.94.194] (helo=[172.16.3.26]) by ims-2.prv.ampira.com with asmtp (Exim 4.24) id 1CcQkK-0001uX-JW; Thu, 09 Dec 2004 11:02:26 -0500 Message-ID: <41B8770C.40707@acm.org> Date: Thu, 09 Dec 2004 21:32:20 +0530 From: "Kamal R. Prasad" User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: John-Mark Gurney 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> In-Reply-To: <20041208090504.GT19624@funkthat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: Wilko Bulte cc: freebsd-hackers@freebsd.org 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 16:02:33 -0000 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... but with out it, >you won't be able to get your driver working on sparc64... > > > woudn't pmap_extract() provide me with a physical addr of the corresponding kernel virtual address? Also, is there some src code available that shows bus_dma can be used to share a block of memory between kernel and user space? My usb device probably doesn't have a dma controller, so I don't think the bulk pipe can use any memory allocated by bus_dma. [Pl. correct me if Im wrong this]. thanks -kamal >>BTW -man (4) usb probably needs more info than present. >> >> > >I'm sure it does, feel free to send-pr patches.. :) > > >