public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: "Pierre-Clément Tosi" <ptosi@google.com>
Cc: Fabio Estevam <festevam@gmail.com>,
	u-boot@lists.denx.de, Tom Rini <trini@konsulko.com>,
	Stefano Babic <sbabic@denx.de>
Subject: Re: [PATCH] arm64: Fix map_range() not splitting mapped blocks
Date: Tue, 26 Mar 2024 09:21:52 +0000	[thread overview]
Message-ID: <87bk71s5zj.wl-maz@kernel.org> (raw)
In-Reply-To: <yltha7mziq43ke7kas433zlvxamri2p7h2p7oos3x4dexk2oct@gfhscvngsjcw>

On Tue, 19 Mar 2024 12:39:26 +0000,
Pierre-Clément Tosi <ptosi@google.com> wrote:
> 
> Hi Fabio,
> 
> On Tue, Mar 19, 2024 at 09:13:12AM -0300, Fabio Estevam wrote:
> > Hi Pierre,
> > 
> > On Tue, Mar 19, 2024 at 8:39 AM Pierre-Clément Tosi <ptosi@google.com> wrote:
> > 
> > > This means gd->arch.tlb_addr pointing to the live PTs during setup_pgtables().
> > >
> > > In arch/arm/cpu/armv8, setup_all_pgtables() runs with SCTLR_ELx.M unset.
> > >
> > > In arch/arm/cpu/armv8/fsl-layerscape, setup_pgtables() is called twice:
> > >
> > >  - early_mmu_setup() calls it with SCTLR_ELx.M unset;
> > >  - final_mmu_setup() overwrites gd->arch.tlb_addr before calling it iff
> > >    CFG_SYS_MEM_RESERVE_SECURE is defined i.e. if CONFIG_SYS_SOC="fsl-layerscape"
> > >    so that <asm/arch-fsl-layerscape/config.h> gets auto-included through
> > >    <include/config.h>.
> > >
> > > So can CONFIG_FSL_LAYERSCAPE be set while CONFIG_SYS_SOC != "fsl-layerscape"?
> > 
> > No, this cannot happen.
> 
> Thanks for confirming.
> 
> For clarity, it might then make sense to drop that #ifdef in final_mmu_setup().
> 
> > Only the following Layerscape SoCs select CONFIG_FSL_LAYERSCAPE
> > in arch/arm/cpu/armv8/fsl-layerscape/Kconfig:
> > LS1012A, LS1028A, LS1043A, LS1046A, LS1088A, LS2080A, LX2162A and LX2160A
> > 
> > I saw the original boot problem with the i.MX8QX.
> > 
> > The i.MX8QX is part of the i.MX family, not the Layerscape family.
> 
> Sure.
> 
> To be clear, the concern here was that split_block() doesn't perform what the
> CPU architecture requires when modifying page tables that the MMU is using and
> the question therefore was: can setup_pgtables() be called on such live PTs?
> 
> For most AArch64 U-Boot ports (including the i.MX family), the answer is trivial
> because they use the arch code i.e. setup_all_pgtables(). However, as
> fsl-layerscape re-implements mmu_setup(), it had to be looked at separately,
> hence my question, which you answered above.

Thanks for the details.

With that,

Reviewed-by: Marc Zyngier <maz@kernel.org>

	M.

-- 
Without deviation from the norm, progress is not possible.

  parent reply	other threads:[~2024-03-26  9:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18 19:35 [PATCH] arm64: Fix map_range() not splitting mapped blocks Pierre-Clément Tosi
2024-03-18 19:46 ` Fabio Estevam
2024-03-19  9:43 ` Marc Zyngier
2024-03-19 11:39   ` Pierre-Clément Tosi
2024-03-19 12:13     ` Fabio Estevam
2024-03-19 12:39       ` Pierre-Clément Tosi
2024-03-22 19:31         ` Fabio Estevam
2024-03-22 19:33           ` Fabio Estevam
2024-03-23 14:34             ` Tom Rini
2024-03-25 20:37               ` Hiago De Franco
2024-03-30 20:03                 ` Fabio Estevam
2024-04-10 13:31                   ` Fabio Estevam
2024-03-26  9:21         ` Marc Zyngier [this message]
2024-04-10 17:43 ` Tom Rini

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=87bk71s5zj.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=festevam@gmail.com \
    --cc=ptosi@google.com \
    --cc=sbabic@denx.de \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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