summaryrefslogtreecommitdiffstats
path: root/sys/sparc64/include/utrap.h
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2002-10-27 17:22:43 +0000
committerjake <jake@FreeBSD.org>2002-10-27 17:22:43 +0000
commit8dce82a882750733f55305198b3be26105268b20 (patch)
tree43c735614f46188321113505d00b7803fa39f4ce /sys/sparc64/include/utrap.h
parent37b3ac0423b87b7d831812bc3faecdeb2d29201f (diff)
downloadFreeBSD-src-8dce82a882750733f55305198b3be26105268b20.zip
FreeBSD-src-8dce82a882750733f55305198b3be26105268b20.tar.gz
Don peril sensitive sun glasses and change the default system call vector
for sparc64 from trap #9 to trap #65. This is one of the ABI "blessed" system call vectors and is different from any other system that we might want to emulate, making the emulation easier by reducing the number of code paths that need to be shared. Compatibility with old applications is provided with COMPAT_FREEBSD4. Add defines for a few special traps that we may need to implement for compatibility with 32bit applications, and add comments on which vectors are used for what in other systems, and which are available. Pass magic flags to trap() for deprecated or unimplemented system call vectors so they will deliver SIGSYS instead of SIGILL. This piggy backs nicely with the recent sigaction(2) system call number change, and provided the rules are followed for upgrading past it, this change should not be noticed.
Diffstat (limited to 'sys/sparc64/include/utrap.h')
-rw-r--r--sys/sparc64/include/utrap.h25
1 files changed, 24 insertions, 1 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)
OpenPOWER on IntegriCloud