aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/ia32/ia32_signal.h
Commit message (Collapse)AuthorAgeFilesLines
* Add support for executing the FreeBSD 1/i386 a.out binaries on amd64.Konstantin Belousov2011-04-011-4/+9
| | | | | | | | | | | | | | | | | | In particular: - implement compat shims for old stat(2) variants and ogetdirentries(2); - implement delivery of signals with ancient stack frame layout and corresponding sigreturn(2); - implement old getpagesize(2); - provide a user-mode trampoline and LDT call gate for lcall $7,$0; - port a.out image activator and connect it to the build as a module on amd64. The changes are hidden under COMPAT_43. MFC after: 1 month Notes: svn path=/head/; revision=220238
* Add include guards.Konstantin Belousov2010-11-231-0/+5
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=215741
* Add a forward declaration to silence a warning when compiling ia32_genassym.c.Bjoern A. Zeeb2010-04-031-0/+1
| | | | | | | | Reviewed by: kib MFC after: 3 days Notes: svn path=/head/; revision=206136
* Change the arguments of exec_setregs() so that it receives a pointerNathan Whitehorn2010-03-251-2/+2
| | | | | | | | | | | to the image_params struct instead of several members of that struct individually. This makes it easier to expand its arguments in the future without touching all platforms. Reviewed by: jhb Notes: svn path=/head/; revision=205642
* Add all segment registers for the amd64 CPU to struct reg and mcontext.Konstantin Belousov2009-04-011-1/+3
| | | | | | | | | | | | | | | | To keep these structures ABI-compatible, half the size of r_trapno, r_err, mc_trapno, mc_flags. Add fsbase and gsbase to mcontext on both amd64 and i386. Add flags to amd64 mcontext to indicate that it contains valid segments or bases. In collaboration with: pho Discussed with: peter Reviewed by: jhb Notes: svn path=/head/; revision=190616
* Move some declaration of 32-bit signal structures into fileDavid Xu2006-10-051-45/+5
| | | | | | | freebsd32-signal.h, implement sigtimedwait and sigwaitinfo system calls. Notes: svn path=/head/; revision=163018
* Catch up to the system siginfo changes. Use a union for the ia32 layoutPeter Wemm2005-12-061-2/+19
| | | | | | | | of siginfo just like the system one. There are now two fields to copy instead of one. Notes: svn path=/head/; revision=153180
* 1. Change prototype of trapsignal and sendsig to use ksiginfo_t *, mostDavid Xu2005-10-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | changes in MD code are trivial, before this change, trapsignal and sendsig use discrete parameters, now they uses member fields of ksiginfo_t structure. For sendsig, this change allows us to pass POSIX realtime signal value to user code. 2. Remove cpu_thread_siginfo, it is no longer needed because we now always generate ksiginfo_t data and feed it to libpthread. 3. Add p_sigqueue to proc structure to hold shared signals which were blocked by all threads in the proc. 4. Add td_sigqueue to thread structure to hold all signals delivered to thread. 5. i386 and amd64 now return POSIX standard si_code, other arches will be fixed. 6. In this sigqueue implementation, pending signal set is kept as before, an extra siginfo list holds additional siginfo_t data for signals. kernel code uses psignal() still behavior as before, it won't be failed even under memory pressure, only exception is when deleting a signal, we should call sigqueue_delete to remove signal from sigqueue but not SIGDELSET. Current there is no kernel code will deliver a signal with additional data, so kernel should be as stable as before, a ksiginfo can carry more information, for example, allow signal to be delivered but throw away siginfo data if memory is not enough. SIGKILL and SIGSTOP have fast path in sigqueue_add, because they can not be caught or masked. The sigqueue() syscall allows user code to queue a signal to target process, if resource is unavailable, EAGAIN will be returned as specification said. Just before thread exits, signal queue memory will be freed by sigqueue_flush. Current, all signals are allowed to be queued, not only realtime signals. Earlier patch reviewed by: jhb, deischen Tested on: i386, amd64 Notes: svn path=/head/; revision=151316
* Fix 32 bit signals on amd64. It turns out that I was sign extendingPeter Wemm2005-04-051-72/+72
| | | | | | | | | | | | | the register values coming back from sigreturn(2). Normally this wouldn't matter because the 32 bit environment would truncate the upper 32 bits and re-save the truncated values at the next trap. However, if we got a fast second signal and it was pending while we were returning from sigreturn(2) in the signal trampoline, we'd never have had a chance to truncate the bogus values in 32 bit mode, and the new sendsig would get an EFAULT when trying to write to the bogus user stack address. Notes: svn path=/head/; revision=144689
* Check in structure definitions for the FreeBSD-3.x signal syscall stuff.Peter Wemm2004-04-141-0/+43
| | | | | | | Nothing uses these yet, but I dont want to lose them. Notes: svn path=/head/; revision=128262
* Add a note about the landmine in the middle of struct ia32_sigframe.Peter Wemm2004-02-211-0/+1
| | | | Notes: svn path=/head/; revision=126091
* Move a MD 32 bit binary support routine into the MD areas. exec_setregsPeter Wemm2003-11-081-0/+2
| | | | | | | | | | is highly MD in an emulation environment since it operates on the host environment. Although the setregs functions are really for exec support rather than signals, they deal with the same sorts of context and include files. So I put it there rather than create yet another file. Notes: svn path=/head/; revision=122303
* Point the description of the fpu data in the context structures toPeter Wemm2003-11-081-1/+1
| | | | | | | | i386/include/npx.h instead of the host's machine/npx.h (which might not exist) Notes: svn path=/head/; revision=122277
* Add CTASSERT()'s to check that the sizes of our replicas of the 32 bitPeter Wemm2003-10-301-2/+0
| | | | | | | | | | | | | structures come out the right size. Fix the ones that broke. stat32 had some missing fields from the end and statfs32 was broken due to the strange definition of MNAMELEN (which is dependent on sizeof(long)) I'm not sure if this fixes any actual problems or not. Notes: svn path=/head/; revision=121719
* Add BASIC i386 binary support for the amd64 kernel. This is largelyPeter Wemm2003-05-141-0/+164
stolen from the ia64/ia32 code (indeed there was a repocopy), but I've redone the MD parts and added and fixed a few essential syscalls. It is sufficient to run i386 binaries like /bin/ls, /usr/bin/id (dynamic) and p4. The ia64 code has not implemented signal delivery, so I had to do that. Before you say it, yes, this does need to go in a common place. But we're in a freeze at the moment and I didn't want to risk breaking ia64. I will sort this out after the freeze so that the common code is in a common place. On the AMD64 side, this required adding segment selector context switch support and some other support infrastructure. The %fs/%gs etc code is hairy because loading %gs will clobber the kernel's current MSR_GSBASE setting. The segment selectors are not used by the kernel, so they're only changed at context switch time or when changing modes. This still needs to be optimized. Approved by: re (amd64/* blanket) Notes: svn path=/head/; revision=114987