Date: Fri, 15 Feb 2002 18:31:58 -0800 From: "mike varga" <mike.varga@cavium.com> To: <freebsd-arch@freebsd.org> Subject: virtual address from physical Message-ID: <009b01c1b692$1beea670$b210a8c0@netscreen5>
index | next in thread | raw e-mail
[-- Attachment #1 --] Does anyone know of an easy way to get a process's virtual address from a physical address? Linux has functions that allow programmers to go both ways. --virtual to physical --physical to virtual Are there analogs in FreeBSD? I am aware of vtophys(), but can not find anything that goes the other way. I could search a process's page table for a base/len combination that my physical address falls within and then add the offset? [-- Attachment #2 --] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 5.50.4522.1800" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>Does anyone know of an easy</FONT></DIV> <DIV><FONT face=Arial size=2>way to get a process's virtual</FONT></DIV> <DIV><FONT face=Arial size=2>address from a physical address?</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Linux has functions that allow</FONT></DIV> <DIV><FONT face=Arial size=2>programmers to go both ways.</FONT></DIV> <DIV><FONT face=Arial size=2>--virtual to physical </FONT></DIV> <DIV><FONT face=Arial size=2>--physical to virtual</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Are there analogs in </FONT></DIV> <DIV><FONT face=Arial size=2>FreeBSD?</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>I am aware of vtophys(),</FONT></DIV> <DIV><FONT face=Arial size=2>but can not find anything </FONT></DIV> <DIV><FONT face=Arial size=2>that goes the other way.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>I could search a process's</FONT></DIV> <DIV><FONT face=Arial size=2>page table for a base/len combination</FONT></DIV> <DIV><FONT face=Arial size=2>that my physical address falls within </FONT></DIV> <DIV><FONT face=Arial size=2>and then add the offset?</FONT></DIV></BODY></HTML>help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?009b01c1b692$1beea670$b210a8c0>
