kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: prakashk75@gmail.com (Prakash K.B.)
To: kernelnewbies@lists.kernelnewbies.org
Subject: ARM : Kernel : Setting up of MMU in head.S
Date: Thu, 31 Mar 2011 11:31:10 +0530	[thread overview]
Message-ID: <AANLkTimntQKHaF729dS6KmE3xiyscG2z05fwMqKSE4DP@mail.gmail.com> (raw)
In-Reply-To: <AANLkTinnZ1pdj-0UejKgBT52-_Nt2rZKyiK3XWjaiRvd@mail.gmail.com>

Merci mate. :-)

On Thu, Mar 31, 2011 at 3:59 AM, Dave Hylands <dhylands@gmail.com> wrote:

> Hi Prakash,
>
> On Wed, Mar 30, 2011 at 2:35 PM, Dave Hylands <dhylands@gmail.com> wrote:
> > Hi Prakash,
> >
> > On Wed, Mar 30, 2011 at 8:19 AM, Prakash K.B. <prakashk75@gmail.com>
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110331/50125820/attachment-0001.html 

  reply	other threads:[~2011-03-31  6:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-30 15:19 ARM : Kernel : Setting up of MMU in head.S Prakash K.B.
2011-03-30 19:25 ` sk.syed2
2011-03-31  6:31   ` Prakash K.B.
2011-03-30 21:35 ` Dave Hylands
2011-03-30 22:29   ` Dave Hylands
2011-03-31  6:01     ` Prakash K.B. [this message]
2011-03-31 13:59       ` Dave Hylands
2011-04-03  8:01         ` Prakash K.B.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTimntQKHaF729dS6KmE3xiyscG2z05fwMqKSE4DP@mail.gmail.com \
    --to=prakashk75@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).