From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 1/2] Errata/ARM57: Add basic constructs to handle and apply A57 specific erratas
Date: Thu, 22 Jan 2015 09:30:33 -0600 [thread overview]
Message-ID: <1421940633.4961.243.camel@freescale.com> (raw)
In-Reply-To: <1421939562-28607-1-git-send-email-bhupesh.sharma@freescale.com>
On Thu, 2015-01-22 at 20:42 +0530, Bhupesh Sharma wrote:
> +WEAK(apply_core_errata)
> +
> + mov x29, lr /* Save LR */
> + /* For now, we support Cortex-A57 specific errata only */
> +
> + /* Check if we are running on a Cortex-A57 core */
> + branch_if_a57_core x0, apply_a57_core_errata
> + b 0f
Instead of branching forward here, have the a57 code branch back at the
end.
> /*
> + * Branch if current processor is a Cortex-A57 core.
> + */
> +.macro branch_if_a57_core, xreg, a57_label
> + mrs \xreg, midr_el1
> + lsr \xreg, \xreg, #4
> + and \xreg, \xreg, #0x00000FFF
> + cmp \xreg, #0xD07 /* Cortex-A57 MPCore processor. */
> + b.eq \a57_label
> +.endm
> +
> +/*
> + * Branch if current processor is a Cortex-A53 core.
> + */
> +.macro branch_if_a53_core, xreg, a53_label
> + mrs \xreg, midr_el1
> + lsr \xreg, \xreg, #4
> + cmp \xreg, #0xD03 /* Cortex-A53 MPCore processor. */
> + b.eq \a53_label
> +.endm
Why do you AND with 0xfff for a57 but not a53?
Where else do you expect to use these macros?
-Scott
prev parent reply other threads:[~2015-01-22 15:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-22 15:12 [U-Boot] [PATCH v3 1/2] Errata/ARM57: Add basic constructs to handle and apply A57 specific erratas Bhupesh Sharma
2015-01-22 15:12 ` [U-Boot] [PATCH v3 2/2] configs/ls2085a: Add support for Cortex-A57 erratas Bhupesh Sharma
2015-01-22 15:30 ` Scott Wood [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-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=1421940633.4961.243.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox