From owner-freebsd-questions Fri Aug 30 13:10:25 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 3362437B406 for ; Fri, 30 Aug 2002 13:10:13 -0700 (PDT) Received: from web.cs.ndsu.nodak.edu (web.cs.ndsu.NoDak.edu [134.129.125.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9345643E65 for ; Fri, 30 Aug 2002 13:10:12 -0700 (PDT) (envelope-from tinguely@web.cs.ndsu.nodak.edu) Received: (from tinguely@localhost) by web.cs.ndsu.nodak.edu (8.11.4/8.11.4) id g7UKABP39261; Fri, 30 Aug 2002 15:10:11 -0500 (CDT) (envelope-from tinguely) Date: Fri, 30 Aug 2002 15:10:11 -0500 (CDT) From: mark tinguely Message-Id: <200208302010.g7UKABP39261@web.cs.ndsu.nodak.edu> To: freebsd-questions@FreeBSD.ORG, pavan.balaji@intel.com Subject: RE: Virtual Address to Physical Address translation In-Reply-To: <3D386AED1B47D411A94300508B11F18704AD69CE@fmsmsx116.fm.intel.com> 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 > 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