1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00

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.
This commit is contained in:
Jake Burkholder 2002-10-27 17:22:43 +00:00
parent 1a5424b137
commit 1bc796d774
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=106050
2 changed files with 37 additions and 4 deletions

View File

@ -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)

View File

@ -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