Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Mar 2005 12:25:06 -0700
From:      Scott Long <scottl@samsco.org>
To:        Rajesh Ghanekar <ghanekar_rajesh@hotmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: physical address to virtual address conversion
Message-ID:  <424AFD12.7070505@samsco.org>
In-Reply-To: <BAY10-F4148A147B94D76669BD6A28A460@phx.gbl>
References:  <BAY10-F4148A147B94D76669BD6A28A460@phx.gbl>

next in thread | previous in thread | raw e-mail | index | archive | help
Rajesh Ghanekar wrote:
> 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
> 

pmap_mapdev() is probably what you want.  However, what exactly are you
trying to do?  Why do you need access to a specific physical location?

Scott



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?424AFD12.7070505>