<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>&quot;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.&quot;<br><br>Why is there a need to map the whole RAM into the kernel space (the usage of the word &quot;entirely&quot;) ? Shouldn&#39;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&#39;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">&lt;<a href="mailto:Jeff.Haran@citrix.com" target="_blank">Jeff.Haran@citrix.com</a>&gt;</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 &lt;<a href="mailto:shahsunny715@gmail.com">shahsunny715@gmail.com</a>&gt; wrote:<br>
&gt; Hello,<br>
&gt;<br>
&gt; This is my first mail on this list, so please let me know if I&#39;m erring.<br>
&gt;<br>
&gt; I&#39;m reading Bovet and Cesati&#39;s &quot;Understanding the Linux Kernel&quot;,<br>
&gt; specifically the chapter &quot;Memory Addressing&quot;, sub-section &quot;Kernel Page<br>
&gt; Tables&quot;. Here they describe how Linux initializes its page tables for<br>
&gt; various RAM sizes and how much of the physical address space is mapped<br>
&gt; onto the kernel virtual address space.<br>
&gt;<br>
&gt; I have several questions from my reading:<br>
&gt;<br>
&gt; My understanding is that the 32 bit virtual address space of a process<br>
&gt; is split into 2 parts - the first 3 GiB for the user space and the<br>
&gt; remaining 1GiB for the kernel (with the same kernel mapping being used<br>
&gt; for all processes. However, although the kernel is mapped into the<br>
&gt; 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&#39;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&#39;s lots of options here.<br>
<span class="HOEnZb"><font color="#888888"><br>
Jeff Haran<br>
<br>
<br>
</font></span></blockquote></div><br></div>