Re: calculating physical memory address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

pkirsch@xxxxxxxxxx wrote:

> I need to know which function translates the linear logical address (e.g. 
> 0x08048000) to the memory address, where the data is physically stored.
> (And vice versa.)

Here you say that you need both logical => physical *and* physical =>
logical.

> I need to know where start_code and end_code is saved in the physical memory.

Here you say that you need only logical => physical.

Logical => physical and physical => logical involve completely different
mechanisms. So please be precise about this.

To convert a logical address to a "struct page *" (which represents a
physical page), you can use virt_to_page(), but it only works for kernel
addresses (so it won't work with start_code and end_code that are user
addresses).

I don't know what is the clean way of converting a user virtual address
to the associated physical address.

Sincerly,

Thomas
-- 
Thomas Petazzoni
thomas.petazzoni@xxxxxxxx

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux