From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 15 21:15:44 2005 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 66AE516A4CE for ; Tue, 15 Feb 2005 21:15:44 +0000 (GMT) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D28E43D45 for ; Tue, 15 Feb 2005 21:15:44 +0000 (GMT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.13.1/8.13.1) with ESMTP id j1FLFh9o004547 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 15 Feb 2005 16:15:43 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.12.9p2/8.12.9/Submit) id j1FLFc7T081852; Tue, 15 Feb 2005 16:15:38 -0500 (EST) (envelope-from gallatin) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16914.26234.495305.432871@grasshopper.cs.duke.edu> Date: Tue, 15 Feb 2005 16:15:38 -0500 (EST) To: Scott Long In-Reply-To: <42126390.5020804@samsco.org> References: <16914.22016.593790.719399@grasshopper.cs.duke.edu> <42126390.5020804@samsco.org> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid cc: freebsd-hackers@freebsd.org Subject: Re: mapping small parts of a pci card to conserve KVA 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, 15 Feb 2005 21:15:44 -0000 Scott Long writes: > > You can use pmap_mapdev() to create a KVA mapping of an arbitrary > physaddr+len. In fact, this is exactly what newbus uses to create the > PCI MEMIO resources when bus_alloc_resource() is called. I'm not sure > if the range is mapped and activated before the driver makes that call, > Warner or John might know for sure. Thanks.. But since this is an out of tree driver, I want to stick as much as I can to the normal driver APIs. If the KVA wastage becomes a huge problem, I'll explore pmap_mapdev(), but for now its not a big deal. Thanks again, Drew