mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: lst@pengutronix.de, Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] ARM: errata: document errata workarounds
Date: Tue, 10 Sep 2024 11:03:36 +0200	[thread overview]
Message-ID: <20240910090336.89871-1-a.fatoum@pengutronix.de> (raw)

Give all errata workaround functions a kernel-doc listing the title of
the erratum and what CPUs it affects for documentation purposes.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/include/asm/errata.h | 83 +++++++++++++++++++++++++++++++++++
 1 file changed, 83 insertions(+)

diff --git a/arch/arm/include/asm/errata.h b/arch/arm/include/asm/errata.h
index 9bb0e650c7ee..58b38be7e4d9 100644
--- a/arch/arm/include/asm/errata.h
+++ b/arch/arm/include/asm/errata.h
@@ -1,6 +1,17 @@
 /* SPDX-License-Identifier: GPL-2.0-or-later */
 /* SPDX-FileCopyrightText: 2014 Lucas Stach, Pengutronix */
 
+/**
+ * enable_arm_errata_709718_war() - Workaround ARM erratum 709718
+ *
+ * Enables workaround for "Load and Store operations on the shared device
+ * memory regions may not complete in program order".
+ *
+ * This is described as part of the i.MX51 errata at
+ * https://www.nxp.com/docs/en/errata/IMX51CE.pdf
+ *
+ * Affects Cortex-A8 as found in i.MX51
+ */
 static inline void enable_arm_errata_709718_war(void)
 {
 	__asm__ __volatile__ (
@@ -13,6 +24,14 @@ static inline void enable_arm_errata_709718_war(void)
 	);
 }
 
+/**
+ * enable_arm_errata_716044_war() - Workaround ARM erratum 716044
+ *
+ * Enables workaround for "Under very rare circumstances, an uncacheable
+ * load multiple instruction might cause a deadlock"
+ *
+ * Affects Cortex-A9 revisions before r2p0
+ */
 static inline void enable_arm_errata_716044_war(void)
 {
 	__asm__ __volatile__ (
@@ -22,6 +41,13 @@ static inline void enable_arm_errata_716044_war(void)
 	);
 }
 
+/**
+ * enable_arm_errata_742230_war() - Workaround ARM erratum 742230
+ *
+ * Enables workaround for "DMB operation may be faulty"
+ *
+ * Affects Cortex-A9 revisions before r2p3
+ */
 static inline void enable_arm_errata_742230_war(void)
 {
 	__asm__ __volatile__ (
@@ -31,6 +57,14 @@ static inline void enable_arm_errata_742230_war(void)
 	);
 }
 
+/**
+ * enable_arm_errata_743622_war() - Workaround for ARM erratum 743622
+ *
+ * Enables workaround for "Faulty hazard checking in the Store Buffer may
+ * lead to data corruption"
+ *
+ * Affects Cortex-A9 revisions before r3p0
+ */
 static inline void enable_arm_errata_743622_war(void)
 {
 	__asm__ __volatile__ (
@@ -40,6 +74,15 @@ static inline void enable_arm_errata_743622_war(void)
 	);
 }
 
+/** enable_arm_errata_751472_war() - Workaround for ARM erratum 751472
+ *
+ * Workaround for "Interrupted ICIALLUIS may prevent completion of
+ * broadcasted operation"
+ *
+ * Affects Cortex-A9 revisions before r3p0
+ *
+ * NOTE: Must be first set in secure mode
+ */
 static inline void enable_arm_errata_751472_war(void)
 {
 	__asm__ __volatile__ (
@@ -49,6 +92,15 @@ static inline void enable_arm_errata_751472_war(void)
 	);
 }
 
+/** enable_arm_errata_761320_war() - Workaround for ARM erratum 761320
+ *
+ * Enables workaround for "Full cache line writes to the same memory region
+ * from at least two processors might deadlock processor"
+ *
+ * Affects Cortex-A9 revisions before r4p0
+ *
+ * NOTE: Must be first set in secure mode
+ */
 static inline void enable_arm_errata_761320_war(void)
 {
 	__asm__ __volatile__ (
@@ -58,6 +110,16 @@ static inline void enable_arm_errata_761320_war(void)
 	);
 }
 
+/**
+ * enable_arm_errata_794072_war() - Workaround for ARM erratum 794072
+ *
+ * Enables workaround for "A short loop including a DMB instruction might
+ * cause a denial of service"
+ *
+ * Affects Cortex-A9 all revisions
+ *
+ * NOTE: Must be first set in secure mode
+ */
 static inline void enable_arm_errata_794072_war(void)
 {
 	__asm__ __volatile__ (
@@ -67,6 +129,16 @@ static inline void enable_arm_errata_794072_war(void)
 	);
 }
 
+/**
+ * enable_arm_errata_845369_war() - Workaround for ARM erratum 845369
+ *
+ * Enables workaround for "Under very rare timing circumstances, transitioning
+ * into streaming mode might create a data corruption"
+ *
+ * Affects Cortex-A9 all revisions
+ *
+ * NOTE: Must be first set in secure mode
+ */
 static inline void enable_arm_errata_845369_war(void)
 {
 	__asm__ __volatile__ (
@@ -76,6 +148,17 @@ static inline void enable_arm_errata_845369_war(void)
 	);
 }
 
+/**
+ * enable_arm_errata_cortexa8_enable_ibe() - Enable Invalidate BTB Enable bit
+ * workaround
+ *
+ * Enables use of BPIALL for hardening the branch predictor as workaround
+ * for CVE 2017-5715 "Spectre v2".
+ *
+ * Affects Cortex-A8 all revisions.
+ *
+ * NOTE: Must be first set in secure mode
+ */
 static inline void enable_arm_errata_cortexa8_enable_ibe(void)
 {
 	__asm__ __volatile__ (
-- 
2.39.2




             reply	other threads:[~2024-09-10  9:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-10  9:03 Ahmad Fatoum [this message]
2024-09-11  8:36 ` Sascha Hauer

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=20240910090336.89871-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=lst@pengutronix.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