From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 9 04:55:28 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 2A61F37B407 for ; Mon, 9 Jun 2003 04:55:28 -0700 (PDT) Received: from mail.speakeasy.net (mail10.speakeasy.net [216.254.0.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 95CA243F93 for ; Mon, 9 Jun 2003 04:55:27 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 16074 invoked from network); 9 Jun 2003 11:55:26 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 9 Jun 2003 11:55:26 -0000 Received: from laptop.baldwin.cx (laptop.baldwin.cx [192.168.0.4]) by server.baldwin.cx (8.12.9/8.12.9) with ESMTP id h59BtOGI004333; Mon, 9 Jun 2003 07:55:24 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200306071339.AA203489334@gatorzone.com> Date: Mon, 09 Jun 2003 07:55:25 -0400 (EDT) From: John Baldwin To: cd_freebsd cc: freebsd-hackers@freebsd.org Subject: RE: Mapping Physical Memory without a Device? 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: Mon, 09 Jun 2003 11:55:28 -0000 On 07-Jun-2003 cd_freebsd wrote: > After sending my first note, I found pmap_mapdev. Anything wrong with using that? /* * Map a set of physical memory pages into the kernel virtual * address space. Return a pointer to where it is mapped. This * routine is intended to be used for mapping device memory, * NOT real memory. */ Read the last comment. It is intended for memory-mapped devices (I use it to map the I/O APICs and local APIC for example) and not for actual RAM. The problem is that the RAM could be used out from under you. You need to reserve it in the VM somehow. I'm not sure how you would accomplish that. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/