ARM : Kernel : Setting up of MMU in head.S
From: Prakash K.B. <hidden>
Date: 2011-03-31 06:01:10
Merci mate. :-) On Thu, Mar 31, 2011 at 3:59 AM, Dave Hylands [off-list ref] wrote:
Hi Prakash, On Wed, Mar 30, 2011 at 2:35 PM, Dave Hylands [off-list ref] wrote:quoted
Hi Prakash, On Wed, Mar 30, 2011 at 8:19 AM, Prakash K.B. [off-list ref]wrote:quoted
quoted
Hello. Please do not hesitate to let me know if this must be posted elsewhere. I have been trying to understand the code that sets up the MMU. I dohave aquoted
quoted
fair understanding of the way MMU is meant to be setup, but something inthequoted
quoted
kernel code is tripping me.Some further explanation is due. When the kernel starts, the MMU is off, and ther ARM is running with an implicit identity mapping (i.e. each virtual address maps to the same physical address).
[Prakash] Aha...So what I ignored as a routine code comment had a deeper meaning.. :-)
If your physical memory starts at 0x80000000, then the PC will be 0x800xxxxx.
[Prakash] Agreed.
When the MMU table is turned on, the PC is still at 0x800xxxx, so even though the kernel has 0xc00xxxxx mapped to 0x800xxxxx it also has to have 0x800xxxxx mapped to 0x800xxxxx.
[Prakash] I think you meant to say "So even though the kernel intends to map 0xc00XXXX to 0x800XXX in the future, it has currently mapped 0x800xxx to 0x800xxx. Now that I know this identity mapping is done on purpose, I hope to make good progress with the succeeding sequence. 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?
So this mapping of 0x800xxxxx to 0x800xxxxx is the "identity" portion and is needed while switching the MMU on. The 0xc00xxxxx to 0x800xxxxx mapping is what's used while the kernel is running. -- Dave Hylands Shuswap, BC, Canada http://www.davehylands.com
-Prakash -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110331/50125820/attachment-0001.html