All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/2] Errata/ARM57: Add basic constructs to handle and apply A57 specific erratas
Date: Thu, 15 Jan 2015 14:40:56 -0600	[thread overview]
Message-ID: <1421354456.4961.156.camel@freescale.com> (raw)
In-Reply-To: <1421243215-4277-1-git-send-email-bhupesh.sharma@freescale.com>

On Wed, 2015-01-14 at 19:16 +0530, Bhupesh Sharma wrote:
> This patch adds basic constructs in the ARMv8 u-boot code
> to handle and apply Cortex-A57 specific erratas.
> 
> As and example, the framework showcases how erratas 833069, 826974
> and 828024 can be handled and applied.
> 
> Later on this framework can be extended to include other
> erratas.
> 
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@freescale.com>
> ---
> Changes from v1:
> 	- Addressed York's comment about x29 usage and calling the
> 	  core errata fxup function before the lowlevel_init function
> 	  is called.
> 
>  arch/arm/cpu/armv8/start.S   |   51 ++++++++++++++++++++++++++++++++++++++++++
>  arch/arm/include/asm/macro.h |   20 +++++++++++++++++
>  2 files changed, 71 insertions(+)
> 
> diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
> index 4b11aa4..df532f9 100644
> --- a/arch/arm/cpu/armv8/start.S
> +++ b/arch/arm/cpu/armv8/start.S
> @@ -67,6 +67,9 @@ reset:
>  	msr	cpacr_el1, x0			/* Enable FP/SIMD */
>  0:
>  
> +	/* Apply ARM core specific erratas */
> +	bl	apply_core_errata
> +
>  	/*
>  	 * Cache/BPB/TLB Invalidate
>  	 * i-cache is invalidated before enabled in icache_enable()
> @@ -97,6 +100,54 @@ master_cpu:
>  
>  /*-----------------------------------------------------------------------*/
>  
> +WEAK(apply_core_errata)
> +
> +	/* For now, we support Cortex-A57 specific errata only */
> +
> +	/* Check if we are running on a Cortex-A57 core */
> +	branch_if_a57_core x0, 1f
> +	b	2f
> +1:
> +	bl	apply_a57_core_errata
> +
> +2:

This is awkward.  How often are you expecting to use this macro?  Why
not just open-code it?  Or at least make it "branch_if_not_a57_core".
Or fix your lr problem by doing "branch_if_a57_core
apply_a57_core_errata" and having it branch back rather than "ret".

But I think opencoding would be best.  Just define symbols for the
actual core IDs.

> +WEAK(apply_a57_core_errata)

Why is this weak?

-Scott

  parent reply	other threads:[~2015-01-15 20:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-14 13:46 [U-Boot] [PATCH v2 1/2] Errata/ARM57: Add basic constructs to handle and apply A57 specific erratas Bhupesh Sharma
2015-01-14 13:46 ` [U-Boot] [PATCH v2 2/2] configs/ls2085a: Add support for Cortex-A57 erratas Bhupesh Sharma
2015-01-14 16:14 ` [U-Boot] [PATCH v2 1/2] Errata/ARM57: Add basic constructs to handle and apply A57 specific erratas York Sun
2015-01-15  6:10   ` bhupesh.sharma at freescale.com
2015-01-15 19:05     ` Mark Rutland
2015-01-15 19:15       ` bhupesh.sharma at freescale.com
2015-01-15 19:15       ` York Sun
2015-01-15 20:40 ` Scott Wood [this message]
2015-01-16 13:51   ` Arnab Basu

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=1421354456.4961.156.camel@freescale.com \
    --to=scottwood@freescale.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.