From: riel@surriel.com (Rik van Riel)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Why the page tables are needed for lowmem?
Date: Thu, 19 Jun 2014 15:40:59 -0400 [thread overview]
Message-ID: <53A33CCB.9050609@surriel.com> (raw)
In-Reply-To: <CAL7WMDeS8KJEXi5zSVSei6Ruy=Z2CaLKsERshZ_eyi3w2CqVYA@mail.gmail.com>
On 06/18/2014 11:21 PM, sandeep kumar wrote:
> Hi All
>
> i was going through mm initialization code, and saw paging_init()
> implementation.
> it has a function map_lowmem().
>
> I was wondering why do we need page table entries for lowmem ??
>
> because all the pages in lowmem can be addressed by kernel logical
> address and differ only an offset from the physical address. Why cant we
> simply add that offset to the virtual(logical) address and get the job
> done. Why waste some memory for creating PTEs for them?
>
> can any one clarify?
Because after switching the CPU to protected mode,
the CPU can only access memory through page tables,
and can no longer do loads, stores, etc to physical
memory addresses.
prev parent reply other threads:[~2014-06-19 19:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-19 3:21 Why the page tables are needed for lowmem? sandeep kumar
2014-06-19 5:17 ` Pranay Srivastava
2014-06-19 19:40 ` Rik van Riel [this message]
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=53A33CCB.9050609@surriel.com \
--to=riel@surriel.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).