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>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. ------=_NextPart_000_0098_01C1B64F.0D41EB20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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=20 --physical to virtual Are there analogs in=20 FreeBSD? I am aware of vtophys(), but can not find anything=20 that goes the other way. I could search a process's page table for a base/len combination that my physical address falls within=20 and then add the offset? ------=_NextPart_000_0098_01C1B64F.0D41EB20 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>Does anyone know of an = easy</FONT></DIV> <DIV><FONT face=3DArial size=3D2>way to get a process's = virtual</FONT></DIV> <DIV><FONT face=3DArial size=3D2>address from a physical = address?</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Linux has functions that = allow</FONT></DIV> <DIV><FONT face=3DArial size=3D2>programmers to go both = ways.</FONT></DIV> <DIV><FONT face=3DArial size=3D2>--virtual to physical </FONT></DIV> <DIV><FONT face=3DArial size=3D2>--physical to virtual</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Are there analogs in </FONT></DIV> <DIV><FONT face=3DArial size=3D2>FreeBSD?</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>I am aware of vtophys(),</FONT></DIV> <DIV><FONT face=3DArial size=3D2>but can not find anything </FONT></DIV> <DIV><FONT face=3DArial size=3D2>that goes the other way.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>I could search a process's</FONT></DIV> <DIV><FONT face=3DArial size=3D2>page table for a base/len = combination</FONT></DIV> <DIV><FONT face=3DArial size=3D2>that my physical address falls within = </FONT></DIV> <DIV><FONT face=3DArial size=3D2>and then add the = offset?</FONT></DIV></BODY></HTML> ------=_NextPart_000_0098_01C1B64F.0D41EB20-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?009b01c1b692$1beea670$b210a8c0>