From: Igor Grinberg <grinberg@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] omap3: Variant and revision checks for ARM Cortex-A8 errata workarounds
Date: Mon, 23 Feb 2015 13:09:09 +0200 [thread overview]
Message-ID: <54EB0A55.4010100@compulab.co.il> (raw)
In-Reply-To: <1424623367-9446-1-git-send-email-contact@paulk.fr>
Hi Paul,
On 02/22/15 18:42, Paul Kocialkowski wrote:
> Not every version and revision of the Cortex-A8 ARM core requires the same
> errata workarounds. In addition, enabling those requires to have similar
> workarounds enabled in the kernel or it will cause numerous segmentation faults.
>
> This enables those workarounds when they are needed, according to what is done
> in Linux.
Conceptually, I'm fine with the patch, but I did not look down into the
erratas and how it should be handled...
>
> Follow-up to the discussion from July 2013:
> http://lists.denx.de/pipermail/u-boot/2013-July/158377.html
You've missed the s-o-b.
> ---
> arch/arm/cpu/armv7/omap3/board.c | 27 +++++++++++++++++++++------
> 1 file changed, 21 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/cpu/armv7/omap3/board.c b/arch/arm/cpu/armv7/omap3/board.c
> index 90d6ae7..a87dd2a 100644
> --- a/arch/arm/cpu/armv7/omap3/board.c
> +++ b/arch/arm/cpu/armv7/omap3/board.c
> @@ -431,14 +431,29 @@ static void omap3_update_aux_cr_secure(u32 set_bits, u32 clear_bits)
>
> static void omap3_setup_aux_cr(void)
> {
> - /* Workaround for Cortex-A8 errata: #454179 #430973
> - * Set "IBE" bit
> - * Set "Disable Branch Size Mispredicts" bit
> - * Workaround for erratum #621766
> + u32 id, revision, variant;
> + u32 bits = 0;
> +
> + asm volatile ("mrc p15, 0, %0, c0, c0, 0" : "=r" (id));
> +
> + variant = (id & 0xf00000) >> 20;
> + revision = id & 0x0f;
> +
> + /* Workaround for Cortex-A8 erratum: #454179 #430973
While on this, I would also fix the multi-line comment...
> + * Set IBE bit
> + * Set Disable Branch Size Mispredicts (DBSM) bit
> + */
> + if (variant < 2)
> + bits |= (1 << 6) | (1 << 7);
> +
> + /* Workaround for Cortex-A8 erratum #621766
Also here.
> * Enable L1NEON bit
> - * ACR |= (IBE | DBSM | L1NEON) => ACR |= 0xE0
> */
> - omap3_update_aux_cr_secure(0xE0, 0);
> + if (variant == 2 && revision == 0)
> + bits |= (1 << 5);
> +
> + if (bits != 0)
> + omap3_update_aux_cr_secure(bits, 0);
> }
>
> #ifndef CONFIG_SYS_L2CACHE_OFF
>
--
Regards,
Igor.
next prev parent reply other threads:[~2015-02-23 11:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-22 11:36 [U-Boot] [PATCH] omap3: ARM Cortex-A8 errata workarounds config option Paul Kocialkowski
2015-02-22 12:06 ` Igor Grinberg
2015-02-22 15:45 ` Paul Kocialkowski
2015-02-22 15:55 ` Paul Kocialkowski
2015-02-22 16:02 ` Paul Kocialkowski
2015-02-22 16:42 ` [U-Boot] [PATCH v2] omap3: Variant and revision checks for ARM Cortex-A8 errata workarounds Paul Kocialkowski
2015-02-23 11:09 ` Igor Grinberg [this message]
2015-02-23 15:07 ` Paul Kocialkowski
2015-02-23 19:16 ` [U-Boot] [PATCH] " Paul Kocialkowski
2015-02-23 22:21 ` Tom Rini
2015-02-23 22:43 ` Nishanth Menon
2015-02-24 12:02 ` Paul Kocialkowski
2015-02-24 15:22 ` Nishanth Menon
2015-02-24 16:09 ` Paul Kocialkowski
2015-02-24 23:02 ` Nishanth Menon
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=54EB0A55.4010100@compulab.co.il \
--to=grinberg@compulab.co.il \
--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