summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/sparc64/include/utrap.h25
-rw-r--r--sys/sparc64/sparc64/exception.S16
2 files changed, 37 insertions, 4 deletions
diff --git a/sys/sparc64/include/utrap.h b/sys/sparc64/include/utrap.h
index b738eff..8ce7925 100644
--- a/sys/sparc64/include/utrap.h
+++ b/sys/sparc64/include/utrap.h
@@ -64,14 +64,37 @@
#define UT_TRAP_INSTRUCTION_31 33
#define UT_MAX 34
+#define ST_SUNOS_SYSCALL 0
#define ST_BREAKPOINT 1
#define ST_DIVISION_BY_ZERO 2
+#define ST_FLUSH_WINDOWS 3 /* XXX implement! */
#define ST_CLEAN_WINDOW 4
#define ST_RANGE_CHECK 5
#define ST_FIX_ALIGNMENT 6
#define ST_INTEGER_OVERFLOW 7
-#define ST_SYSCALL 9
+/* 8 is 32-bit ABI syscall (old solaris syscall?) */
+#define ST_BSD_SYSCALL 9
#define ST_FP_RESTORE 10
+/* 11-15 are available */
+/* 16 is linux 32 bit syscall (but supposed to be reserved, grr) */
+/* 17 is old linux 64 bit syscall (but supposed to be reserved, grr) */
+/* 16-31 are reserved for user applications (utraps) */
+#define ST_GETCC 32 /* XXX implement! */
+#define ST_SETCC 33 /* XXX implement! */
+#define ST_GETPSR 34 /* XXX implement! */
+#define ST_SETPSR 35 /* XXX implement! */
+/* 36-63 are available */
+#define ST_SOLARIS_SYSCALL 64
+#define ST_SYSCALL 65
+#define ST_SYSCALL32 66
+/* 67 is reserved to OS source licensee */
+/* 68 is return from deferred trap (not supported) */
+/* 69-95 are reserved to SPARC international */
+/* 96-108 are available */
+/* 109 is linux 64 bit syscall */
+/* 110 is linux 64 bit getcontext (?) */
+/* 111 is linux 64 bit setcontext (?) */
+/* 112-255 are available */
#define UTH_NOCHANGE (-1)
diff --git a/sys/sparc64/sparc64/exception.S b/sys/sparc64/sparc64/exception.S
index 2b453f2..cc8cba9 100644
--- a/sys/sparc64/sparc64/exception.S
+++ b/sys/sparc64/sparc64/exception.S
@@ -55,6 +55,7 @@
* $FreeBSD$
*/
+#include "opt_compat.h"
#include "opt_ddb.h"
#include <machine/asi.h>
@@ -1878,7 +1879,7 @@ tl0_fill_1_n:
tl0_fill_1_n ! 0xc4
tl0_fill_bad 14 ! 0xc8-0xff
tl0_soft:
- tl0_reserved 1 ! 0x100
+ tl0_gen T_SYSCALL ! 0x100
tl0_gen T_BREAKPOINT ! 0x101
tl0_gen T_DIVISION_BY_ZERO ! 0x102
tl0_reserved 1 ! 0x103
@@ -1886,8 +1887,12 @@ tl0_soft:
tl0_gen T_RANGE_CHECK ! 0x105
tl0_gen T_FIX_ALIGNMENT ! 0x106
tl0_gen T_INTEGER_OVERFLOW ! 0x107
- tl0_reserved 1 ! 0x108
+ tl0_gen T_SYSCALL ! 0x108
+#ifdef COMPAT_FREEBSD4
tl0_syscall ! 0x109
+#else
+ tl0_gen T_SYSCALL ! 0x109
+#endif
tl0_fp_restore ! 0x10a
tl0_reserved 5 ! 0x10b-0x10f
tl0_gen T_TRAP_INSTRUCTION_16 ! 0x110
@@ -1906,7 +1911,12 @@ tl0_soft:
tl0_gen T_TRAP_INSTRUCTION_29 ! 0x11d
tl0_gen T_TRAP_INSTRUCTION_30 ! 0x11e
tl0_gen T_TRAP_INSTRUCTION_31 ! 0x11f
- tl0_reserved 224 ! 0x120-0x1ff
+ tl0_reserved 32 ! 0x120-0x13f
+ tl0_gen T_SYSCALL ! 0x140
+ tl0_syscall ! 0x141
+ tl0_gen T_SYSCALL ! 0x142
+ tl0_gen T_SYSCALL ! 0x143
+ tl0_reserved 188 ! 0x144-0x1ff
tl1_base:
tl1_reserved 8 ! 0x200-0x207
OpenPOWER on IntegriCloud