From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 30 19:10:16 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 9782916A4CE for ; Wed, 30 Mar 2005 19:10:16 +0000 (GMT) Received: from hotmail.com (bay10-f41.bay10.hotmail.com [64.4.37.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F74843D2F for ; Wed, 30 Mar 2005 19:10:16 +0000 (GMT) (envelope-from ghanekar_rajesh@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 30 Mar 2005 11:10:16 -0800 Message-ID: Received: from 210.210.81.200 by by10fd.bay10.hotmail.msn.com with HTTP; Wed, 30 Mar 2005 19:10:15 GMT X-Originating-IP: [210.210.81.200] X-Originating-Email: [ghanekar_rajesh@hotmail.com] X-Sender: ghanekar_rajesh@hotmail.com From: "Rajesh Ghanekar" To: freebsd-hackers@freebsd.org Date: Thu, 31 Mar 2005 00:40:15 +0530 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 30 Mar 2005 19:10:16.0133 (UTC) FILETIME=[1B4EA750:01C5355C] Subject: physical address to virtual address conversion 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: Wed, 30 Mar 2005 19:10:16 -0000 Hi, I am trying to convert a physical memory location (address 0x000F0000) to virtual memory address in kernel module with pmap_map() / pmap_enter(). Whenever i call these two functions, system hangs. Is this a proper way for conversion? The same physical address can be accessed from the userspace by opening /dev/mem. The code which does the memory mapping to /dev/mem at kernel level is in ./sys/i386/i386/mem.c as mmrw() which also uses pmap_enter(). kernel = FreeBSD 4.10 - Rajesh _________________________________________________________________ NRIs, operate Rupee Checking Account. http://creative.mediaturf.net/creatives/citibankrca/rca_msntagofline.htm Without minimum balance for 20 yrs!