On 23/11/2021 18:13, Joel Sherrill wrote:
On Tue, Nov 23, 2021 at 9:34 AM Sebastian Huber
<sebastian.hu...@embedded-brains.de> wrote:

Affected components are the GR712RC, UT699, UT699E, UT700, and
LEON3FT-RTAX.  Strictly, the workaround is only necessary if the MMU is
enabled.  Use __FIX_LEON3FT_B2BST to enable the workaround.  This is not
100% appropriate, but the best thing we can use to enable the
workaround.

Close #4551.
---
  cpukit/score/cpu/sparc/cpu_asm.S | 10 ++++++++++
  1 file changed, 10 insertions(+)

diff --git a/cpukit/score/cpu/sparc/cpu_asm.S b/cpukit/score/cpu/sparc/cpu_asm.S
index 45d1495af7..04b2b0119f 100644
--- a/cpukit/score/cpu/sparc/cpu_asm.S
+++ b/cpukit/score/cpu/sparc/cpu_asm.S
@@ -190,6 +190,16 @@ done_flushing:
          ! Try to update the is executing indicator of the heir context
          mov     1, %g1

+#if defined(__FIX_LEON3FT_B2BST)
+        /*
+         * This is a workaround for GRLIB-TN-0011.  Affected components are the
+         * GR712RC, UT699, UT699E, UT700, and LEON3FT-RTAX.  Strictly, the
+         * workaround is only necessary if the MMU is enabled.  Using the
+         * __FIX_LEON3FT_B2BST is not 100% appropriate, but the best thing we
+         * can use to enable the workaround.
+         */
+.align 16
+#endif

Is there an assumption on the fill pattern here? If the "move 1, %g1" is
executed, it looks like the code will fall into the alignment fill
area. If those
are not guaranteed to be nops, then what instruction(s) are executed?

It probably is a nop but that should be checked and in the comment.

It is filled with nops.


And this is in an SMP conditional section but I am unsure if all of those
are multi-core models.  What does this errata actually cover? Is it that
swap needs to be aligned? And it is just a coincidence that this is only
in an SMP build of RTEMS?

I'm ok with it but the comments and implicit assumptions need to be
enhanced.

This is just the recommended workaround for the errata. The errata is mentioned in the comment. I don't think we should duplicate the errata description in the code.


  .Ltry_update_is_executing:

          swap    [%o1 + SPARC_CONTEXT_CONTROL_IS_EXECUTING_OFFSET], %g1
--
2.31.1

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to