From owner-freebsd-arch Tue Feb 19 21:40:12 2002 Delivered-To: freebsd-arch@freebsd.org Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by hub.freebsd.org (Postfix) with ESMTP id CA15337B400; Tue, 19 Feb 2002 21:40:09 -0800 (PST) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc51.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020220054009.YPSJ2626.rwcrmhc51.attbi.com@InterJet.elischer.org>; Wed, 20 Feb 2002 05:40:09 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id VAA60515; Tue, 19 Feb 2002 21:38:15 -0800 (PST) Date: Tue, 19 Feb 2002 21:38:14 -0800 (PST) From: Julian Elischer To: "M. Warner Losh" Cc: mike.varga@cavium.com, msmith@FreeBSD.ORG, freebsd-arch@FreeBSD.ORG Subject: Re: reverse vtophys() In-Reply-To: <20020219.211801.45873766.imp@village.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Mike, How do you know the page is locked in memory? but more importantly, how do you know it is only mapped to a single address? we ar moving toward keeping a lot of pages unmapped and for DMA devices the need never be mapped for IO. they need onlybe mapped when copying data to serspace or when mmapping them. We'd need to know a much more specific reason to be able to give you the answer. I may have missed some of your posts. sorry if you already gave this information. Julian On Tue, 19 Feb 2002, M. Warner Losh wrote: > In message: <004f01c1b96b$a37d1f50$b210a8c0@netscreen5> > "mike varga" writes: > : The concept is valid in Linux, > : there is a function that does > : what I am asking. > : bus_to_virtual(). > : > : The page is locked > : in memory. > : Therefor there is one valid page > : backed by the physical > : address that corresponds > : to the virtual address that > : I am interested in retrieving? > > If you have used the bus_space functions, you could use > rman_get_virtual(r), where r is a struct resource * that you got back > from bus_alloc_resource(). > > Warner > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message