<br><br><div class="gmail_quote">On Tue, Oct 16, 2012 at 5:47 PM, Kshemendra KP <span dir="ltr">&lt;<a href="mailto:kshemendra@suphalaam.com" target="_blank">kshemendra@suphalaam.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><div>   On x86 kernel is normally split into 3GB (user) : 1 GB (Kernel) spaces. Kernel can only directly </div><div>   manipulate 1 GB (around 889 MB) from the PAGE_OFFSET (0xC0000000). The user space </div><div>   memofy below PAGE_OFFSET kernel can&#39;t directly access, it considers this memory as </div>

<div>   high memory. Kernel needs to kmap()/kmap_atomic() map user page and access that region.</div></blockquote><div> </div><div>As per my understanding, if kernel code is running under a process context then it can access lower 3GB address space, provided address in 0-3GB is in process address space.  And its not a high memory. </div>
<div>High memory is a virtual address space with 1GB kernel space to map RAM pages beyond 896MB. </div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div></div><div>   If the memory is above 4 GB with page extension, it is clear that kernel can&#39;t access it as </div>
<div>   kernel uses &quot;void *&quot; and/or  &quot;unsigned long&quot; to hold the address. But it is not clear for me</div><div>   why kernel&#39;s can&#39;t directly access memory below PAGE_OFFSET ( 0-3GB) directly.</div>
</blockquote><div><br></div><div>Kernel can access 0-3GB memory, take an example of application sending data to kernel via system call e.g. write.</div><div>in Write system call pointer to the buffer will be in 0-3Gb address space of calling application. And kernel will access this address to write data to drivers/etc .. </div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br></div><div>Regards</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Kshemendra</div>

</font></span><br>_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br></blockquote></div>Chetan Nanda