summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/sparc
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-12-02 22:47:38 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-12-02 22:47:38 +0000
commite1a06d1baea5f994b64cf1a9021ce1e40c04c7ef (patch)
tree0a9884ffeb308da8d1c59465ea5ea6dd8b719c3d /cpukit/score/cpu/sparc
parentminor changes to eliminate warnings from C++ compilers per user suggesstions. (diff)
downloadrtems-e1a06d1baea5f994b64cf1a9021ce1e40c04c7ef.tar.bz2
Changes to reflect new revision of erc32 per Jiri Gaisler's suggestions.
This is current as of sis 2.6.
Diffstat (limited to 'cpukit/score/cpu/sparc')
-rw-r--r--cpukit/score/cpu/sparc/asm.h10
-rw-r--r--cpukit/score/cpu/sparc/cpu.c5
-rw-r--r--cpukit/score/cpu/sparc/rtems/asm.h10
3 files changed, 25 insertions, 0 deletions
diff --git a/cpukit/score/cpu/sparc/asm.h b/cpukit/score/cpu/sparc/asm.h
index a3d62416b8..4f425de956 100644
--- a/cpukit/score/cpu/sparc/asm.h
+++ b/cpukit/score/cpu/sparc/asm.h
@@ -105,6 +105,16 @@
jmp %l4+%lo(_handler); \
mov _vector, %l3
+/*
+ * Used for the reset trap for ERC32 to avoid a supervisor instruction
+ */
+
+#define RTRAP(_vector, _handler) \
+ mov %g0, %l0 ; \
+ sethi %hi(_handler), %l4 ; \
+ jmp %l4+%lo(_handler); \
+ mov _vector, %l3
+
#endif
/* end of include file */
diff --git a/cpukit/score/cpu/sparc/cpu.c b/cpukit/score/cpu/sparc/cpu.c
index 23a93f176e..54344192c8 100644
--- a/cpukit/score/cpu/sparc/cpu.c
+++ b/cpukit/score/cpu/sparc/cpu.c
@@ -65,6 +65,8 @@ void _CPU_Initialize(
)
{
void *pointer;
+
+#ifndef NO_TABLE_MOVE
unsigned32 trap_table_start;
unsigned32 tbr_value;
CPU_Trap_table_entry *old_tbr;
@@ -77,6 +79,7 @@ void _CPU_Initialize(
* and overflow handlers. It is the responsibility of the BSP to provide
* install these in the initial trap table.
*/
+
trap_table_start = (unsigned32) &_CPU_Trap_Table_area;
if (trap_table_start & (SPARC_TRAP_TABLE_ALIGNMENT-1))
@@ -93,6 +96,8 @@ void _CPU_Initialize(
sparc_set_tbr( trap_table_start );
+#endif
+
/*
* This seems to be the most appropriate way to obtain an initial
* FP context on the SPARC. The NULL fp context is copied it to
diff --git a/cpukit/score/cpu/sparc/rtems/asm.h b/cpukit/score/cpu/sparc/rtems/asm.h
index a3d62416b8..4f425de956 100644
--- a/cpukit/score/cpu/sparc/rtems/asm.h
+++ b/cpukit/score/cpu/sparc/rtems/asm.h
@@ -105,6 +105,16 @@
jmp %l4+%lo(_handler); \
mov _vector, %l3
+/*
+ * Used for the reset trap for ERC32 to avoid a supervisor instruction
+ */
+
+#define RTRAP(_vector, _handler) \
+ mov %g0, %l0 ; \
+ sethi %hi(_handler), %l4 ; \
+ jmp %l4+%lo(_handler); \
+ mov _vector, %l3
+
#endif
/* end of include file */