From: "Ard Biesheuvel" <ardb@kernel.org>
To: Alexander Graf <graf@amazon.com>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>,
Leif Lindholm <leif@nuviainc.com>,
Sami Mujawar <sami.mujawar@arm.com>,
"Schander, Johanna 'Mimoja' Amelie" <mimoja@amazon.de>
Subject: Re: [PATCH] ArmVirtPkg/ArmVirtMemoryInitPeiLib: avoid redundant cache invalidation
Date: Fri, 25 Feb 2022 17:48:25 +0100 [thread overview]
Message-ID: <CAMj1kXFe_TJpfZFZKmpJ2bKnqY85Ye7dgE4oraWNkqTXpLGBeQ@mail.gmail.com> (raw)
In-Reply-To: <4ae599f2-e987-66e8-2c8e-47c851d8b7c7@amazon.com>
On Mon, 31 Jan 2022 at 14:21, Alexander Graf <graf@amazon.com> wrote:
>
>
> On 29.01.22 16:13, Ard Biesheuvel wrote:
> > Alex reports that the cache invalidation performed by
> > ArmVirtMemoryInitPeiLib takes a non-negligible amount of time at boot.
> > This cache invalidation used to be necessary to avoid inconsistencies
> > between the CPU's cached and uncached views of the permanent PEI memory
> > region, given that the PEI phase is where the MMU gets enabled.
> >
> > The only allocations done from permanent PEI memory with the MMU off are
> > pages used for page tables, and since commit 748fea6279ef
> > ("ArmPkg/ArmMmuLib AARCH64: invalidate page tables before populating
> > them"), each of those is invalidated in the caches explicitly, for
> > reasons described in the patch's commit log. All other allocations done
> > in PEI are either from temporary PEI memory, which includes the stack,
> > or from permanent PEI memory but after the MMU has been enabled.
> >
> > This means that the cache invalidation in ArmVirtMemoryInitPeiLib is no
> > longer necessary, and can simply be dropped.
> >
> > Cc: Alexander Graf <agraf@csgraf.de>
> > Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
>
>
> Reviewed-by: Alexander Graf <graf@amazon.com>
>
> Also, feel free to add
>
> Reported-by: Alexander Graf <graf@amazon.com>
>
Merged as #2547
Thanks,
prev parent reply other threads:[~2022-02-25 16:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-29 15:13 [PATCH] ArmVirtPkg/ArmVirtMemoryInitPeiLib: avoid redundant cache invalidation Ard Biesheuvel
2022-01-31 12:22 ` Leif Lindholm
2022-01-31 13:21 ` Alexander Graf
2022-02-25 16:48 ` Ard Biesheuvel [this message]
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=CAMj1kXFe_TJpfZFZKmpJ2bKnqY85Ye7dgE4oraWNkqTXpLGBeQ@mail.gmail.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