Re: User mode Virt -> Phys

Terence Murphy (tsmurphy@ichips.intel.com)
Tue, 12 Jan 1999 08:48:32 -0800 (PST)


On Tue, 12 Jan 1999, Chris Wedgwood wrote:

> On Mon, Jan 11, 1999 at 12:18:57PM -0800, Terence Murphy wrote:
>
> > The linux kernel is full of calls to virt_to_phys. This function
> > seems only to work in kernel mode. Is there a way to convert a
> > physical address to a virtual address in user mode (from a regular
> > program)?
>
> No -- I don't think there presently is.
>
> I think Richard Gooch posted a patch so that this could be done ages
> ago (via ioctl or something).

Any idea on where I can find it? This sounds like it would be very
useful.

> Userland doesn't (or shouldn't) need to know physical addresses
> normally -- can you explain why you might need this?

Mainly because I want to set up cache types for different memory objects
in memory. I want a certain region to be WB, some to be WC, some to be
USWC, etc. To set the cache types (with MTRR's), I need the physical
address. (Note: this is for a highly specialized testing tool, not a
regular application).

-- Terry

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/