aboutsummaryrefslogtreecommitdiff
path: root/sys/i386/linux/linux.h
Commit message (Collapse)AuthorAgeFilesLines
* Implement pluggable ioctl handlers.Marcel Moolenaar1999-12-041-635/+287
| | | | | | | | | | | | | | | | | | | | | | | | | | | Other modules can register and unregister ioctl handlers to extend the ioctls known by the Linuxulator. A recent application is the vmware port. The Linuxulator itself uses the new interface to register its handlers as well. Handlers for the following types of ioctls have been defined: cdrom console (=keyboard and VT handling) socket sound termio All ioctl related defines and declarations have been moved to a new file (linux_ioctl.h), except for the pluggable ioctl handler interface definition. While there, cleanup linux.h some more. linux.h and linux_ioctl.[ch] have been made to conform to style(9) as much as possible. Inspired and reviewed by: Vladimir N. Silyaev Notes: svn path=/head/; revision=54122
* Implement linux_sigaltstack.Marcel Moolenaar1999-11-301-0/+8
| | | | Notes: svn path=/head/; revision=53954
* add linuxulator wrapper for SNDCTL_DSP_GETODELAYAlfred Perlstein1999-11-291-0/+1
| | | | Notes: svn path=/head/; revision=53902
* sigset_t change (part 4 of 5)Marcel Moolenaar1999-09-291-39/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ----------------------------- 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
* Implement the OSS_GETVERSION ioctl. The version returned can be changed throughMarcel Moolenaar1999-08-281-0/+2
| | | | | | | | | | the sysctl variable `compat.linux.oss_version'. PR: 12917 Originator: Dean Lombardo <dlombardo@excite.com> Notes: svn path=/head/; revision=50500
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Change all UNIMPL syscalls to STD and add them to linux_dummy. Now we alwaysMarcel Moolenaar1999-08-251-1/+10
| | | | | | | | | | | | | | | know if and when an unimplemented or obsoleted syscall is being used. Make the message more end-user friendly. And as long as we're here, rename some unimplemeted syscalls (linux_phys -> linux_umount2, linux_vm86 -> linux_vm86old, linux_new_vm86 -> linux_vm86). Change prototype for linux_newuname from `struct linux_newuname_t *' into `struct linux_new_utsname *'. This change is reflected in linux.h and linux_misc.c. Notes: svn path=/head/; revision=50345
* Provide wrappers for sched_{s|g}etscheduler. We need to convert the policyMarcel Moolenaar1999-08-151-1/+6
| | | | | | | | | | argument. PR: 12006 Originator: Jean-Claude MICHOT <jcmichot@teaser.fr> Notes: svn path=/head/; revision=49849
* Implementation of linux_rt_sigaction and linux_rt_sigprocmask syscalls. BothMarcel Moolenaar1999-08-141-1/+15
| | | | | | | | | | | | | functions use the new sigset_t and sigaction_t which allows support for more than 32 signals. Only the lower 32 signals are supported for now. linux_rt_sigaction, linux_sigaction and linux_signal use linux_do_sigaction to do the actual work. That way unnecessary redundancy is avoided. The same has been done for linux_rt_sigprocmask and linux_sigprocmask. They call linux_do_sigprocmask to do the actual work. Notes: svn path=/head/; revision=49786
* Implementation of the CDROMSUBCHNL ioctl.Marcel Moolenaar1999-08-131-1/+4
| | | | Notes: svn path=/head/; revision=49688
* Do not map {s|g}etrlimit onto FreeBSD syscalls. The arguments don't match.Marcel Moolenaar1999-08-111-1/+15
| | | | | | | | | | | The linux syscalls translate the arguments first before invoking the FreeBSD native syscalls. PR: kern/9591 Originator: John Plevyak <jplevyak@inktomi.com> Notes: svn path=/head/; revision=49626
* Implementation of TCXONC.Marcel Moolenaar1999-07-171-2/+6
| | | | | | | Reviewed by: bde Notes: svn path=/head/; revision=48851
* Implement VT_RELDISP ioctlMarcel Moolenaar1999-07-081-1/+2
| | | | | | | Submitted by: Kazutaka Yokota <yokota@FreeBSD.org> Notes: svn path=/head/; revision=48685
* Rename struct members sa_siginfo. POSIX reserves identifiers startingMartin Cracauer1999-07-061-5/+5
| | | | | | | | | | with sa_ when <signal.h> is included. They would conflict with the upcoming SA_SIGINFO implementation. Reviewed by: BDE Notes: svn path=/head/; revision=48620
* - Handle mixer read ioctls correctly. They have the same group, number andLuoqi Chen1999-04-291-2/+29
| | | | | | | | argument size as their write counterparts and were handled as write ioctls. - Emulate some cdrom ioctls. Notes: svn path=/head/; revision=46163
* Commit patch inSøren Schmidt1998-12-301-1/+3
| | | | | | | | PR: 9232 Submitted by: marcel@scc.nl <Marcel Moolenaar> Notes: svn path=/head/; revision=42186
* Reviewed by: Luoqi Chen, Jordan HubbardJulian Elischer1998-12-191-1/+2
| | | | | | | | | | | | | | | 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
* MF22: Bring in some linux sound ioctl support which I committed to 2.2Jordan K. Hubbard1998-11-121-1/+16
| | | | | | | | | | for PR 7792 but did not bring forward. Submitted by: Avatar Liang <avatar@www.mmlab.cse.yzu.edu.tw> PR: 8656 Notes: svn path=/head/; revision=41105
* Make async I/O on a socket work.John Fieber1998-10-051-7/+6
| | | | | | | | 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 several missing ioctl handlers. One needed by Sybase, the othersJohn Fieber1998-09-301-1/+8
| | | | | | | found while looking for the one. Notes: svn path=/head/; revision=39799
* Initial support for using linux X servers under emulation - to use anJordan K. Hubbard1998-08-311-1/+15
| | | | | | | | | | | | | | | | | | | XFree86 server, users need to create the following links in their /compat/linux/dev directory (assuming kernel configured with 4 VTs). lrwxrwxrwx 1 root wheel 7 Aug 30 22:59 tty0 -> console lrwxrwxrwx 1 root wheel 5 Aug 30 22:45 tty1 -> ttyv0 lrwxrwxrwx 1 root wheel 5 Aug 30 22:45 tty2 -> ttyv1 lrwxrwxrwx 1 root wheel 5 Aug 30 22:45 tty3 -> ttyv2 lrwxrwxrwx 1 root wheel 5 Aug 30 22:45 tty4 -> ttyv3 VT switching is still not yet supported. Attempting to switch VT currently will cause Xserver bus error. Submitted by: Chain Lee <chain@110.net> Notes: svn path=/head/; revision=38672
* Staticized.Bruce Evans1998-02-131-2/+1
| | | | Notes: svn path=/head/; revision=33313
* As described by the submitter:Mike Smith1997-12-151-0/+16
| | | | | | | | | | | | | | These patches enables us to play quake2 . Support linux keyboard ioctl for setting RAW, MEDIUMRAW and XLATE. Support linux virtual terminal operations: OPENQRY, GETMODE, SETMODE, GETSTATE, ACTIVATE, and WAITACTIVE. Submitted by: Amancio Hasty <hasty@rah.star-gate.com> Notes: svn path=/head/; revision=31730
* Added support for linux sound ioctls:Amancio Hasty1997-11-171-1/+6
| | | | | | | | | | | | LINUX_SNDCTL_DSP_GETOPTR LINUX_SNDCTL_DSP_GETIPTR LINUX_SNDCTL_DSP_SETTRIGGER LINUX_SNDCTL_DSP_GETCAPS With this rev level the linux realaudio player 5 and xquake should work. Notes: svn path=/head/; revision=31198
* Implement linux_semop, linux_semget and linux_semctl.KATO Takenori1997-10-281-1/+10
| | | | | | | PR: 4355 Notes: svn path=/head/; revision=30804
* Grr. Remove not-ready LDT modification fluff that also crept in withMike Smith1997-06-021-26/+1
| | | | | | | the last commit. Notes: svn path=/head/; revision=26369
* Add support for the SIOCGIFHWADDR ioctl, commonly used byMike Smith1997-06-021-1/+71
| | | | | | | | | | | | license managers to obtain the host's ethernet address as a key. Note that this implementation takes the first hardware address for the first ethernet interface found, and disregards the interface name that may be passed in, as linux ethernet devices are all "ethX". Notes: svn path=/head/; revision=26364
* 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
* Add IP_OPTIONS and the multicast-related setsockopts to theBill Fenner1996-12-031-1/+9
| | | | | | | | | | | | | | list of IP setsockopts the Linux emulator recognizes. Explicitly disallow IP_HDRINCL since Linux's handling of raw output is different than BSD's. Closes PR#kern/2111. Submitted by: y-nakaga@ccs.mt.nec.co.jp (Yoshihisa NAKAGAWA) Notes: svn path=/head/; revision=20101
* Add audio mixer ioctls.Sujal Patel1996-11-051-1/+19
| | | | | | | Only writing to the mixer is implemented. Notes: svn path=/head/; revision=19414
* Declare pointers to signal handling functions in full instead of asBruce Evans1996-10-251-3/+2
| | | | | | | sig_t's so that <sys/signal.h> isn't a prerequisite. Notes: svn path=/head/; revision=19182
* Updated #includes to 4.4lite style.Bruce Evans1996-10-151-2/+3
| | | | Notes: svn path=/head/; revision=18946
* Implement rudumentry support for the linux TIOC[SG]ETSERIAL ioctl's.Peter Wemm1996-03-101-1/+35
| | | | | | | | | | | To complete this, some extra state has to be kept somewhere so that the B38400 flag in Linux can be correctly translated to/from either 38400, 57600 or 115200. Submitted by: Robert Sanders <rsanders@mindspring.com> Notes: svn path=/head/; revision=14466
* First attempt at FreeBSD & Linux ELF support.Søren Schmidt1996-03-101-3/+11
| | | | | | | | | | | | | | | | | | | | 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
* Add support for the old-style Linux termio (not termios) TCGETA etc.Peter Wemm1996-03-031-2/+4
| | | | | | | | | | | | Also, LINUX_POSIX_VDISABLE is \0, FreeBSD's is 0xff. Convert between them. This enables some more programs to run, including the Livingston Portmaster utilities (PMtools). Submitted by: Robert Sanders <rsanders@mindspring.com> Notes: svn path=/head/; revision=14361
* Mega-commit for Linux emulator update.. This has been stress tested underPeter Wemm1996-03-021-5/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix a bunch of spelling errors in the comment fields ofMike Pritchard1996-01-301-2/+2
| | | | | | | a bunch of system include files. Notes: svn path=/head/; revision=13765
* My first shot at get sound to work on the emulator.Søren Schmidt1995-12-291-1/+19
| | | | | | | | Inspired by the work Amancio Hasty has done, but implemented somewhat differently. Notes: svn path=/head/; revision=13111
* Completed function declarations and added prototypes.Bruce Evans1995-11-221-4/+9
| | | | | | | | | Removed some unnecessary #includes. Fixed warnings about nested externs. Notes: svn path=/head/; revision=12458
* First incarnation of our Linux emulator or rather compatibility code.Søren Schmidt1995-06-251-0/+406
This first shot only incorporaties so much functionality that DOOM can run (the X version), signal handling is VERY weak, so is many other things. But it meets my milestone number one (you guessed it - running DOOM). Uses /compat/linux as prefix for loading shared libs, so it won't conflict with our own libs. Kernel must be compiled with "options COMPAT_LINUX" for this to work. Notes: svn path=/head/; revision=9313