Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Jun 1997 21:36:38 -0700 (PDT)
From:      Pat Bozeman <peb@george.lbl.gov>
To:        freebsd-hackers@freebsd.org
Subject:   Virtual address question for VM guru's
Message-ID:  <Pine.SOL.3.95.970603211241.23254C-100000@george.lbl.gov>

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

I am working on a project where I need to access the address space of a
process when the process is not necessarily the current process.  I am
working on a device driver which requires that I copy data directly into
any writable region in the processes address space.  The user informs the
kernel of the address range which is then verified and wired before any
such transfers take place.  This _almost_ all works, if the process is not
active at the time the device driver attempts to write to the buffer the
virtual address is giberish.

What I would like to do is map specific process address ranges into the
kernel's virtual address space and then keep track of the new kernel
virtual address which should point to the correct physical address
regardless of which process is active.  Or, if there is a method for
copying data to a physical address I can always perform the translation at
the time the pages are initialy verified, faulted, and wired and then
store the physical address, but I not sure how I would do that either.

If someone could just point me to the set of functions I would need to
use, I am sure I can figure it out.  However, I am not sure if I should be
working with pmap functions (i.e. pmap_qenter) or with the vm functions
(i.e. vm_map_find etc.)

 









Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.3.95.970603211241.23254C-100000>