<div dir="ltr">Thank you guys!<div><br><div><div>I have two more questions from your replies:</div><div><ul><li>I thought I had understood HIGH_MEM and LOW_MEM, but it appears I was wrong. Does the concept of high memory/low memory correspond to physical address space or virtual address space? Also, does LOW_MEM always have to be 1 GiB maximum?</li><li>For a RAM of 896 MiB - 4096 MiB, the book says:<br>"In this case, the RAM cannot be mapped entirely into the kernel linear address space. The best Linux can do during the initialization phase is to map a RAM window of size 896 MB into the kernel linear address space."<br><br>Why is there a need to map the whole RAM into the kernel space (the usage of the word "entirely") ? Shouldn't it be only LOW_MEM ? Or am I confusing the two things here ?</li></ul><div><br></div><div>I believe all doubts are pointing to the concepts of LOW_MEM and HIGH_MEM, but I'm still not being able to wrap my head around them.</div><div><br></div></div><div>Thanks,</div><div>Sunny</div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 12, 2015 at 11:49 PM, Jeff Haran <span dir="ltr"><<a href="mailto:Jeff.Haran@citrix.com" target="_blank">Jeff.Haran@citrix.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">-----Original Message-----<br>
From: <a href="mailto:kernelnewbies-bounces@kernelnewbies.org">kernelnewbies-bounces@kernelnewbies.org</a> [mailto:<a href="mailto:kernelnewbies-bounces@kernelnewbies.org">kernelnewbies-bounces@kernelnewbies.org</a>] On Behalf Of Arun KS<br>
Sent: Thursday, March 12, 2015 11:03 AM<br>
To: Sunny Shah<br>
Cc: kernelnewbies<br>
Subject: Re: Understanding the mapping of physical memory to kernel address space<br>
<br>
Hello Sunny,<br>
<br>
On Thu, Mar 12, 2015 at 10:32 PM, Sunny Shah <<a href="mailto:shahsunny715@gmail.com">shahsunny715@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> This is my first mail on this list, so please let me know if I'm erring.<br>
><br>
> I'm reading Bovet and Cesati's "Understanding the Linux Kernel",<br>
> specifically the chapter "Memory Addressing", sub-section "Kernel Page<br>
> Tables". Here they describe how Linux initializes its page tables for<br>
> various RAM sizes and how much of the physical address space is mapped<br>
> onto the kernel virtual address space.<br>
><br>
> I have several questions from my reading:<br>
><br>
> My understanding is that the 32 bit virtual address space of a process<br>
> is split into 2 parts - the first 3 GiB for the user space and the<br>
> remaining 1GiB for the kernel (with the same kernel mapping being used<br>
> for all processes. However, although the kernel is mapped into the<br>
> higher portion of the address space, it resides in the lower 1 GiB of RAM. Is this correct?<br>
Yes. Incase of 3:1 mapping, kernel virtual address starts at 0xc0000000. You can also have 2:2 mappings aswell. It is a configurable option<br>
<br>
</span>Just an FYI, I've seen 1:3 mapping too. We had to do that with the kernels we built<br>
when I was at one company because we needed 3GB of virtual address space to map all<br>
of the memory mapped registers on their ASICs.<br>
<br>
There's lots of options here.<br>
<span class="HOEnZb"><font color="#888888"><br>
Jeff Haran<br>
<br>
<br>
</font></span></blockquote></div><br></div>