summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/sigframe.h
Commit message (Collapse)AuthorAgeFilesLines
* Convert machine/elf.h, machine/frame.h, machine/sigframe.h,kib2013-02-201-43/+3
| | | | | | | | | | | | | | machine/signal.h and machine/ucontext.h into common x86 includes, copying from amd64 and merging with i386. Kernel-only compat definitions are kept in the i386/include/sigframe.h and i386/include/signal.h, to reduce amd64 kernel namespace pollution. The amd64 compat uses its own definitions so far. The _MACHINE_ELF_WANT_32BIT definition is to allow the sys/boot/userboot/userboot/elf32_freebsd.c to use i386 ELF definitions on the amd64 compile host. The same hack could be usefully abused by other code too.
* Commit MD parts of a loosely functional AMD64 port. This is based onpeter2003-05-011-67/+0
| | | | | | | | | | | | | | | | | | | | | | a heavily stripped down FreeBSD/i386 (brutally stripped down actually) to attempt to get a stable base to start from. There is a lot missing still. Worth noting: - The kernel runs at 1GB in order to cheat with the pmap code. pmap uses a variation of the PAE code in order to avoid having to worry about 4 levels of page tables yet. - It boots in 64 bit "long mode" with a tiny trampoline embedded in the i386 loader. This simplifies locore.s greatly. - There are still quite a few fragments of i386-specific code that have not been translated yet, and some that I cheated and wrote dumb C versions of (bcopy etc). - It has both int 0x80 for syscalls (but using registers for argument passing, as is native on the amd64 ABI), and the 'syscall' instruction for syscalls. int 0x80 preserves all registers, 'syscall' does not. - I have tried to minimize looking at the NetBSD code, except in a couple of places (eg: to find which register they use to replace the trashed %rcx register in the syscall instruction). As a result, there is not a lot of similarity. I did look at NetBSD a few times while debugging to get some ideas about what I might have done wrong in my first attempt.
* Split 4.x and 5.x signal handling so that we can keep 4.x signalpeter2002-10-251-0/+18
| | | | | | | | | | | | | | | | handling clean and functional as 5.x evolves. This allows some of the nasty bandaids in the 5.x codepaths to be unwound. Encapsulate 4.x signal handling under COMPAT_FREEBSD4 (there is an anti-foot-shooting measure in place, 5.x folks need this for a while) and finish encapsulating the older stuff under COMPAT_43. Since the ancient stuff is required on alpha (longjmp(3) passes a 'struct osigcontext *' to the current sigreturn(2), instead of the 'ucontext_t *' that sigreturn is supposed to take), add a compile time check to prevent foot shooting there too. Add uniform COMPAT_43 stubs for ia64/sparc64/powerpc. Tested on: i386, alpha, ia64. Compiled on sparc64 (a few days ago). Approved by: re
* Use struct __ucontext in prototypes and associated functions instead ofdeischen2002-02-171-1/+2
| | | | | | | | | | ucontext_t. Forward declare struct __ucontext in <sys/signal.h> and remove reliance on <sys/ucontext.h> being included. While I'm here, also hide osigcontext types from userland; suggested by bde. Namespace pollution noticed by: Kevin Day <toasty@shell.dragondata.com>
* style(9) the structure definitions.obrien2001-09-051-1/+1
|
* Fix type of sf_addr.marcel1999-12-041-2/+2
| | | | Pointed out by: bde
* Change the type of sf_addr in struct {o}sigframe from char* tomarcel1999-11-121-8/+9
| | | | | | | | register_t. Fix some style bugs and bitrotted comments. Submitted by: bde
* Simplification of the signal trampoline and other cleanups.marcel1999-10-071-2/+1
| | | | | | | | | | | | | | | o Remove unused defines from genassym.c that were needed by the trampoline. o Add load_gs_param function to support.s that catches a fault when %gs is loaded with an invalid descriptor. The function returns EFAULT in that case. o Remove struct trapframe from mcontext_t and replace it with the list of registers. o Modify sendsig and sigreturn accordingly. This commit contains a patch by bde. Reviewed by: luoqi, jdp
* Fix style bugs caused by using the wrong file to copy from. That onemarcel1999-10-031-4/+12
| | | | | | | gets fixed later on. Reinstate the mysterious 4th argument to signal handlers and add some comments on that.
* sigset_t change (part 3 of 5)marcel1999-09-291-0/+86
----------------------------- By introducing a new sigframe so that the signal handler operates on the new siginfo_t and on ucontext_t instead of sigcontext, we now need two version of sendsig and sigreturn. A flag in struct proc determines whether the process expects an old sigframe or a new sigframe. The signal trampoline handles which sigreturn to call. It does this by testing for a magic cookie in the frame. The alpha uses osigreturn to implement longjmp. This means that osigreturn is not only used for compatibility with existing binaries. To handle the new sigset_t, setjmp saves it in sc_reserved (see NOTE). the struct sigframe has been moved from frame.h to sigframe.h to handle the complex header dependencies that was caused by the new sigframe. NOTE: For the i386, the size of jmp_buf has been increased to hold the new sigset_t. On the alpha this has been prevented by using sc_reserved in sigcontext.
OpenPOWER on IntegriCloud