Merci mate. :-)<br><br><div class="gmail_quote">On Thu, Mar 31, 2011 at 3:59 AM, Dave Hylands <span dir="ltr">&lt;<a href="mailto:dhylands@gmail.com">dhylands@gmail.com</a>&gt;</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;">
Hi Prakash,<br>
<div class="im"><br>
On Wed, Mar 30, 2011 at 2:35 PM, Dave Hylands &lt;<a href="mailto:dhylands@gmail.com">dhylands@gmail.com</a>&gt; wrote:<br>
&gt; Hi Prakash,<br>
&gt;<br>
&gt; On Wed, Mar 30, 2011 at 8:19 AM, Prakash K.B. &lt;<a href="mailto:prakashk75@gmail.com">prakashk75@gmail.com</a>&gt; wrote:<br>
&gt;&gt; Hello.<br>
&gt;&gt;<br>
&gt;&gt; Please do not hesitate to let me know if this must be posted elsewhere.<br>
&gt;&gt;<br>
&gt;&gt; I have been trying to understand the code that sets up the MMU. I do have a<br>
&gt;&gt; fair understanding of the way MMU is meant to be setup, but something in the<br>
&gt;&gt; kernel code is tripping me.<br>
<br>
</div>Some further explanation is due.<br>
<br>
When the kernel starts, the MMU is off, and ther ARM is running with<br>
an implicit identity mapping (i.e. each virtual address maps to the<br>
same physical address).<br></blockquote><div>[Prakash] Aha...So what I ignored as a routine code comment had a deeper meaning.. :-) <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
If your physical memory starts at 0x80000000, then the PC will be 0x800xxxxx.<br></blockquote><div>[Prakash] Agreed. <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
When the MMU table is turned on, the PC is still at 0x800xxxx, so even<br>
though the kernel has 0xc00xxxxx mapped to 0x800xxxxx it also has to<br>
have 0x800xxxxx mapped to 0x800xxxxx.<br></blockquote><div>[Prakash] I think you meant to say &quot;So even though the kernel intends to map 0xc00XXXX to 0x800XXX in the future, it has currently mapped 0x800xxx to 0x800xxx.<br>
<br>Now that I know this identity mapping is done on purpose, I hope to make good progress with the succeeding sequence.<br><br>Do you confirm that only one entry is written into this L1 table because both mmu_enable and enable_mmu_end are on the same section?<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
So this mapping of 0x800xxxxx to 0x800xxxxx is the &quot;identity&quot; portion<br>
and is needed while switching the MMU on. The 0xc00xxxxx to 0x800xxxxx<br>
mapping is what&#39;s used while the kernel is running.<br>
<div><div></div><div class="h5"><br>
--<br>
Dave Hylands<br>
Shuswap, BC, Canada<br>
<a href="http://www.davehylands.com" target="_blank">http://www.davehylands.com</a><br>
</div></div></blockquote></div><br>-Prakash<br>