public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Andrew Fish <afish@apple.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: valerij zaporogeci <vlrzprgts@gmail.com>,
	edk2-devel <edk2-devel@lists.01.org>
Subject: Re: flat mapping vs identity mapping on ARM
Date: Thu, 22 Sep 2016 08:34:05 -0700	[thread overview]
Message-ID: <5A6D70A5-3A7C-417E-87D0-58F9E478ED21@apple.com> (raw)
In-Reply-To: <CAKv+Gu92SzouihE0cuMNNjrDQgo2-FeNcQBnCXQtyN=OmgsDBg@mail.gmail.com>


> On Sep 22, 2016, at 8:03 AM, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> 
> On 22 September 2016 at 15:30, valerij zaporogeci <vlrzprgts@gmail.com <mailto:vlrzprgts@gmail.com>> wrote:
>> In the ARM architecture, there is such a thing - "flat mapping", where
>> MMU stage 1 is disabled and the mapping done is 1:1 and attributes set
>> to the predefined values.
> 
> What do you mean by 'attributes set to the predefined values' ?
> 
>> Did I understand right, that this is NOT what UEFI means by "identity
>> mapping" with MMU enabled?

Identity mapping means the virtual address is the same as the physical address. 

For x86 IA64 (x86_64) you have to have paging enabled to enter long (64-bit) mode (the processor comes out of reset in 16-bit mode). For ARM you need the MMU to control cacheability.

For IA32 (i386) paging is not enabled and MTRR registers are used to control cacheability. For Itainium Processors paging is not enabled and bit 63 is used to disable cacheability.

Thanks,

Andrew Fish

>> And in the latter case there is need to
>> create all those page tables and stuff, setting 1:1 mapping between VA
>> and PA? If so, why to do that? Why "flat mapping" isn't what UEFI
>> would love to see as its mapping regime?
> 
> On ARM, you need to enable the MMU in order to enable the Dcache.
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org <mailto:edk2-devel@lists.01.org>
> https://lists.01.org/mailman/listinfo/edk2-devel <https://lists.01.org/mailman/listinfo/edk2-devel>


  parent reply	other threads:[~2016-09-22 15:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-22 14:30 flat mapping vs identity mapping on ARM valerij zaporogeci
2016-09-22 15:03 ` Ard Biesheuvel
2016-09-22 15:19   ` valerij zaporogeci
2016-09-22 15:22     ` Ard Biesheuvel
2016-09-22 15:23       ` Ard Biesheuvel
2016-09-22 15:34   ` Andrew Fish [this message]
2016-09-22 19:14     ` valerij zaporogeci

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-list 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=5A6D70A5-3A7C-417E-87D0-58F9E478ED21@apple.com \
    --to=devel@edk2.groups.io \
    /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