Hi Dave.<br><br><div class="gmail_quote">On Thu, Mar 31, 2011 at 7:29 PM, Dave Hylands <span dir="ltr"><<a href="mailto:dhylands@gmail.com">dhylands@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;">
Hi Prakash,<br>
<div class="im"><br>
On Wed, Mar 30, 2011 at 11:01 PM, Prakash K.B. <<a href="mailto:prakashk75@gmail.com">prakashk75@gmail.com</a>> wrote:<br>
> Merci mate. :-)<br>
><br>
> On Thu, Mar 31, 2011 at 3:59 AM, Dave Hylands <<a href="mailto:dhylands@gmail.com">dhylands@gmail.com</a>> wrote:<br>
>><br>
>> Hi Prakash,<br>
>><br>
>> On Wed, Mar 30, 2011 at 2:35 PM, Dave Hylands <<a href="mailto:dhylands@gmail.com">dhylands@gmail.com</a>> wrote:<br>
</div>...snip...<br>
<div class="im">>> 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>
><br>
> [Prakash] I think you meant to say "So even though the kernel intends to map<br>
> 0xc00XXXX to 0x800XXX in the future, it has currently mapped 0x800xxx to<br>
> 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>
><br>
> Now that I know this identity mapping is done on purpose, I hope to make<br>
> good progress with the succeeding sequence.<br>
><br>
> Do you confirm that only one entry is written into this L1 table because<br>
> 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>