summaryrefslogtreecommitdiff
path: root/c
diff options
context:
space:
mode:
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/sparc/leon3/make/custom/leon3.cfg3
-rw-r--r--c/src/lib/libcpu/sparc/reg_win/window.S10
-rw-r--r--c/src/lib/libcpu/sparc/syscall/syscall.S2
3 files changed, 13 insertions, 2 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/make/custom/leon3.cfg b/c/src/lib/libbsp/sparc/leon3/make/custom/leon3.cfg
index 48f125b551..14cd029513 100644
--- a/c/src/lib/libbsp/sparc/leon3/make/custom/leon3.cfg
+++ b/c/src/lib/libbsp/sparc/leon3/make/custom/leon3.cfg
@@ -11,7 +11,8 @@ RTEMS_CPU_MODEL=leon3
# This contains the compiler options necessary to select the CPU model
# and (hopefully) optimize for it.
-CPU_CFLAGS = -mcpu=cypress -msoft-float -mtune=ut699 -mfix-ut700 -mfix-gr712rc
+CPU_CFLAGS = -mcpu=cypress -msoft-float -mtune=ut699 -mfix-ut700 -mfix-gr712rc -D__FIX_LEON3FT_TN0018
+# -D__FIX_LEON3FT_TN0018 enables kernel work around for GRLIB-TN-0018 errata
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -g
diff --git a/c/src/lib/libcpu/sparc/reg_win/window.S b/c/src/lib/libcpu/sparc/reg_win/window.S
index fa327ec28a..3c3443f850 100644
--- a/c/src/lib/libcpu/sparc/reg_win/window.S
+++ b/c/src/lib/libcpu/sparc/reg_win/window.S
@@ -24,6 +24,8 @@
*/
#include <rtems/asm.h>
+#include <rtems/score/grlib-tn-0018.h>
+
.seg "text"
/*
@@ -254,12 +256,18 @@ done_flushing:
* Restore the global registers we used
*/
- mov %l3, %g1
mov %l4, %g2
mov %l5, %g3
+
+ TN0018_WAIT_IFLUSH %l4,%l5
+ TN0018_WRITE_PSR %g1
+
+ mov %l3, %g1
mov %l6, %g4
mov %l7, %g5
+ TN0018_FIX %l4,%l5
+
jmpl %l2, %g0
rett %l2 + 4
diff --git a/c/src/lib/libcpu/sparc/syscall/syscall.S b/c/src/lib/libcpu/sparc/syscall/syscall.S
index aa69f45d48..029027e7c9 100644
--- a/c/src/lib/libcpu/sparc/syscall/syscall.S
+++ b/c/src/lib/libcpu/sparc/syscall/syscall.S
@@ -63,6 +63,7 @@ SYM(sparc_disable_interrupts):
mov SYS_irqdis, %g1
ta 0
+ nop
retl
nop
@@ -72,6 +73,7 @@ SYM(sparc_enable_interrupts):
mov SYS_irqen, %g1
ta 0
+ nop
retl
nop