linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb@kernel.org>
To: Robin Murphy <robin.murphy@arm.com>
Cc: linux-efi <linux-efi@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>, Nicolas Pitre <nico@fluxnic.net>,
	Tony Lindgren <tony@atomide.com>, Marc Zyngier <maz@kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	Catalin Marinas <catalin.marinas@arm.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 0/4] ARM: decompressor: use by-VA cache maintenance for v7 cores
Date: Fri, 21 Feb 2020 16:54:38 +0100	[thread overview]
Message-ID: <CAKv+Gu-FGL3J9fuY3V4GTaqdLTVLfeErN1GPd5nWL4McjMj_Hg@mail.gmail.com> (raw)
In-Reply-To: <CAKv+Gu8g_fb-Xq3XcyZivG5405jypHnkBy6gnWMWy4Oz8763XA@mail.gmail.com>

On Fri, 21 Feb 2020 at 14:42, Ard Biesheuvel <ardb@kernel.org> wrote:
>
> On Fri, 21 Feb 2020 at 14:35, Robin Murphy <robin.murphy@arm.com> wrote:
> >
> > On 20/02/2020 6:08 pm, Ard Biesheuvel wrote:
> > > (+ Arnd)
> > >
> > > On Wed, 19 Feb 2020 at 10:43, Ard Biesheuvel <ardb@kernel.org> wrote:
> > >>
> > >> While making changes to the EFI stub startup code, I noticed that we are
> > >> still doing set/way maintenance on the caches when booting on v7 cores.
> > >> This works today on VMs by virtue of the fact that KVM traps set/way ops
> > >> and cleans the whole address space by VA on behalf of the guest, and on
> > >> most v7 hardware, the set/way ops are in fact sufficient when only one
> > >> core is running, as there usually is no system cache. But on systems
> > >> like SynQuacer, for which 32-bit firmware is available, the current cache
> > >> maintenance only pushes the data out to the L3 system cache, where it
> > >> is not visible to the CPU once it turns the MMU and caches off.
> > >>
> > >> So instead, switch to the by-VA cache maintenance that the architecture
> > >> requires for v7 and later (and ARM1176, as a side effect).
> > >>
> > >> Changes since v1:
> > >> - include the EFI patch that was sent out separately before (#1)
> > >> - split the preparatory work to pass the region to clean in r0/r1 in a EFI
> > >>    specific one and one for the decompressor - this way, the first two patches
> > >>    can go on a stable branch that is shared between the ARM tree and the EFI
> > >>    tree
> > >> - document the meaning of the values in r0/r1 upon entry to cache_clean_flush
> > >> - take care to treat the region end address as exclusive
> > >> - switch to clean+invalidate to align with the other implementations
> > >> - drop some code that manages the stack pointer value before calling
> > >>    cache_clean_flush(), which is no longer necessary
> > >> - take care to clean the entire region that is covered by the relocated zImage
> > >>    if it needs to relocate itself before decompressing
> > >>
> > >> https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/log/?h=arm32-efi-cache-ops
> > >>
> > >
> > > Adding my own data point here: with these patches, I can reproducibly
> > > boot on the SynQuacer platform (24x Cortex-A53 + GICv3 + L3 system
> > > cache) until the point where /init is loaded, after which it hangs
> > > (see below), whereas without them, it always crashes early with weird,
> > > unreproducible errors, if it even makes it far enough through the
> > > decompressor to produce any earlycon output.
> > >
> > > There is some other weird stuff going on, but this is unlikely to be
> > > related to cache maintenance:
> > > - multiple occurrences of
> > >     OF: translation of DMA address(0) to CPU address failed node(...)
> >
> > FWIW that implies a "dma-ranges" property in the wrong place in the DT -
> > if you copied the now-gone Juno example of placing one directly in the
> > root node, that was bogus, sorry.
> >
>
> OK, so where should it be instead? Are you saying it is now required
> to have a /soc or /smb node that contains all the device nodes?
>

Never mind - I'll just drop "dma-ranges" from the root node entirely.

  reply	other threads:[~2020-02-21 15:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19  9:43 [PATCH v2 0/4] ARM: decompressor: use by-VA cache maintenance for v7 cores Ard Biesheuvel
2020-02-19  9:43 ` [PATCH v2 1/4] efi/arm: work around missing cache maintenance in decompressor handover Ard Biesheuvel
2020-02-19  9:43 ` [PATCH v2 2/4] efi/arm: pass start and end addresses to cache_clean_flush() Ard Biesheuvel
2020-02-19  9:43 ` [PATCH v2 3/4] ARM: decompressor: prepare cache_clean_flush for doing by-VA maintenance Ard Biesheuvel
2020-02-19  9:43 ` [PATCH v2 4/4] ARM: decompressor: switch to by-VA cache maintenance for v7 cores Ard Biesheuvel
2020-02-20 18:08 ` [PATCH v2 0/4] ARM: decompressor: use " Ard Biesheuvel
2020-02-21 13:35   ` Robin Murphy
2020-02-21 13:42     ` Ard Biesheuvel
2020-02-21 15:54       ` Ard Biesheuvel [this message]
2020-02-21 16:09       ` Robin Murphy
2020-02-22 23:38         ` Linus Walleij

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=CAKv+Gu-FGL3J9fuY3V4GTaqdLTVLfeErN1GPd5nWL4McjMj_Hg@mail.gmail.com \
    --to=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maz@kernel.org \
    --cc=nico@fluxnic.net \
    --cc=robin.murphy@arm.com \
    --cc=tony@atomide.com \
    /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).