From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 18 23:18:39 2003 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 9F71B16A4BF for ; Mon, 18 Aug 2003 23:18:39 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8EA0143F3F for ; Mon, 18 Aug 2003 23:18:38 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.9/8.12.3) with ESMTP id h7J6IaFL063843; Tue, 19 Aug 2003 00:18:37 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 19 Aug 2003 00:18:15 -0600 (MDT) Message-Id: <20030819.001815.118795363.imp@bsdimp.com> To: mcgovern@beta.com From: "M. Warner Losh" In-Reply-To: <200308190347.h7J3l6X7073480@spoon.beta.com> References: <200308190347.h7J3l6X7073480@spoon.beta.com> X-Mailer: Mew version 2.1 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org Subject: Re: Allocating memory from PCI bus... 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: Tue, 19 Aug 2003 06:18:39 -0000 In message: <200308190347.h7J3l6X7073480@spoon.beta.com> "Brian J. McGovern" writes: : In 5.x, it appears that you call bus_alloc_resource() with the rid (BAR) of : the memory resource to actually obtain a resource structure to the memory. : Would you then call rman_get_virtual() to obtain the virtual address? How about : the physical address (use vtophys(rman_get_virtual()) ? Typically you'd use bus_space to access things via 'memory' mapping, and bus_dma for physical stuff. Warner