kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: dhylands@gmail.com (Dave Hylands)
To: kernelnewbies@lists.kernelnewbies.org
Subject: VMA of processes and CPU registers
Date: Tue, 19 Apr 2011 16:20:19 -0700	[thread overview]
Message-ID: <BANLkTi=1zqJ80WhEmV7NK8XNH17kPDuM6A@mail.gmail.com> (raw)
In-Reply-To: <SNT111-DS36E21CEE9AC0688DFE5B9A7900@phx.gbl>

Hi John,

On Tue, Apr 19, 2011 at 3:56 PM, limp <johnkyr83@hotmail.com> wrote:
> Hi all,
>
> I know that each user processes has a number of virtual memory areas (VMA)
> which consist its (virtual memory) address space. For example cat
> /proc/1426/maps will return the (virtual memory) address space of the
> process 1426.
>
> What I don't know for sure is if the actual CPU registers contain the
> virtual address of a running process or the "translated" by MMU physical
> address.
>
> I think that every access to a VA must be resolved to a corresponding PA so
> I guess the CPU registers will deal with the physical addresses rather than
> the virtual ones but I wanted to be sure about it.

The CPU registers will contain the virtual addresses. Each and every
time that the CPU tries to access a virtual memory location, then the
address will be translated by the MMU into a physical address.

Generally speaking. the only time you actually deal with physical
addresses is when you're setting up the MMU, and when programming
hardware (like DMA) which accesses memory without going through the
MMU.

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com

  reply	other threads:[~2011-04-19 23:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-19 22:56 VMA of processes and CPU registers limp
2011-04-19 23:20 ` Dave Hylands [this message]
2011-04-20 11:01   ` limp
2011-04-20 16:03     ` mindentropy
2011-04-25  8:55       ` Prabhu nath
2011-04-25 16:38         ` mindentropy
2011-04-27  4:33           ` Prabhu nath
2011-04-27  4:48             ` Mulyadi Santosa
2011-04-27 18:30             ` mindentropy
2011-04-20 17:30     ` Dave Hylands
2011-04-20 18:08       ` mindentropy
2011-04-21  1:22         ` Dave Hylands
2011-04-21 19:54           ` mindentropy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTi=1zqJ80WhEmV7NK8XNH17kPDuM6A@mail.gmail.com' \
    --to=dhylands@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).