summaryrefslogtreecommitdiffstats
path: root/sys/ia64/ia32
Commit message (Collapse)AuthorAgeFilesLines
* Rework the PCPU_* (MD) interface:attilio2007-06-041-2/+2
| | | | | | | | | | | | - Rename PCPU_LAZY_INC into PCPU_INC - Add the PCPU_ADD interface which just does an add on the pcpu member given a specific value. Note that for most architectures PCPU_INC and PCPU_ADD are not safe. This is a point that needs some discussions/work in the next days. Reviewed by: alc, bde Approved by: jeff (mentor)
* Include freebsd32_signal.h now that signal-related definitions aremarcel2006-10-061-0/+1
| | | | | | moved there. Found by: ia64 tinderbox.
* Add audit hooks for ppc, ia64 system call paths.rwatson2006-09-161-0/+4
| | | | | | Reviewed by: marcel (ia64) Obtained from: TrustedBSD Project MFC after: 3 days
* Retire SYF_ARGMASK and remove both SYF_MPSAFE and SYF_ARGMASK. sy_narg isjhb2006-07-281-1/+1
| | | | now back to just being an argument count.
* Now that all system calls are MPSAFE, retire the SYF_MPSAFE flag used tojhb2006-07-281-13/+0
| | | | | | | | | mark system calls as being MPSAFE: - Stop conditionally acquiring Giant around system call invocations. - Remove all of the 'M' prefixes from the master system call files. - Remove support for the 'M' prefix from the script that generates the syscall-related files from the master system call files. - Don't explicitly set SYF_MPSAFE when registering nfssvc.
* Unify the checking for lock misbehavior in the various syscall()jhb2006-07-271-7/+13
| | | | | | | | | | | | | | implementations and adjust some of the checks while I'm here: - Add a new check to make sure we don't return from a syscall in a critical section. - Add a new explicit check before userret() to make sure we don't return with any locks held. The advantage here is that we can include the syscall number and name in syscall() whereas that info is not available in userret(). - Drop the mtx_assert()'s of sched_lock and Giant. They are replaced by the more general checks just added. MFC after: 2 weeks
* Add KTR_SYSC tracing to the syscall() implementations that didn't have itjhb2006-07-271-0/+8
| | | | | | yet. MFC after: 1 week
* Add missing ptrace(2) system-call stops to various syscall()jhb2006-07-271-0/+5
| | | | | | implementations. MFC after: 1 week
* Simplify system time accounting for profiling.phk2006-02-081-3/+2
| | | | | | | | | | Rename struct thread's td_sticks to td_pticks, we will need the other name for more appropriately named use shortly. Reduce it from uint64_t to u_int. Clear td_pticks whenever we enter the kernel instead of recording its value as reference for userret(). Use the absolute value of td->pticks in userret() and eliminate third argument.
* 1. Change prototype of trapsignal and sendsig to use ksiginfo_t *, mostdavidxu2005-10-142-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Implement 32 bit getcontext/setcontext/swapcontext on amd64. I've addedpeter2005-09-271-0/+21
| | | | | stubs for ia64 to keep it compiling. These are used by 32 bit apps such as gdb.
* Move the ia32_sigcode structure from ia32_sigtramp.c to ia32_signal.c.marcel2005-09-102-44/+19
| | | | It's a bit excessive to have it in a file of its own.
* Remove redundant $FreeBSD$marcel2005-09-101-2/+0
|
* Jumbo-commit to enhance 32 bit application support on 64 bit kernels.peter2005-06-301-0/+82
| | | | | | | | | | | | | | | | | | | | | | | | This is good enough to be able to run a RELENG_4 gdb binary against a RELENG_4 application, along with various other tools (eg: 4.x gcore). We use this at work. ia32_reg.[ch]: handle the 32 bit register file format, used by ptrace, procfs and core dumps. procfs_*regs.c: vary the format of proc/XXX/*regs depending on the client and target application. procfs_map.c: Don't print a 64 bit value to 32 bit consumers, or their sscanf fails. They expect an unsigned long. imgact_elf.c: produce a valid 32 bit coredump for 32 bit apps. sys_process.c: handle 32 bit consumers debugging 32 bit targets. Note that 64 bit consumers can still debug 32 bit targets. IA64 has got stubs for ia32_reg.c. Known limitations: a 5.x/6.x gdb uses get/setcontext(), which isn't implemented in the 32/64 wrapper yet. We also make a tiny patch to gdb pacify it over conflicting formats of ld-elf.so.1. Approved by: re
* Use PCPU_LAZY_INC() for cnt.v_{intr,trap,syscalls} rather than atomicjhb2005-04-121-2/+2
| | | | operations in some places and simple non-per CPU math in others.
* /* -> /*- for copyright notices, minor format tweaks as necessaryimp2005-01-061-1/+1
|
* ...And fix WITNESS builds: declare syscallnames.marcel2004-09-261-0/+4
|
* Fix INVARIANTS build: Include <machine/cpu.h>.marcel2004-09-261-0/+1
|
* Move the IA-32 trap handling from trap() to ia32_trap(). Move themarcel2004-09-251-0/+288
| | | | | ia32_syscall() function along with it to ia32_trap.c. When COMPAT_IA32 is not defined, we'll raise SIGEMT instead.
* Add missing #include "opt_compat.h" so that the compatability functionpeter2003-12-181-0/+2
| | | | | freebsd4_freebsd32_sigreturn() is defined when expected. This should unbreak the tinderbox. Sorry.
* Assimilate ia64 back into the fold with the common freebsd32/ia32 code.peter2003-12-1112-3758/+77
| | | | | | | | 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.
* Regen.jhb2003-11-073-12/+12
|
* Sync with global syscalls.master. ptrace(), dup(), pipe(), ktrace(),jhb2003-11-071-9/+9
| | | | | ia32_sigaltstack(), sysarch(), issetugid(), utrace(), and ia32_sigaction() are MP safe.
* Add sysentvec->sv_fixlimits() hook so that we can catch cases on 64 bitpeter2003-09-252-2/+4
| | | | | | | | | | | | | | | | | | | | | 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.
* Regen.jhb2003-08-213-5/+5
|
* Swap sigaction/sigreturn since they are in the wrong order.jhb2003-08-211-2/+2
| | | | Noticed indirectly by: peter
* Fixup the ELF branding information to point to the new home of rtld.gordon2003-08-172-2/+2
|
* Revamp of the syscall path, exception and context handling. Themarcel2003-05-163-113/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | prime objectives are: o Implement a syscall path based on the epc inststruction (see sys/ia64/ia64/syscall.s). o Revisit the places were we need to save and restore registers and define those contexts in terms of the register sets (see sys/ia64/include/_regset.h). Secundairy objectives: o Remove the requirement to use contigmalloc for kernel stacks. o Better handling of the high FP registers for SMP systems. o Switch to the new cpu_switch() and cpu_throw() semantics. o Add a good unwinder to reconstruct contexts for the rare cases we need to (see sys/contrib/ia64/libuwx) Many files are affected by this change. Functionally it boils down to: o The EPC syscall doesn't preserve registers it does not need to preserve and places the arguments differently on the stack. This affects libc and truss. o The address of the kernel page directory (kptdir) had to be unstaticized for use by the nested TLB fault handler. The name has been changed to ia64_kptdir to avoid conflicts. The renaming affects libkvm. o The trapframe only contains the special registers and the scratch registers. For syscalls using the EPC syscall path no scratch registers are saved. This affects all places where the trapframe is accessed. Most notably the unaligned access handler, the signal delivery code and the debugger. o Context switching only partly saves the special registers and the preserved registers. This affects cpu_switch() and triggered the move to the new semantics, which additionally affects cpu_throw(). o The high FP registers are either in the PCB or on some CPU. context switching for them is done lazily. This affects trap(). o The mcontext has room for all registers, but not all of them have to be defined in all cases. This mostly affects signal delivery code now. The *context syscalls are as of yet still unimplemented. Many details went into the removal of the requirement to use contigmalloc for kernel stacks. The details are mostly CPU specific and limited to exception_save() and exception_restore(). The few places where we create, destroy or switch stacks were mostly simplified by not having to construct physical addresses and additionally saving the virtual addresses for later use. Besides more efficient context saving and restoring, which of course yields a noticable speedup, this also fixes the dreaded SMP bootup problem as a side-effect. The details of which are still not fully understood. This change includes all the necessary backward compatibility code to have it handle older userland binaries that use the break instruction for syscalls. Support for break-based syscalls has been pessimized in favor of a clean implementation. Due to the overall better performance of the kernel, this will still be notived as an improvement if it's noticed at all. Approved by: re@ (jhb)
* Regen.jhb2003-04-253-34/+3
|
* Oops, the thr_* and jail_attach() syscall entries should be NOPROTO ratherjhb2003-04-251-7/+7
| | | | than STD.
* Regen.jhb2003-04-243-4/+58
|
* Fix the thr_create() entry by adding a trailing \. Also, sync up thejhb2003-04-241-4/+4
| | | | MP safe flag for thr_* with the main table.
* - Replace inline implementations of sigprocmask() with calls tojhb2003-04-221-66/+33
| | | | | | | kern_sigprocmask() in the various binary compatibility emulators. - Replace calls to sigsuspend(), sigaltstack(), sigaction(), and sigprocmask() that used the stackgap with calls to the corresponding kern_sig*() functions instead without using the stackgap.
* o In struct prison, add an allprison linked list of prisons (protectedmike2003-04-091-0/+1
| | | | | | | | | | | | | | | by allprison_mtx), a unique prison/jail identifier field, two path fields (pr_path for reporting and pr_root vnode instance) to store the chroot() point of each jail. o Add jail_attach(2) to allow a process to bind to an existing jail. o Add change_root() to perform the chroot operation on a specified vnode. o Generalize change_dir() to accept a vnode, and move namei() calls to callers of change_dir(). o Add a new sysctl (security.jail.list) which is a group of struct xprison instances that represent a snapshot of active jails. Reviewed by: rwatson, tjr
* - Add thr and umtx system calls.jeff2003-04-011-0/+8
|
* - Add a placeholder for sigwaitjeff2003-03-311-0/+1
|
* Back out M_* changes, per decision of the TRB.imp2003-02-191-5/+5
| | | | Approved by: trb
* Remove #include <sys/dkstat.h>phk2003-02-161-1/+0
|
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-5/+5
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Synchronize to kern/syscalls.master:1.139.rwatson2002-12-291-0/+4
| | | | Obtained from: TrustedBSD Project
* Regen: swapoffmarcel2002-12-163-4/+5
|
* Change swapoff from MNOPROTO to UNIMPL. The former doesn't work.marcel2002-12-161-1/+1
|
* This is David Schultz's swapoff code which I am finally able to commit.dillon2002-12-151-0/+1
| | | | | | | This should be considered highly experimental for the moment. Submitted by: David Schultz <dschultz@uclink.Berkeley.EDU> MFC after: 3 weeks
* SCARGS removal take II.alfred2002-12-142-133/+128
|
* Backout removal SCARGS, the code freeze is only "selectively" over.alfred2002-12-132-128/+133
|
* Remove SCARGS.alfred2002-12-132-133/+128
| | | | Reviewed by: md5
* Regenerate after adding syscalls.deischen2002-11-163-4/+13
|
* Add *context() syscalls to ia64 32-bit compatability table as requesteddeischen2002-11-161-0/+3
| | | | in kern/syscalls.master.
* Sync to src/sys/kern/syscalls.masterrwatson2002-11-021-1/+1
|
* Stake a claim on 418 (__xstat), 419 (__xfstat), 420 (__xlstat)peter2002-10-191-0/+3
|
OpenPOWER on IntegriCloud