Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Aug 2002 13:17:17 -0700
From:      "Balaji, Pavan" <pavan.balaji@intel.com>
To:        "'mark tinguely'" <tinguely@web.cs.ndsu.nodak.edu>, freebsd-questions@FreeBSD.ORG, "Balaji, Pavan" <pavan.balaji@intel.com>
Subject:   RE: Virtual Address to Physical Address translation
Message-ID:  <3D386AED1B47D411A94300508B11F18704AD69D2@fmsmsx116.fm.intel.com>

next in thread | raw e-mail | index | archive | help

> By "I did the translation asynchronously" mean you are 
> directly manipulating

There was another function (f1()) which placed the physical address of the
buffer in some location. Now, this function (f2()) needs to see this
location and place the data in that location. That's what I mean by
asynchronously.


> Once mapped, if all we have is a physical address and the pmap (for
example
> we know it should be in a kernel or a particular process address space)
then
> we can retrieve the virtual address by traversing the pv_entry_t entries
> in the vm_page for the physical address.

This is thing I'm looking at. I have the physical address, so I can get the
vm_page structure using PHYS_TO_VM_PAGE. Now, I don't see any pv_entry_t
entry in this structure. How do I get the virtual address this physical
address is mapped to?


Pavan Balaji,
Intel Corporation
Email: pavan.balaji@intel.com

    "Only the Paranoid Survive"  --  Andy Grove


> -----Original Message-----
> From: mark tinguely [mailto:tinguely@web.cs.ndsu.nodak.edu]
> Sent: Friday, August 30, 2002 3:10 PM
> To: freebsd-questions@FreeBSD.ORG; pavan.balaji@intel.com
> Subject: RE: Virtual Address to Physical Address translation
> 
> 
> 
> >  Grrrr... The address I have is a PHYSICAL ADDRESS!!! I did 
> the translation
> >  asynchronously. I need to know if there's any function 
> through which I can
> >  copy from a virtual address space to a physical address space.
> 
> kernel and user space accesses are done to kernel and user 
> virtual spaces.
> The kernel or user space has to have the virtual->physical 
> entry to access.
> 
> By "I did the translation asynchronously" mean you are 
> directly manipulating
> the MMU, then good luck -- really add the physical address to 
> the kernel
> virtual addess space. It is the first thing that is done in 
> every device
> driver. If you added the translation through the VM API, then 
> great, you
> created a virtual address association with the physical address.
> 
> Once mapped, if all we have is a physical address and the 
> pmap (for example
> we know it should be in a kernel or a particular process 
> address space) then
> we can retrieve the virtual address by traversing the 
> pv_entry_t entries
> in the vm_page for the physical address.
> 
> --mark tinguely.
> 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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