summaryrefslogtreecommitdiffstats
path: root/sys/compat/ia32
Commit message (Collapse)AuthorAgeFilesLines
...
* Change (yet again, sorry!) the path of the 32 bit ld-elf.so.1.peter2004-03-211-2/+2
|
* Add a note about the landmine in the middle of struct ia32_sigframe.peter2004-02-211-0/+1
|
* DOH!!! Fix signals for freebsd-4.x/i386 binaries. The ucontext haspeter2004-02-211-1/+1
| | | | different alignments due to the sse fxsave dump area.
* Locking for the per-process resource limits structure.jhb2004-02-041-40/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - struct plimit includes a mutex to protect a reference count. The plimit structure is treated similarly to struct ucred in that is is always copy on write, so having a reference to a structure is sufficient to read from it without needing a further lock. - The proc lock protects the p_limit pointer and must be held while reading limits from a process to keep the limit structure from changing out from under you while reading from it. - Various global limits that are ints are not protected by a lock since int writes are atomic on all the archs we support and thus a lock wouldn't buy us anything. - All accesses to individual resource limits from a process are abstracted behind a simple lim_rlimit(), lim_max(), and lim_cur() API that return either an rlimit, or the current or max individual limit of the specified resource from a process. - dosetrlimit() was renamed to kern_setrlimit() to match existing style of other similar syscall helper functions. - The alpha OSF/1 compat layer no longer calls getrlimit() and setrlimit() (it didn't used the stackgap when it should have) but uses lim_rlimit() and kern_setrlimit() instead. - The svr4 compat no longer uses the stackgap for resource limits calls, but uses lim_rlimit() and kern_setrlimit() instead. - The ibcs2 compat no longer uses the stackgap for resource limits. It also no longer uses the stackgap for accessing sysctl's for the ibcs2_sysconf() syscall but uses kernel_sysctl() instead. As a result, ibcs2_sysconf() no longer needs Giant. - The p_rlimit macro no longer exists. Submitted by: mtm (mostly, I only did a few cleanups and catchups) Tested on: i386 Compiled on: alpha, amd64
* Add an additional field to the elf brandinfo structure to supportpeter2003-12-231-5/+18
| | | | | quicker exec-time replacement of the elf interpreter on an emulation environment where an entire /compat/* tree isn't really warranted.
* Move the ia32_sigtramp.S file back under amd64/. This interfaces closelypeter2003-12-111-88/+0
| | | | | | with the sendsig code in the MD area. It is not safe to assume that all the register conventions will be the same. Also, the way of producing 32 bit code (.code32 directives) in this file is amd64 specific.
* Assimilate ia64 back into the fold with the common freebsd32/ia32 code.peter2003-12-112-2/+13
| | | | | | | | The split-up code is derived from the ia64 code originally. Note that I have only compile-tested this, not actually run-tested it. The ia64 side of the force is missing some significant chunks of signal delivery code.
* Use the correct syscall table limitpeter2003-12-101-1/+2
|
* Move a MD 32 bit binary support routine into the MD areas. exec_setregspeter2003-11-082-45/+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.
* Remove some duplicated comments that refer to npx. XXX The setregspeter2003-11-081-11/+0
| | | | function is actually MD (not MI) though..
* Point the description of the fpu data in the context structures topeter2003-11-081-1/+1
| | | | | i386/include/npx.h instead of the host's machine/npx.h (which might not exist)
* Oops, forgot to save these in the editor. Add CTASSERTS for signal andpeter2003-10-301-0/+10
| | | | context related things.
* Add CTASSERT()'s to check that the sizes of our replicas of the 32 bitpeter2003-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.
* Add sysentvec->sv_fixlimits() hook so that we can catch cases on 64 bitpeter2003-09-252-1/+68
| | | | | | | | | | | | | | | | | | | | | systems where the data/stack/etc limits are too big for a 32 bit process. Move the 5 or so identical instances of ELF_RTLD_ADDR() into imgact_elf.c. Supply an ia32_fixlimits function. Export the clip/default values to sysctl under the compat.ia32 heirarchy. Have mmap(0, ...) respect the current p->p_limits[RLIMIT_DATA].rlim_max value rather than the sysctl tweakable variable. This allows mmap to place mappings at sensible locations when limits have been reduced. Have the imgact_elf.c ld-elf.so.1 placement algorithm use the same method as mmap(0, ...) now does. Note that we cannot remove all references to the sysctl tweakable maxdsiz etc variables because /etc/login.conf specifies a datasize of 'unlimited'. And that causes exec etc to fail since it can no longer find space to mmap things.
* Switch to using the emulator in the common compat area.peter2003-08-231-8/+9
| | | | Still work-in-progress.
* Initial sweep at dividing up the generic 32bit-on-64bit kernel supportpeter2003-08-224-55/+8
| | | | | | from the ia32 specific stuff. Some of this still needs to move to the MI freebsd32 area, and some needs to move to the MD area. This is still work-in-progress.
* Use __FBSDID().obrien2003-07-252-3/+5
| | | | Brought to you by: a boring talk at Ottawa Linux Symposium
* Deal with the user VM space expanding. 32 bit applications do not likepeter2003-05-232-5/+5
| | | | | | | | | having their stack at the 512GB mark. Give 4GB of user VM space for 32 bit apps. Note that this is significantly more than on i386 which gives only about 2.9GB of user VM to a process (1GB for kernel, plus page table pages which eat user VM space). Approved by: re (blanket)
* Collect the nastiness for preserving the kernel MSR_GSBASE around thepeter2003-05-151-8/+1
| | | | | | | | | | load_gs() calls into a single place that is less likely to go wrong. Eliminate the per-process context switching of MSR_GSBASE, because it should be constant for a single cpu. Instead, save/restore it during the loading of the new %gs selector for the new process. Approved by: re (amd64/* blanket)
* Add BASIC i386 binary support for the amd64 kernel. This is largelypeter2003-05-145-153/+349
| | | | | | | | | | | | | | | | | | | | | | 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)
* SCARGS removal take II.alfred2002-12-141-5/+0
|
* Backout removal SCARGS, the code freeze is only "selectively" over.alfred2002-12-131-0/+5
|
* Remove SCARGS.alfred2002-12-131-5/+0
| | | | Reviewed by: md5
* Added fields for VM_MIN_ADDRESS, PS_STRINGS and stack protections tojake2002-09-011-4/+7
| | | | | | sysentvec. Initialized all fields of all sysentvecs, which will allow them to be used instead of constants in more places. Provided stack fixup routines for emulations that previously used the default.
* Infrastructure tweaks to allow having both an Elf32 and an Elf64 executablepeter2002-07-202-0/+459
handler in the kernel at the same time. Also, allow for the exec_new_vmspace() code to build a different sized vmspace depending on the executable environment. This is a big help for execing i386 binaries on ia64. The ELF exec code grows the ability to map partial pages when there is a page size difference, eg: emulating 4K pages on 8K or 16K hardware pages. Flesh out the i386 emulation support for ia64. At this point, the only binary that I know of that fails is cvsup, because the cvsup runtime tries to execute code in pages not marked executable. Obtained from: dfr (mostly, many tweaks from me).
OpenPOWER on IntegriCloud