From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 13 21:04:16 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 A890E16A4E1 for ; Sun, 13 Aug 2006 21:04:16 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3742C43D45 for ; Sun, 13 Aug 2006 21:04:16 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k7DL3c07044827; Sun, 13 Aug 2006 15:03:38 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 13 Aug 2006 15:03:48 -0600 (MDT) Message-Id: <20060813.150348.535841747.imp@bsdimp.com> To: nike_d@cytexbg.com From: "M. Warner Losh" In-Reply-To: <200608071735.43462.nike_d@cytexbg.com> References: <44D735E5.4030809@FreeBSD.org> <200608071628.15316.nike_d@cytexbg.com> <200608071735.43462.nike_d@cytexbg.com> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sun, 13 Aug 2006 15:03:38 -0600 (MDT) Cc: freebsd-hackers@freebsd.org Subject: Re: linux ioremap equivalent on freebsd 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, 13 Aug 2006 21:04:16 -0000 In message: <200608071735.43462.nike_d@cytexbg.com> Niki Denev writes: : On Monday 07 August 2006 16:28, Niki Denev wrote: : > On Monday 07 August 2006 15:45, Suleiman Souhlal wrote: : > > : > > I think the equivalent of linux's ioremap() in FreeBSD is pmap_mapdev(). : > > : > > -- Suleiman : > : > Thanks! : > : > Is there a reason that there is no manual page about pmap_mapdev, and it's : > not mentioned in the other pmap_* man pages? : > : : As far as i understand, there is no need for pmap_mapdev to be used for : reading memory from pci device, because it returns the same address as : pmap_get_virtual() ? (at least here :) ) Is this right? Unless you are mapping very large areas, bus_alloc_resource + rman_get_virtual is the right answer here. Warner