aboutsummaryrefslogtreecommitdiff
path: root/sys/alpha/linux/linux_sysvec.c
Commit message (Collapse)AuthorAgeFilesLines
...
* sigset_t change (part 4 of 5)Marcel Moolenaar1999-09-291-46/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ----------------------------- The compatibility code and/or emulators have been updated: iBCS2 now mostly uses the older syscalls. SVR4 now properly handles all signals. This has been achieved by using the new sigset_t throughout the emulator. The Linuxulator has been severely updated. Internally the new Linux sigset_t is made the default. These are then mapped to and from the new FreeBSD sigset_t. Also, rt_sigsuspend has been implemented in the Linuxulator. Implementing this syscall basicly caused all this sigset_t changing in the first place and the syscall has been used throughout the change as a means for testing. It basicly is too much work to undo the implementation so that it can later be added again. A special note on the use of sv_sigtbl and sv_sigsize in struct sysentvec: Every signal larger than sv_sigsize is not translated and is passed on to the signal handler unmodified. Signals in the range 1 upto and including sv_sigsize are translated. The rationale is that only the system defined signals need to be translated. The emulators also have been updated so that the translation tables are only indexed for valid (system defined) signals. This change also fixes the translation bug already in the SVR4 emulator. Notes: svn path=/head/; revision=51793
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Tweak include ordering so sys/systm.h is before sys/buf.h to keep buf.h'sPeter Wemm1999-06-281-2/+2
| | | | | | | inlines happy. Notes: svn path=/head/; revision=48303
* Enable vmspace sharing on SMP. Major changes are,Luoqi Chen1999-04-281-4/+6
| | | | | | | | | | | | | | | | | | | | - %fs register is added to trapframe and saved/restored upon kernel entry/exit. - Per-cpu pages are no longer mapped at the same virtual address. - Each cpu now has a separate gdt selector table. A new segment selector is added to point to per-cpu pages, per-cpu global variables are now accessed through this new selector (%fs). The selectors in gdt table are rearranged for cache line optimization. - fask_vfork is now on as default for both UP and SMP. - Some aio code cleanup. Reviewed by: Alan Cox <alc@cs.rice.edu> John Dyson <dyson@iquest.net> Julian Elischer <julian@whistel.com> Bruce Evans <bde@zeta.org.au> David Greenman <dg@root.com> Notes: svn path=/head/; revision=46129
* unifdef -DVM_STACK - it's been on for a while for x86 and was checkedPeter Wemm1999-04-191-5/+1
| | | | | | | and appeared to be working for the Alpha some time ago. Notes: svn path=/head/; revision=45821
* Added call to elf_brand_inuse() to prevent you from cutting your ownMark Newton1999-02-041-3/+11
| | | | | | | legs out from under you. Notes: svn path=/head/; revision=43620
* Minor cleanup; no more references to LKM's.Peter Wemm1999-01-171-4/+1
| | | | Notes: svn path=/head/; revision=42766
* Add (but don't activate) code for a special VM option to makeJulian Elischer1999-01-061-20/+3
| | | | | | | | | | | | | | | | downward growing stacks more general. Add (but don't activate) code to use the new stack facility when running threads, (specifically the linux threads support). This allows people to use both linux compiled linuxthreads, and also the native FreeBSD linux-threads port. The code is conditional on VM_STACK. Not using this will produce the old heavily tested system. Submitted by: Richard Seaman <dick@tar.com> Notes: svn path=/head/; revision=42360
* Make it compile again.Søren Schmidt1998-12-191-5/+5
| | | | | | | | | I have no idea if the new stuff works though. Broken by: Julian Notes: svn path=/head/; revision=41942
* Reviewed by: Luoqi Chen, Jordan HubbardJulian Elischer1998-12-191-1/+22
| | | | | | | | | | | | | | | Submitted by: "Richard Seaman, Jr." <lists@tar.com> Obtained from: linux :-) Code to allow Linux Threads to run under FreeBSD. By default not enabled This code is dependent on the conditional COMPAT_LINUX_THREADS (suggested by Garret) This is not yet a 'real' option but will be within some number of hours. Notes: svn path=/head/; revision=41931
* Removed the cast to a pointer in the definition of PS_STRINGS andBruce Evans1998-12-161-2/+2
| | | | | | | | | | adjusted related casts to match (only in the kernel in this commit). The pointer was only wanted in one place in kern_exec.c. Applications should use the kern.ps_strings sysctl instead of PS_STRINGS, so they shouldn't notice this change. Notes: svn path=/head/; revision=41871
* Added 3 new errno values, requred by various standards: EOVERFLOW,Dmitrij Tejblum1998-12-141-5/+5
| | | | | | | | | | ECANCELED, EILSEQ. Fixed ibcs2 and especially linux EIDRM and ENOMSG errno mapping. Reviewed by: Dan Nelson <dnelson@emsphone.com> Notes: svn path=/head/; revision=41796
* Finished updating module event handlers to be compatible withBruce Evans1998-11-151-8/+2
| | | | | | | modeventhand_t. Notes: svn path=/head/; revision=41173
* *gulp*. Jordan specifically OK'ed this..Peter Wemm1998-10-161-17/+36
| | | | | | | | | | | This is the bulk of the support for doing kld modules. Two linker_sets were replaced by SYSINIT()'s. VFS's and exec handlers are self registered. kld is now a superset of lkm. I have converted most of them, they will follow as a seperate commit as samples. This all still works as a static a.out kernel using LKM's. Notes: svn path=/head/; revision=40435
* Unregister the glibc2 brand at module unload time.Alexander Langer1998-10-111-5/+19
| | | | | | | | | | | | Change the ELF registration/unregistration scheme to be less error prone. Adding a new brand requires a single addition to linux_brandlist instead of modifying linux_load(), linux_unload(), and linux_elf_init(). Approved by: jkh Reviewed by: msmith Notes: svn path=/head/; revision=40237
* Make async I/O on a socket work.John Fieber1998-10-051-4/+4
| | | | | | | | Although the current Sybase license does not permit running under emulation, FreeBSD 3.0 is now "Sybase Ready" should the license change. Notes: svn path=/head/; revision=39978
* Add support for glibc consumers using the new ld-linux.so.2 linker.Mike Smith1998-09-171-2/+10
| | | | | | | I can't say this was the most inspired fix, but it matches the design OK. Notes: svn path=/head/; revision=39437
* Add provisions for variant core dump file formats, depending on theJohn Polstra1998-09-141-3/+6
| | | | | | | | | | | | | | object format of the executable being dumped. This is the first step toward producing ELF core dumps in the proper format. I will commit the code to generate the ELF core dumps Real Soon Now. In the meantime, ELF executables won't dump core at all. That is probably no less useful than dumping a.out-style core dumps as they have done until now. Submitted by: Alex <garbanzo@hooked.net> (with very minor changes by me) Notes: svn path=/head/; revision=39154
* Use [u]intptr_t instead of [u_]long for casts between pointers andBruce Evans1998-08-161-4/+4
| | | | | | | integers. Don't forget to cast to (void *) as well. Notes: svn path=/head/; revision=38354
* Fixed print format errors.Bruce Evans1998-07-291-4/+5
| | | | Notes: svn path=/head/; revision=37950
* This commit fixes various 64bit portability problems required forDoug Rabson1998-06-071-12/+12
| | | | | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time. Notes: svn path=/head/; revision=36735
* Unbotch whitespace and change switch with two cases to if.Eivind Eklund1998-05-071-12/+9
| | | | | | | Noticed by: bde Notes: svn path=/head/; revision=35820
* Translate T_PROTFLT to SIGSEGV instead of SIGBUS when running underEivind Eklund1998-04-281-1/+26
| | | | | | | | | | | | Linux emulation. This make Allegro Common Lisp 4.3 work under FreeBSD! Submitted by: Fred Gilham <gilham@csl.sri.com> Commented on by: bde, dg, msmith, tg Hoping he got everything right: eivind Notes: svn path=/head/; revision=35496
* Added EIDRM & ENOMSG to errno translation table.Søren Schmidt1998-04-131-2/+2
| | | | Notes: svn path=/head/; revision=35178
* Staticized.Bruce Evans1998-02-131-2/+2
| | | | Notes: svn path=/head/; revision=33313
* De-staticize enough to make all the LKMs work again. Add comments whereEivind Eklund1998-02-111-2/+2
| | | | | | | deemed relevant. Notes: svn path=/head/; revision=33233
* Staticize.Eivind Eklund1998-02-091-10/+16
| | | | Notes: svn path=/head/; revision=33181
* Back out DIAGNOSTIC changes.Eivind Eklund1998-02-061-3/+1
| | | | Notes: svn path=/head/; revision=33134
* Turn DIAGNOSTIC into a new-style option.Eivind Eklund1998-02-041-1/+3
| | | | Notes: svn path=/head/; revision=33108
* Make COMPAT_43 and COMPAT_SUNOS new-style options.Eivind Eklund1997-12-161-2/+6
| | | | Notes: svn path=/head/; revision=31778
* Move the "retval" (3rd) parameter from all syscall functions and putPoul-Henning Kamp1997-11-061-3/+2
| | | | | | | | | | | | | | | it in struct proc instead. This fixes a boatload of compiler warning, and removes a lot of cruft from the sources. I have not removed the /*ARGSUSED*/, they will require some looking at. libkvm, ps and other userland struct proc frobbing programs will need recompiled. Notes: svn path=/head/; revision=30994
* Removed unused #includes (<machine/cpu.h> now gives more pollution).Bruce Evans1997-09-011-2/+1
| | | | Notes: svn path=/head/; revision=28988
* Fixed misplaced declaration.Bruce Evans1997-08-251-2/+3
| | | | Notes: svn path=/head/; revision=28763
* Revert my previous commit about using CS_SECURE macro.Philippe Charnier1997-08-211-1/+2
| | | | | | | Requested by: Bruce. Notes: svn path=/head/; revision=28496
* Use CS_SECURE macro.Philippe Charnier1997-08-181-2/+1
| | | | | | | Reviewed by: John Dyson Notes: svn path=/head/; revision=28359
* Removed unused #includes.Bruce Evans1997-07-201-13/+1
| | | | Notes: svn path=/head/; revision=27557
* md_regs is a struct trapframe * now, not int []Peter Wemm1997-05-071-41/+41
| | | | Notes: svn path=/head/; revision=25553
* Removed potentially harmful garbage <vm/lock.h> and fixed bogusBruce Evans1997-04-011-2/+2
| | | | | | | | | use of it. It was actually harmless because the use was null due to fortuitous include orders and identical (wrong) idempotency macros. Notes: svn path=/head/; revision=24478
* Fix the warning when compiling the SYSINIT hook due to function types.Peter Wemm1997-03-291-2/+13
| | | | Notes: svn path=/head/; revision=24370
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notPeter Wemm1997-02-221-1/+1
| | | | | | | ready for it yet. Notes: svn path=/head/; revision=22975
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Prepare kernel to take advantage of "branded" ELF binaries.Søren Schmidt1996-10-161-5/+6
| | | | Notes: svn path=/head/; revision=18959
* Removed nested include of <sys/proc.h> from <vm/vm_object.h> and fixedBruce Evans1996-10-151-1/+2
| | | | | | | | | | | | | the one place that depended on it. wakeup() is now prototyped in <sys/systm.h> so that it is normally visible. Added nested include of <sys/queue.h> in <vm/vm_object.h>. The queue macros are a more fundamental prerequisite for <vm/vm_object.h> than the wakeup prototype and previously happened to be included by namespace pollution from <sys/proc.h> or elsewhere. Notes: svn path=/head/; revision=18942
* Clean-up the new VM map procfs code, and also add support for executableJohn Dyson1996-06-181-1/+3
| | | | | | | | format file "etype". It contains a description of the binary type for a process. Notes: svn path=/head/; revision=16474
* Clean up -Wunused warnings.Gary Palmer1996-06-121-2/+1
| | | | | | | Reviewed by: bde Notes: svn path=/head/; revision=16322
* Include <sys/buf.h> so that this does't blow up with B_WRITE undefined.Jordan K. Hubbard1996-05-011-1/+2
| | | | | | | | I fully updated my src tree and did a `make includes' in /usr/src before trying this fix, so I can only presume that Bruce missed something. Notes: svn path=/head/; revision=15506
* Update the linux_sendsig() handler to the new type of the 4thPeter Wemm1996-03-171-4/+4
| | | | | | | | arg, now unsigned long. This was (harmlessly on i386) conflicting with the recent 4.4Lite2 changes. Notes: svn path=/head/; revision=14655
* Move the elf linux_interp structure from the lkm stub to here so that itPeter Wemm1996-03-101-1/+18
| | | | | | | | can be referenced when the linux emulator is statically compiled into the kernel. Notes: svn path=/head/; revision=14468
* First attempt at FreeBSD & Linux ELF support.Søren Schmidt1996-03-101-61/+103
| | | | | | | | | | | | | | | | | | | | Compile and link a new kernel, that will give native ELF support, and provide the hooks for other ELF interpreters as well. To make native ELF binaries use John Polstras elf-kit-1.0.1.. For the time being also use his ld-elf.so.1 and put it in /usr/libexec. The Linux emulator has been enhanced to also run ELF binaries, it is however in its very first incarnation. Just get some Linux ELF libs (Slackware-3.0) and put them in the prober place (/compat/linux/...). I've ben able to run all the Slackware-3.0 binaries I've tried so far. (No it won't run quake yet :) Notes: svn path=/head/; revision=14456
* Mega-commit for Linux emulator update.. This has been stress tested underPeter Wemm1996-03-021-0/+358
netscape-2.0 for Linux running all the Java stuff. The scrollbars are now working, at least on my machine. (whew! :-) I'm uncomfortable with the size of this commit, but it's too inter-dependant to easily seperate out. The main changes: COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386 machine dependent section into the linux emulator itself. The int 0x80 syscall code was almost identical to the lcall 7,0 code and a minor tweak allows them to both be used with the same C code. All kernels can now just modload the lkm and it'll DTRT without having to rebuild the kernel first. Like IBCS2, you can statically compile it in with "options LINUX". A pile of new syscalls implemented, including getdents(), llseek(), readv(), writev(), msync(), personality(). The Linux-ELF libraries want to use some of these. linux_select() now obeys Linux semantics, ie: returns the time remaining of the timeout value rather than leaving it the original value. Quite a few bugs removed, including incorrect arguments being used in syscalls.. eg: mixups between passing the sigset as an int, vs passing it as a pointer and doing a copyin(), missing return values, unhandled cases, SIOC* ioctls, etc. The build for the code has changed. i386/conf/files now knows how to build linux_genassym and generate linux_assym.h on the fly. Supporting changes elsewhere in the kernel: The user-mode signal trampoline has moved from the U area to immediately below the top of the stack (below PS_STRINGS). This allows the different binary emulations to have their own signal trampoline code (which gets rid of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so that the emulator can provide the exact "struct sigcontext *" argument to the program's signal handlers. The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which have the same values as the re-used SA_DISABLE and SA_ONSTACK which are intended for sigaction only. This enables the support of a SA_RESETHAND flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal semantics where the signal handler is reset when it's triggered. makesyscalls.sh no longer appends the struct sysentvec on the end of the generated init_sysent.c code. It's a lot saner to have it in a seperate file rather than trying to update the structure inside the awk script. :-) At exec time, the dozen bytes or so of signal trampoline code are copied to the top of the user's stack, rather than obtaining the trampoline code the old way by getting a clone of the parent's user area. This allows Linux and native binaries to freely exec each other without getting trampolines mixed up. Notes: svn path=/head/; revision=14331