public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/6] armv8/mmu: Clean up TCR programming
Date: Thu, 2 Jul 2015 23:06:02 +0200	[thread overview]
Message-ID: <20150702230602.1286fe67@lilith> (raw)
In-Reply-To: <550C6346.4010009@arm.com>

Hello Marc,

On Fri, 20 Mar 2015 18:13:26 +0000, Marc Zyngier <marc.zyngier@arm.com>
wrote:
> On 20/03/15 11:47, Thierry Reding wrote:
> > From: Thierry Reding <treding@nvidia.com>
> > 
> > Use the inner shareable attribute for memory, which makes more sense
> > considering that this code is called when caches are being enabled.
> > 
> > While at it, fix the values for the shareability attribute field to
> > match the documentation.
> > 
> > Cc: Albert Aribaud <albert.u.boot@aribaud.net>
> > Cc: Marc Zyngier <marc.zyngier@arm.com>
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > ---
> >  arch/arm/include/asm/armv8/mmu.h | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/arch/arm/include/asm/armv8/mmu.h b/arch/arm/include/asm/armv8/mmu.h
> > index 4b9cb5296572..6d42f5533a74 100644
> > --- a/arch/arm/include/asm/armv8/mmu.h
> > +++ b/arch/arm/include/asm/armv8/mmu.h
> > @@ -93,8 +93,8 @@
> >  #define TCR_ORGN_WBNWA		(3 << 10)
> >  #define TCR_ORGN_MASK		(3 << 10)
> >  #define TCR_SHARED_NON		(0 << 12)
> > -#define TCR_SHARED_OUTER	(1 << 12)
> > -#define TCR_SHARED_INNER	(2 << 12)
> > +#define TCR_SHARED_OUTER	(2 << 12)
> > +#define TCR_SHARED_INNER	(3 << 12)
> >  #define TCR_TG0_4K		(0 << 14)
> >  #define TCR_TG0_64K		(1 << 14)
> >  #define TCR_TG0_16K		(2 << 14)
> > @@ -102,9 +102,9 @@
> >  #define TCR_EL2_IPS_BITS	(3 << 16)	/* 42 bits physical address */
> >  #define TCR_EL3_IPS_BITS	(3 << 16)	/* 42 bits physical address */
> >  
> > -/* PTWs cacheable, inner/outer WBWA and non-shareable */
> > +/* PTWs cacheable, inner/outer WBWA and inner shareable */
> >  #define TCR_FLAGS		(TCR_TG0_64K |		\
> > -				TCR_SHARED_NON |	\
> > +				TCR_SHARED_INNER |	\
> >  				TCR_ORGN_WBWA |		\
> >  				TCR_IRGN_WBWA |		\
> >  				TCR_T0SZ(VA_BITS))
> > 
> 
> Acked-by: Marc Zyngier <marc.zyngier@arm.com>
> 
> One thing though: the architecture doesn't mandate 64k pages to be
> implemented by the HW. Actually, it doesn't mandate any particular page
> size, you just have to implement at least one (4k, 16k or 64k).
> 
> It would be good to test if 64k pages are implemented (by testing
> ID_AA64MMFR0_EL1) and not try to enable caches if not, possibly
> displaying a warning for the unsuspecting u-boot hacker.

So Marc, is this a request for a change, or is the patch applicable as
it is?

Amicalement,
-- 
Albert.

  reply	other threads:[~2015-07-02 21:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-20 11:47 [U-Boot] [PATCH 1/6] armv8/cache: Fix page table creation Thierry Reding
2015-03-20 11:47 ` [U-Boot] [PATCH 2/6] armv8: Implement CONFIG_SYS_MALLOC_F_LEN support Thierry Reding
2015-03-24 14:47   ` FengHua
2015-03-20 11:47 ` [U-Boot] [PATCH 3/6] armv8/mmu: Clean up TCR programming Thierry Reding
2015-03-20 18:13   ` Marc Zyngier
2015-07-02 21:06     ` Albert ARIBAUD [this message]
2015-07-03  7:28       ` Marc Zyngier
2015-03-24 14:55   ` FengHua
2015-03-20 11:47 ` [U-Boot] [PATCH 4/6] armv8/mmu: Set bits marked RES1 in TCR Thierry Reding
2015-03-20 18:16   ` Marc Zyngier
2015-03-24 15:10   ` FengHua
2015-03-20 11:47 ` [U-Boot] [PATCH 5/6] armv8/gic: Fix GIC v2 initialization Thierry Reding
2015-03-20 18:03   ` Marc Zyngier
2015-03-20 11:47 ` [U-Boot] [PATCH 6/6] armv8: Allow SoCs to override the generic timer Thierry Reding
2015-03-20 18:18   ` Marc Zyngier
2015-03-24 14:59   ` FengHua
2015-03-20 18:06 ` [U-Boot] [PATCH 1/6] armv8/cache: Fix page table creation Marc Zyngier
2015-03-24 14:52 ` FengHua
2015-04-16 11:24 ` Albert ARIBAUD
2015-06-03 15:09   ` Albert ARIBAUD

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=20150702230602.1286fe67@lilith \
    --to=albert.u.boot@aribaud.net \
    --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