From owner-freebsd-questions Fri Aug 30 13:17:27 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F39D237B400 for ; Fri, 30 Aug 2002 13:17:22 -0700 (PDT) Received: from mail2.hd.intel.com (hdfdns02.hd.intel.com [192.52.58.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 01FAE43E42 for ; Fri, 30 Aug 2002 13:17:22 -0700 (PDT) (envelope-from pavan.balaji@intel.com) Received: from fmsmsxvs041.fm.intel.com (fmsmsxvs041.fm.intel.com [132.233.42.126]) by mail2.hd.intel.com (8.11.6/8.11.6/d: solo.mc,v 1.42 2002/05/23 22:21:11 root Exp $) with SMTP id g7UKHK422121 for ; Fri, 30 Aug 2002 20:17:21 GMT Received: from FMSMSX017.fm.intel.com ([132.233.42.196]) by fmsmsxvs041.fm.intel.com (NAVGW 2.5.2.11) with SMTP id M2002083013163023263 ; Fri, 30 Aug 2002 13:16:30 -0700 Received: by fmsmsx017.fm.intel.com with Internet Mail Service (5.5.2653.19) id ; Fri, 30 Aug 2002 13:17:19 -0700 Message-ID: <3D386AED1B47D411A94300508B11F18704AD69D2@fmsmsx116.fm.intel.com> From: "Balaji, Pavan" To: "'mark tinguely'" , freebsd-questions@FreeBSD.ORG, "Balaji, Pavan" Subject: RE: Virtual Address to Physical Address translation Date: Fri, 30 Aug 2002 13:17:17 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > 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