Hi Dave.<br><br><div class="gmail_quote">On Thu, Mar 31, 2011 at 7:29 PM, 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 11:01 PM, Prakash K.B. &lt;<a href="mailto:prakashk75@gmail.com">prakashk75@gmail.com</a>&gt; wrote:<br>
&gt; Merci mate. :-)<br>
&gt;<br>
&gt; On Thu, Mar 31, 2011 at 3:59 AM, Dave Hylands &lt;<a href="mailto:dhylands@gmail.com">dhylands@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hi Prakash,<br>
&gt;&gt;<br>
&gt;&gt; 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>
</div>...snip...<br>
<div class="im">&gt;&gt; When the MMU table is turned on, the PC is still at 0x800xxxx, so even<br>
&gt;&gt; though the kernel has 0xc00xxxxx mapped to 0x800xxxxx it also has to<br>
&gt;&gt; have 0x800xxxxx mapped to 0x800xxxxx.<br>
&gt;<br>
&gt; [Prakash] I think you meant to say &quot;So even though the kernel intends to map<br>
&gt; 0xc00XXXX to 0x800XXX in the future, it has currently mapped 0x800xxx to<br>
&gt; 0x800xxx.<br>
<br>
</div>No. the create_page_table function creates a page table which has<br>
0x800xxxxx and 0xc00xxxxx both mapped to 0x800xxxxx. The one store<br>
intrustion saves the identity mapping (for 1 Mb) and the loop sets up<br>
the 0xc00xxxxx to 0x800xxxxx mapping.<br>
<br>
The identity portion is used as we discussed, and a few instructions<br>
after turning on the MMU, the CPU then does a jump from the 0x800xxxxx<br>
space to the 0xc00xxxxx space. After that, the identity mapping is no<br>
longer needed. Shortly after this, head.S calls into the start_kernel<br>
function (from init/main.c) and the paging_init function reinitializes<br>
the MMU removing the identity mapping.<br></blockquote><div> </div><div>[Prakash] I confirm I now see this exactly as you describe above and below. Thanks a bunch Dave.<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>
&gt;<br>
&gt; Now that I know this identity mapping is done on purpose, I hope to make<br>
&gt; good progress with the succeeding sequence.<br>
&gt;<br>
&gt; Do you confirm that only one entry is written into this L1 table because<br>
&gt; both mmu_enable and enable_mmu_end are on the same section?<br>
<br>
</div>Yeah - essentially, that one mapping entry covers 1Mb of code space,<br>
which is sufficient to cover all of head.S, which is always at the<br>
front of the kernel image.<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">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>