Re: ARM : Kernel : Setting up of MMU in head.S

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Merci mate. :-)

On Thu, Mar 31, 2011 at 3:59 AM, Dave Hylands <dhylands@xxxxxxxxx> wrote:
Hi Prakash,

On Wed, Mar 30, 2011 at 2:35 PM, Dave Hylands <dhylands@xxxxxxxxx> wrote:
> Hi Prakash,
>
> On Wed, Mar 30, 2011 at 8:19 AM, Prakash K.B. <prakashk75@xxxxxxxxx> wrote:
>> 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 do have a
>> fair understanding of the way MMU is meant to be setup, but something in the
>> 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
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux