<br><div class="gmail_quote">On Wed, Feb 16, 2011 at 11:22 AM, Rajat Sharma <span dir="ltr"><<a href="mailto:fs.rajat@gmail.com">fs.rajat@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">> But coming to kernel they distinguish logical address from virtual<br>
> address. What is the main difference.<br>
<br>
</div>kernel logical address has linear (one-to-one) mapping of physical<br>
address to virtual address range. e.g. kernel logical address (linear<br>
address) from 3G to 4G (on x86) can map physical memory of 0-1G, so it<br>
is intutive to get physical address from a logical address by<br>
subtrating 3G from logical address.<br>
<br>
while kernel virtual address can be though of as logical address with<br>
no restriction of linear mapping. Then how they map to physical pages?<br>
Well this is achieved through page tables mapping like user space<br>
address, however the virtual address range falls in 3G-4G (on x86)<br>
range only. Basically you can say it is the process mapping of kernel<br>
virtual address range (3G-4G) in its page tables. CPU works through<br>
page-tables hence requires kernel virtual address in code<br>
instructions. So, it is possible thats a kernel page has kernel<br>
virtual address as well as logical address.<br></blockquote><div>So virtual address allocated to processes in user space is mapped to kernel virtual address(3g-4g range) using page tables?<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im"><br>
> Also, they emphasize on high memory and low memory. Why can not high<br>
> memory can be mapped in to kernel completely.<br>
> Why is that kernel has less visibility of complete space available on RAM.<br>
<br>
</div>For a limited address space range of linear mapping, physical memory<br>
has to be limited (one-to-one mapping). So, if your system (x86) has<br>
more than 1G physical RAM, Linux provides some mechanism releasing<br>
some small slot between (3G + 896M) to 4G for dynamically mapping High<br>
phyical memory page frames (>896M physical address), since you can't<br>
always map the complete physical RAM all the time. This dynamic<br>
mapping is done through kmap().<br>
<div class="im"><br>
> what is very minimal implementation of MMU for real time systems.<br>
</div># CONFIG_MMU is not set<br>
means linear mapping of all physical address to virtual address. Not<br>
sure, but seems it requires processor support to work on linear<br>
address bypassing page-tables conversion.<br>
<br>
Rajat<br>
<div><div></div><div class="h5"><br>
On Tue, Feb 15, 2011 at 10:45 PM, Sri Ram Vemulpali<br>
<<a href="mailto:sri.ram.gmu06@gmail.com">sri.ram.gmu06@gmail.com</a>> wrote:<br>
> As was suggested I started reading chap 15v from LDD. I ran more into<br>
> confusion state.<br>
><br>
> I know that virtual address(process space), linear address<br>
> (segmentation) and physical address. And how are they resolved from<br>
> virtual to physical.<br>
> But coming to kernel they distinguish logical address from virtual<br>
> address. What is the main difference.<br>
> Also, they emphasize on high memory and low memory. Why can not high<br>
> memory can be mapped in to kernel completely.<br>
> Why is that kernel has less visibility of complete space available on RAM.<br>
> Linux MM is it a very specific implementation of linux, or Is that a<br>
> traditional implementation.<br>
><br>
> what is very minimal implementation of MMU for real time systems.<br>
><br>
> Thanks in advance.<br>
><br>
> --Sri.<br>
><br>
> On Tue, Feb 15, 2011 at 12:54 AM, Ankita Garg <<a href="mailto:ankita@in.ibm.com">ankita@in.ibm.com</a>> wrote:<br>
>> On Wed, Feb 09, 2011 at 06:45:42PM -0500, Sri Ram Vemulpali wrote:<br>
>>> Hi all,<br>
>>><br>
>>> How do I map some space between kernel and user space. Can anyone<br>
>>> point me in to right direction. I was trying to map the packets from<br>
>>> my netfilter function to kernel user space, to avoid over head of<br>
>>> copying. Thanks in advance.<br>
>>><br>
>><br>
>> You can take a look at remap_pfn_range() routine when implementing mmap<br>
>> in your driver.<br>
>><br>
>> --<br>
>> Regards,<br>
>> Ankita Garg (<a href="mailto:ankita@in.ibm.com">ankita@in.ibm.com</a>)<br>
>> Linux Technology Center<br>
>> IBM India Systems & Technology Labs,<br>
>> Bangalore, India<br>
>><br>
><br>
><br>
><br>
> --<br>
> Regards,<br>
> Sri.<br>
><br>
</div></div>> _______________________________________________<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>
<div><div></div><div class="h5">><br>
--<br>
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in<br>
the body of a message to <a href="mailto:majordomo@vger.kernel.org">majordomo@vger.kernel.org</a><br>
More majordomo info at <a href="http://vger.kernel.org/majordomo-info.html" target="_blank">http://vger.kernel.org/majordomo-info.html</a><br>
Please read the FAQ at <a href="http://www.tux.org/lkml/" target="_blank">http://www.tux.org/lkml/</a><br>
</div></div></blockquote></div><br>