* Why the page tables are needed for lowmem?
@ 2014-06-19 3:21 sandeep kumar
2014-06-19 5:17 ` Pranay Srivastava
2014-06-19 19:40 ` Rik van Riel
0 siblings, 2 replies; 3+ messages in thread
From: sandeep kumar @ 2014-06-19 3:21 UTC (permalink / raw)
To: kernelnewbies
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?
--
With regards,
Sandeep Kumar Anantapalli,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140619/074f3dab/attachment.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Why the page tables are needed for lowmem?
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
1 sibling, 0 replies; 3+ messages in thread
From: Pranay Srivastava @ 2014-06-19 5:17 UTC (permalink / raw)
To: kernelnewbies
On Thu, Jun 19, 2014 at 8:51 AM, sandeep kumar
<coolsandyforyou@gmail.com> 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 ??
>
I hope you understand how MMU and virtual memory works.
> 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?
Let's forget about lowmem or high mem. See the role of MMU and you'll
understand why it's needed.
>
> can any one clarify?
>
>
> --
> With regards,
> Sandeep Kumar Anantapalli,
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
--
---P.K.S
^ permalink raw reply [flat|nested] 3+ messages in thread
* Why the page tables are needed for lowmem?
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
1 sibling, 0 replies; 3+ messages in thread
From: Rik van Riel @ 2014-06-19 19:40 UTC (permalink / raw)
To: kernelnewbies
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-06-19 19:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).