Commit Graph

3103 Commits

Author SHA1 Message Date
christos de6033f456 Add __HAVE_SIGINFO 2003-10-26 08:11:53 +00:00
christos 94c11938c1 Regen 2003-10-26 08:11:17 +00:00
christos 099d2ea44d Add __HAVE_SIGINFO 2003-10-26 08:11:01 +00:00
lukem f85d2d1c14 Use ${HOST_SH} instead of `sh'.
If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
2003-10-26 07:25:33 +00:00
mycroft a65f74a513 Previous changes were not correct. 2003-10-25 20:15:13 +00:00
christos 4bec333ae4 Fix uninitialized variable warnings 2003-10-25 18:37:49 +00:00
chs 359e5c8c2e regen 2003-10-25 16:28:09 +00:00
chs b9a4f8c809 allow COMPAT_SUNOS without COMPAT_43. 2003-10-25 16:27:25 +00:00
manu e7fc3d0217 Correctly terminate the iohidsystem thread (with appropriate cleanups of
the shared memory), when the display server quits. We are now able to
restart the X server without the need to reboot the machine. That's better.
2003-10-25 10:43:45 +00:00
manu 13b975e15d Typo 2003-10-25 10:41:53 +00:00
kleink 004922cd70 Don't use NULL in integer-type assignments/comparisons. 2003-10-21 12:08:11 +00:00
petrov fd995d7327 More NULL vs not pointer. 2003-10-21 09:02:50 +00:00
fvdl f4fff513a1 Fix NULL vs. int comparison. 2003-10-21 01:44:45 +00:00
fvdl 38bee36b4c Fix some int vs. NULL comparisons. 2003-10-21 01:38:42 +00:00
fvdl d114e05b9c Don't compare an integer value against 0. 2003-10-21 01:20:12 +00:00
manu d77ec799a5 Support Darwin static binaries (I should say: support the only Darwin
static binary: otool). Dynamic binaires have a pointer to the Mach-O
header on the top of the stack, static binaries don't have this, and
having it produced a crash.

One bugfix: the EXEC_MACHO code assumes that entry = NULL means that
the entry point has not been found in the load commands seen so far.
Therefore we need to initialized entry to NULL if we want a static binary
to discover it. (dynamic binaries were forced to iscover it because when
the intepreter load command is found, entry is updated whatever its
value was before).

One hack: Both COMPAT_MACH and COMPAT_DARWIN are willing to run Mach-O
binaries. COMPAT_MACH fails for dynamic binaries because it cannot find
the interpreter in /emul/mach. For static binaires, it will accept them
(and for Darwin static binaries, this will cause a failure). Until we
rite a test for matchinf Darwin static binaries, just swap the order of
COMPAT_MACH and COMPAT_DARWIN in the exec switch so that COMPAT_DARWIN
is tried first (this will have the advantage of speeding up program
startup). EXECSW_PRIO_{FIRST_LAST} does not seem to work...
2003-10-19 07:52:22 +00:00
manu 8c5377c3b8 Remove references to wsmux_cdevsw and wsdisplay_cdevsw (how to remove
them completely?)

Add SETCURSORPOSITION operation
2003-10-18 13:27:17 +00:00
manu 3b556e0bb2 Fix error in struct definition 2003-10-18 13:25:27 +00:00
fvdl 4b84b8d930 Don't put the netbsd32_compat*.c files in the 'compat library'. Unconditionally
compiling these causes a ripple effect making it hard to conditionalize
anything on COMPAT_* in the kernel.
2003-10-15 13:32:14 +00:00
hannken a3a898ff0f Add the gating of system calls that cause modifications to the underlying
file system.
The function vfs_write_suspend stops all new write operations to a file
system, allows any file system modifying system calls already in progress
to complete, then sync's the file system to disk and returns. The
function vfs_write_resume allows the suspended write operations to
complete.

From FreeBSD with slight modifications.

Approved by: Frank van der Linden <fvdl@netbsd.org>
2003-10-15 11:28:59 +00:00
fvdl ff376b0763 Implement 32bit get/setcontext entry points. 2003-10-13 18:55:30 +00:00
fvdl fd1fb232de Regenerate. 2003-10-13 18:54:57 +00:00
fvdl 4a68d0f9cb Define compat_16 as valid prefix; define the 1.6 compat sigreturn. 2003-10-13 18:53:35 +00:00
agc b2b49933f4 Move Matt Green's code from a 4-clause to a 3-clause licence by removing
the advertising clause. Diffs provided in PR 22396 by Joel Baker, the changes
were confirmed to the board by Matt Green.
2003-10-13 14:22:20 +00:00
chs efdef4fa03 fix typo in previous. 2003-10-11 10:36:46 +00:00
matt 77a7f39625 Define SIGINFO variant of netbsd32_sendsig when __HAVE_SIGINFO is defined. 2003-10-10 23:18:57 +00:00
matt f2e488d9af Adapt to SIGINFO changes. 2003-10-10 18:08:04 +00:00
matt 0dbe439e05 Adapt ARM Linux compat code to deal with SIGINFO. 2003-10-10 14:44:42 +00:00
matt 25fb6de823 Adapt to SIGINFO changes. 2003-10-10 02:26:54 +00:00
thorpej 8321b2554f Use ksi_signo accessor macro. 2003-10-08 00:39:57 +00:00
christos 07ceba4419 Catch up with chuck's stack changes. Don't map the linux stuff executable
and avoid mapping segments that have 0 size.
2003-10-06 03:45:40 +00:00
itojun f8641ea112 avoid out-of-bound memory access. found by openbsd "bound" C attribute. 2003-10-01 08:03:48 +00:00
manu 2522a3f784 Build PowerPC again with _HAS_SIGINFO. Remove the ifdef on _HAS_SIGINFO
in the header file since all platforms supported by COMPAT_DARWIN now have it.
2003-09-30 21:04:54 +00:00
manu 45fa851e14 Report keyup and keydown events
Qhen the event queue is full, sleep so that the process will be able to
consume entries
2003-09-30 19:56:54 +00:00
manu a61584517b Attempt to restore colormap after a display server crashed 2003-09-30 19:49:00 +00:00
martin a498dbd6b4 constify 2003-09-28 10:24:47 +00:00
martin b4f2a7e0a0 const poisioning. 2003-09-28 10:22:21 +00:00
tsutsui f9acb25560 Catch up with const sigset_t. From Christopher SEKIYA. 2003-09-28 08:11:47 +00:00
cl ea7f5f55b4 fix fmovem argument reference 2003-09-28 00:15:13 +00:00
cl af0728fff5 catch up with const sigset_t 2003-09-28 00:07:50 +00:00
cl 944c9c43ab catch up with const sigset_t and const ksiginfo_t 2003-09-28 00:04:52 +00:00
christos deacebb910 Add necessary include file. 2003-09-26 21:28:24 +00:00
christos 7e25d9a162 catch up with const sigset_t 2003-09-26 18:11:47 +00:00
christos 25f1b29f36 bring in MI declarations. 2003-09-26 18:10:32 +00:00
simonb 550b4bef88 Fix "constify sendsig/trapsignal" fallout for non-siginfo'd archs. Test
compiled on most architectures.
2003-09-26 12:02:55 +00:00
christos cfba45c856 constify sendsig/trapsignal 2003-09-25 22:00:02 +00:00
matt 85a5f3065d Add siginfo support for PowerPC. 2003-09-25 18:42:18 +00:00
cl cf9f62a8e7 catch up with sys___sigaction14 compat_16 rename 2003-09-23 18:54:24 +00:00
cl 0dd1fb3d17 regen 2003-09-23 18:32:12 +00:00
cl 7e40a36c7f catch up with sys___sigaction14 compat_16 rename 2003-09-23 18:31:03 +00:00
christos 24915aa1a2 Regen. 2003-09-23 14:33:34 +00:00
christos cf3a45c8c1 Make this compile and link properly. 2003-09-23 14:33:24 +00:00
cl 11af0a3c8d SA_SIGINFO support for m68k (emul linux) 2003-09-22 14:36:42 +00:00
cl bf9728e0db SA_SIGINFO support for m68k (compat sunos) 2003-09-22 14:34:57 +00:00
cl 9b18b6fa61 regen 2003-09-22 14:32:15 +00:00
cl a580f34fa7 SA_SIGINFO support for m68k (compat aoutm68k) 2003-09-22 14:31:27 +00:00
jdolecek bc83b2f421 make compile after last change (!) 2003-09-21 19:29:10 +00:00
jdolecek 7cea8a1389 cleanup & uniform descriptor owner handling:
* introduce fsetown(), fgetown(), fownsignal() - this sets/retrieves/signals
  the owner of descriptor, according to appropriate sematics
  of TIOCSPGRP/FIOSETOWN/SIOCSPGRP/TIOCGPGRP/FIOGETOWN/SIOCGPGRP ioctl; use
  these routines instead of custom code where appropriate
* make every place handling TIOCSPGRP/TIOCGPGRP handle also FIOSETOWN/FIOGETOWN
  properly, and remove the translation of FIO[SG]OWN to TIOC[SG]PGRP
  in sys_ioctl() & sys_fcntl()
* also remove the socket-specific hack in sys_ioctl()/sys_fcntl() and
  pass the ioctls down to soo_ioctl() as any other ioctl

change discussed on tech-kern@
2003-09-21 19:16:48 +00:00
christos 9b18cdecf8 Now that we have siginfo, use it, instead of pretending to have one. 2003-09-21 17:42:23 +00:00
pooka ec398e6f4d regen 2003-09-18 14:50:07 +00:00
pooka 3e2a629fec Add a good enuf emulation of the MAP_STACK flag to the mmap()
syscall.  This allows programs which use MAP_STACK to work instead
of failing in weird and wonderous ways.
2003-09-18 14:44:09 +00:00
christos dd61a2eb87 catch up with latest sigctx changes; reported by John Heasley, thanks! 2003-09-15 18:35:02 +00:00
manu 9972873c7d Handle mouseup and mousdown events
Add three sysctl to choose wsdisplay unit and screen and wsmux that
ioframebuffer and iohidsystem will use.
2003-09-14 09:48:42 +00:00
christos 0c73068f06 regen 2003-09-13 18:44:49 +00:00
christos 2cfe0b047e add __HAVE_SIGINFO 2003-09-13 18:44:30 +00:00
manu 755716d281 Darwin's I/O reverse the mouse's Y axis. 2003-09-13 16:35:47 +00:00
manu 08f5f5b835 Bugfix: notifications sent by iohidsystem kernel threads are to be
hnalded as mmessages coming from the kernel, since the threas has
no p->p_emuldata
2003-09-13 16:07:44 +00:00
jdolecek a034152027 move dupfd from struct proc to struct lwp - it's per-LWP, not per-process; we
use curlwp where the lwp is not directly available, i.e. in device open
routines

briefly discussed on tech-kern
2003-09-13 08:32:10 +00:00
jdolecek ce8305a84c g/c #if 0'ed code 2003-09-13 08:22:51 +00:00
jdolecek 69150f5b25 ptyname[] must not be static, the contents are modified later in the routine 2003-09-13 08:15:25 +00:00
manu 11d6605f3f Sync between parent and child in iohdisystem thread so that the child has
time to get its parmeteres before the parent throw them away
2003-09-13 07:56:54 +00:00
christos 1ccdaf7265 regen 2003-09-12 12:47:00 +00:00
christos bfff25cc7c Fixes for __sigreturn14 2003-09-12 12:46:47 +00:00
christos d56d80d37d regen 2003-09-12 02:10:55 +00:00
christos 3178a811f8 catch up with sigreturn changes 2003-09-12 02:10:33 +00:00
manu f816300903 (file missing from the previous commit, I copy/past the commit log)
Some initial support for IOHIDSystem. This gives us some pointer moves in X11
(not really related the the actual mouse movement, but this will come).

The darwin_iohidsystem_thread reads events from wscons, translates them
into IOHIDSystem events and wakes up the userland client with a notification.
To do this, I had to improve the void implementation of
io_connect_set_notification_port() to actually register something (I assumed
a single notification port, which makes some sense since only one process
seems to be able to open the driver)

Missing bits:
- we do not take event masks given by the process into account.
- the notification message has not been checked against Darwin
- events are badly translated
2003-09-11 23:18:10 +00:00
manu f9c483a301 Some initial support for IOHIDSystem. This gives us some pointer moves in X11
(not really related the the actual mouse movement, but this will come).

The darwin_iohidsystem_thread reads events from wscons, translates them
into IOHIDSystem events and wakes up the userland client with a notification.
To do this, I had to improve the void implementation of
io_connect_set_notification_port() to actually register something (I assumed
a single notification port, which makes some sense since only one process
seems to be able to open the driver)

Missing bits:
- we do not take event masks given by the process into account.
- the notification message has not been checked against Darwin
- events are badly translated
2003-09-11 23:16:18 +00:00
christos 9a680b9da0 regen 2003-09-10 19:47:49 +00:00
christos df9305fe0c sys__sigreturn14 -> compat_16_sys___sigreturn14 2003-09-10 19:47:40 +00:00
christos e09c2a122c don't abuse the native sigcode. 2003-09-10 16:44:56 +00:00
christos 61f50ff333 someone forgot to commit code. make this compile again. 2003-09-10 16:44:45 +00:00
rafal ece5b8e67d Catch up to Christos' SIGINFO changes. 2003-09-07 21:37:19 +00:00
manu 606e47547a Typo 2003-09-07 09:07:19 +00:00
manu 8e53685a40 Fix the build by removing machine dependent stuff from darwin_sysctl.h (it
is included by userland build, and it included darwin_machdep.h, which is
unavaillable for most arches)
2003-09-07 08:05:47 +00:00
manu 7dda8d2416 KERN_PROC and KERN_PROCARGS sysctl. This helps ps working (it's not
yet perfect)
2003-09-06 23:54:47 +00:00
manu 4de9ba3f19 Added vm_region_64 and thread_info 2003-09-06 23:52:25 +00:00
manu f600082353 Added vm_region_64 and thread_info 2003-09-06 23:52:24 +00:00
erh 96cd5369b0 Use vn_marktext to set the VTEXT flag on the vnode of the executable.
This satisfies the KASSERT at the beginning of vmvmd_map_pagedvn() and avoids
an immediate panic when attempting to execute a PECOFF binary.
2003-09-06 22:55:06 +00:00
christos e2c278d8c0 SA_SIGINFO changes 2003-09-06 22:09:20 +00:00
manu f88ed86b14 regen 2003-09-06 11:50:25 +00:00
manu bfc0bb09ef Convert dev_t for mknod 2003-09-06 11:50:00 +00:00
manu 2add551792 regen 2003-09-06 11:18:50 +00:00
manu e0a2c17b59 Correctly translate dev_t in stat/fstat/lstat 2003-09-06 11:18:03 +00:00
manu 72fb398585 regen 2003-09-03 07:29:29 +00:00
manu fcd3e861d0 Implement Darwin's FIODTYPE ioctl (get a file d_type) 2003-09-03 07:28:38 +00:00
manu 244c38a2ae regen 2003-09-02 21:48:49 +00:00
manu c4c193473f correct translation for struct statfs in getfsstat, ststfs and fstatfs 2003-09-02 21:31:01 +00:00
manu 80ae13b4df Handle colormap change requests 2003-08-31 21:10:22 +00:00
manu 2a523b0455 Correctly map the framebuffer. XDarwin display its background shade, hurrah! 2003-08-31 14:17:25 +00:00
manu ebd83433da If a Darwin process using the framebuffer (e.g.: XDarwin) crashes without
restoring text mode, do the job ourselves. This avoids letting the
user on an unusable console
2003-08-29 23:11:40 +00:00
manu 553c82ed11 Switch the console to graphic mode before trying to udv_attach the
framebuffer.
2003-08-29 22:03:13 +00:00
manu 850173c462 Correctly get framebuffer dimensions 2003-08-28 21:47:02 +00:00
manu 41a89bc98d Fix a buffer overflow that was leading to various kernel crashes 2003-08-26 21:52:18 +00:00
chs 939df36e55 add support for non-executable mappings (where the hardware allows this)
and make the stack and heap non-executable by default.  the changes
fall into two basic catagories:

 - pmap and trap-handler changes.  these are all MD:
   = alpha: we already track per-page execute permission with the (software)
	PG_EXEC bit, so just have the trap handler pay attention to it.
   = i386: use a new GDT segment for %cs for processes that have no
	executable mappings above a certain threshold (currently the
	bottom of the stack).  track per-page execute permission with
	the last unused PTE bit.
   = powerpc/ibm4xx: just use the hardware exec bit.
   = powerpc/oea: we already track per-page exec bits, but the hardware only
	implements non-exec mappings at the segment level.  so track the
	number of executable mappings in each segment and turn on the no-exec
	segment bit iff the count is 0.  adjust the trap handler to deal.
   = sparc (sun4m): fix our use of the hardware protection bits.
	fix the trap handler to recognize text faults.
   = sparc64: split the existing unified TSB into data and instruction TSBs,
	and only load TTEs into the appropriate TSB(s) for the permissions.
	fix the trap handler to check for execute permission.
   = not yet implemented: amd64, hppa, sh5

 - changes in all the emulations that put a signal trampoline on the stack.
   instead, we now put the trampoline into a uvm_aobj and map that into
   the process separately.

originally from openbsd, adapted for netbsd by me.
2003-08-24 17:52:28 +00:00
dsl dc46f864d1 Hide prototype of linux_exec_setup_stack() inside #ifdef _KERNEL so
that sbin/sysctl will compile.
2003-08-21 15:08:25 +00:00
hannken 1a2d1be737 Fix syscall_vm86 argument:
struct trapframe -> struct trapframe *
2003-08-21 08:36:56 +00:00
he 6d211e7dbf Re-balance parens. 2003-08-18 20:34:18 +00:00
christos 329946a58b remove the args from the macro. 2003-08-14 02:17:07 +00:00
jdolecek c336185a31 regen - added wrapper for Linux ftruncate64() 2003-08-10 20:17:21 +00:00
jdolecek 94b152275c add Linux compat arg wrapper for ftruncate64(), and change linux compat
truncate64() wrapper to translate args structure
NetBSD truncate() and ftrucate() have hidden 'pad' argument, so we have
to do the argument translation

Problem found and patch supplied in PR kern/22360 by Ales Krenek

This is the last of syscalls with hidden 'pad' arg we didn't have
wrapper for; all the others (lseek, mmap, pwrite, pread) already had
wrapper before.
2003-08-10 20:16:20 +00:00
jdolecek 64bb562b50 fix linux_sys_p{read|write}() to actually call correct syscall after
arg massage, i.e. sys_p{read|write} as appropriate; up to now, the functions
called sys_{read|write}() by mistake
2003-08-09 17:11:51 +00:00
christos 36e09d1a2c Explain a diagnostic message a bit better, and make it a debug only message. 2003-08-09 14:16:44 +00:00
christos 3b9c3c5aab - GC all the setup_stack functions
- add one for linux/i386
2003-08-08 18:57:01 +00:00
christos 6f1990af06 Conditionally declare function that is not used all the time. 2003-08-08 18:55:26 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
manu c6eca571d5 irix_elf32_probe is now responsible for finding interpreter's load
address. We do that through the irix_load_addr function, which is
not IRIX specific at all. If another emulation needs it, it can
easily move to compat_util.c

With this change, IRIX dynamic binaries are able to link and run again
(top down UVM broke them a few weeks ago)
2003-08-06 01:04:44 +00:00
christos baccb9bad5 Another chicken sacrifice to the gcc3 warning gods. 2003-08-05 21:12:53 +00:00
jdolecek d6ade97eb9 use copyout() instead of subyte() 2003-08-02 20:23:48 +00:00
jdolecek e0fe42681d use copyin()/copyout() instead of fubyte()/subyte()
also nuke uvm_useracc() check, copyin()/copyout() do this atomically

XXX only compile-tested
2003-08-02 19:51:23 +00:00
jdolecek 16b74086ed replace fuword() with copyin(), and suword() with copyout() 2003-08-02 19:21:48 +00:00
mrg caa408bca7 (void_cast_for_gcc_3_3_msg_goes_here *) 2003-07-29 16:18:54 +00:00
jdolecek a2d0517af5 More complete sendmsg(2) and recvmsg(2) emulation:
* translate MSG_* flags
* rewrite CMSG level/type to appropriate NetBSD value on input, and to Linux
  value on output
* handle different CMSG_DATA alignment for some archs

This fixes SCM_RIGHTS passing. Other SCM_* types are not supported -
the set is different on NetBSD and Linux. SCM_TIMESTAMP doesn't seem
to be actually implemented in Linux 2.5.15, so it's not supported
for Linux binaries either (for now).

PR: 21577 by Todd Vierling
2003-07-27 19:30:03 +00:00
mrg 05602c761d add a cast appease gcc3.3 2003-07-27 05:04:02 +00:00
jdolecek 21f695a1ae add LINUX_SO_PEERNAME, LINUX_SO_TIMESTAMP where it has been missing
fix value for LINUX_SO_DETACH_FILTER on couple places (unused anyway)

g/c LINUX_SCM_TIMESTAMP definition for some archs, it will be defined
in generic linux_socket.h
2003-07-26 19:59:29 +00:00
christos 91e13193ee make credentials work on the i386 by passing the original msg structure.
(from Todd Vierling)
2003-07-23 19:10:29 +00:00
christos b2163312f5 fix unused variable warning 2003-07-11 18:55:14 +00:00
manu 90c0f71598 Add HW_MACHINE sysctl 2003-07-10 14:47:34 +00:00
enami 5b4483be52 Actually move the prototype of native_to_linux_sigaltstack here. 2003-07-04 03:04:11 +00:00
christos 28f544c476 Regen. 2003-07-03 21:25:07 +00:00
christos c23e21bca5 Implement linux_rt_sigreturn for real. Add a hack for more plausible siginfo.
The java segv handler still segv's again inside the signal handler, but our
sample test program now works [gets the proper ucontext].
2003-07-03 21:24:27 +00:00
christos 72af603189 make the converter of sigaltstack public. 2003-07-03 21:22:32 +00:00
manu 0229e10bf3 Added a IOFBSETCOLORCONVERTTABLE method in ioframebuffer driver.
Added sanity check for user provided offsets in messages.
2003-07-01 19:15:47 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
thorpej 9f722af1c9 Adapt to ktrace/lwp changes. 2003-06-29 16:10:48 +00:00
thorpej 38271de3f4 Regen: adapt to linux mmap2 changes. 2003-06-29 16:08:36 +00:00
thorpej 8ab744356a Adapt to linux mmap2 changes. 2003-06-29 16:07:58 +00:00
thorpej f4fff81d3a Adapt to ktrace/lwp changes. 2003-06-29 15:49:49 +00:00
simonb 2bda3187f5 Fix 'struct lwp *' lossage. 2003-06-29 15:14:11 +00:00
jdolecek dc63267c8b properly FILE_USE/FILE_UNUSE descriptor in linux_sys_fcntl()
adresses PR kern/21628 by Wolfgang Solfrank
2003-06-29 14:51:28 +00:00
martin 69cd0c4a54 struct proc * -> struct lwp * 2003-06-29 13:33:51 +00:00
darrenr 257443876f 'struct proc *' -> 'struct lwp *' as required to get GENERIC for macppc built 2003-06-29 11:02:21 +00:00
martin 2edcbf6bb2 struct proc * -> struct lwp * 2003-06-29 10:37:45 +00:00
darrenr 9dc96360bb More changes for providing lwpid for ktrace (sparc GENERIC built) 2003-06-29 09:56:27 +00:00
simonb 0a144cd97c Fix 'struct lwp *' lossage. 2003-06-29 09:42:10 +00:00
enami 618a0ff610 Redo previous; struct proc *p is necessary if NSEQUENCER is non zero. 2003-06-29 05:26:25 +00:00
dogcow f842592241 these two got missed in darrenr's proc -> lwp changes 2003-06-29 03:29:14 +00:00
bouyer 63d28e64a6 Kill unused variable. 2003-06-28 22:52:53 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
he 86cc24bba0 #ifdef _KERNEL_OPT police. 2003-06-28 08:31:16 +00:00
he 3686522ed1 Regenerate after adding include of linux_mmap.h. 2003-06-28 07:56:51 +00:00
he c7ace1c552 Need to include linux_mmap.h to get size of struct linux_sys_mmap2_args. 2003-06-28 07:55:08 +00:00
martin 9276710861 #ifdef _KERNEL_OPT police 2003-06-25 20:30:15 +00:00
augustss 6ef6cc143d Fix missing call to FILE_UNUSE. From kern/21946, from Todd Vierling. 2003-06-23 21:53:10 +00:00
christos 9d352b5c2c PR/21936: Todd Vierling: ioctl 'r' misinterpreted 2003-06-23 21:37:27 +00:00
christos 40e148ef6b PR/21948: Todd Vierling: Implement MAP_TRYFIXED for linux emulation. 2003-06-23 21:32:33 +00:00
christos c9a5d7edc1 Regen. 2003-06-23 21:26:30 +00:00
christos 35637451db PR/21937: Todd Vierling: Proper support for mmap2 2003-06-23 21:25:56 +00:00
erh 2f3650202c Add copyright+license. 2003-06-23 17:29:25 +00:00
martin 864f19482a #ifdef _KERNEL_OPT police 2003-06-23 14:59:21 +00:00
martin d505b18964 Make sure to include opt_foo.h if a defflag option FOO is used. 2003-06-23 11:00:59 +00:00
christos 5879a5dcf6 PR/21936: Todd Vierling: compat/linux: ioctl 'r' misinterpreted 2003-06-20 03:54:35 +00:00
christos c82b786eb3 simplify bsd_sys_bind() 2003-06-05 19:42:55 +00:00
manu c5defe555a Ooops, I deleted a debug printf just before committing and one bit was
remaining. While I'm there, fix a typo in a comment.
2003-06-05 18:51:40 +00:00
manu 278cce5ba7 regen 2003-06-05 12:28:01 +00:00
manu 2c3b365958 Search alternate /emul/* path for AF_LOCAL sockets at bind() time. 2003-06-05 12:26:27 +00:00
manu 9c3b5e7aec Replace strlcpy by strncpy so that it builds again 2003-06-04 19:51:03 +00:00
manu b5c252e8af Build again with SA 2003-06-04 19:34:32 +00:00
manu 899161bdbc Added vm_copy 2003-06-03 20:09:37 +00:00
manu faba943220 Added IOHIDSystem properties (this is about keyboard mapping)
Also added a ssize arg to mach trap args so that trap handler are aware
of the sent packet size.
2003-06-03 06:48:47 +00:00
manu 1ea26aeafe + In ioframebuffer driver:
We try to map the console framebuffer through wsdisplay. It seems to work,
 but we still need to _see_ something.
XXX Framebuffer size discovery is borken.

+ In ioframebuffer and iohidsystem:
More methods and more debug for io_connect_method_*

+ A few new IOKit mach traps.
2003-05-22 22:07:36 +00:00
manu 0d9cf0359a Added io_connect_add_client 2003-05-22 18:10:19 +00:00
nakayama 10e7db6bab Avoid strict-ailas warnings in gcc 3.3;
refer to change of sys/compat/netbsd32/netbsd32_netbsd.c r1.67 to r1.69.
2003-05-17 01:35:54 +00:00
itojun 51110d0c20 use strlcpy
[compat/svr4_32 should have bound check for SVR4_32_AUX_ARGSIZ]
2003-05-16 14:36:30 +00:00
manu 1ab318ff2d We had ugly magic values in io_connect_method_scalari_scalaro and friends.
Peeking at Darwin's header files gives some ideas of what we are doing here.

We know understand most of the stuff called by XDarwin and WindowServer before
mapping the framebuffer.
2003-05-15 23:35:37 +00:00
manu da05e7b4d3 Added io_service_close and the io_connect_map_memory method for
ioframebuffer's shared meory (used to handle the cursor).

XDarwin and WindowServer now fail on framebuffer mapping.
2003-05-14 18:28:04 +00:00
manu f75cb60078 One more I/O flavor for the ioframebuffer driver. XDarwin now crashes
when it comes to map the cursor shared memory (accroding to the source,
next step will be mapping the framebuffer, we are getting closer)
2003-05-14 15:50:38 +00:00
manu 31b52bb7f2 More efforts on the XDarwin front. Introduce io_connect_method_scalari_structo
and io_connect_method_structi_structo. We don't know at all how this stuff
works, but at least we can imitate what Darwin does.
2003-05-14 14:41:04 +00:00
manu 962a6c7d59 Fix a bug in io_registry_entry_get_property: one of the field in the
return packet was wrong (port descriptor instead of VM area descriptor),
thus leading to SIGSEGV when calling IOKit's IOFBCreateSharedCursor().

Now this is fixed we can move forward again on graphic mode.
2003-05-13 20:48:16 +00:00
christos 7218f10c3c sort the ioctl's so we can see what we've implemented and what we have not. 2003-05-07 14:21:20 +00:00
manu 4c94241d26 Make io_iterator_reset working for device class itaerators 2003-04-30 18:38:19 +00:00
manu f8c2ac11e9 typo 2003-04-30 18:05:47 +00:00
manu 9a5720f8f0 Added io_iterator_reset (there is a nundocumented flag argument, no idea
of its use yet)
2003-04-30 07:32:16 +00:00
manu d46d73437c Added the map_memory method for the IOKit, plus an implementation
for the IOHIDSystem driver in Darwin. IOHIDSystem provides access
to user interface devices.

Communication between userspace and kernel is done through a shared
memory page. Our plan is to have a kernel thread waiting on wscons
events (for now it just does nothing), and have it feeding the
shared page.
2003-04-29 22:16:38 +00:00
manu 30bb8c56a7 More debug 2003-04-29 22:12:51 +00:00
manu cbfe387fcc swapped the words in lseek offset reassembly (that was was confused-endian)
Removed useless include that came from a copy/paste.
2003-04-20 14:36:05 +00:00
christos 962f5ffade try to get this to work for both endian machines. 2003-04-20 00:32:16 +00:00
manu 1368d826d9 Regen 2003-04-20 00:10:20 +00:00
manu beca0eff14 Fixed an ABI bug in lseek: NetBSD pads the syscallarg structure because of
the off_t argument, Darwin does not. In order to get the off_t  argument
going through our syscall machinery, we declare it as two long arguments,
and we reassemble it in darwin_sys_lseek.
2003-04-20 00:09:41 +00:00
manu aa5f0948ad Improved bahvior for map_fd. When Darin uses findspace = 0, this seems to
request a mapping at fixed address, overlaying previously existing mappings.

The overlay is done by unmapping (sys_munmap) before mapping at fixed
location. This makes XDarwin able to link and run.
2003-04-19 21:41:15 +00:00
dsl 01761b17f4 Remove unnecessary caddr_t casts 2003-04-16 19:20:33 +00:00
christos c56f7f428b get rid of the ASYNCMAP ioctls 2003-04-12 05:00:38 +00:00
thorpej 5051d1c544 Use PAGE_SIZE rather than NBPG. 2003-04-09 00:39:38 +00:00
oki fb4bbe16fc Regen. 2003-04-08 10:58:55 +00:00
oki 105a3bb543 Added missing syscalls from native syscalls.master. 2003-04-08 10:57:56 +00:00
manu 0479104b05 First attempt with task_suspend/task_resume, but we hit some bugs somewhere
else in our code.
2003-04-06 17:58:49 +00:00
jdolecek 1b18fee640 this info is now in doc/RESPONSIBLE 2003-04-06 10:13:07 +00:00
manu c74de80216 Implement task_info 2003-04-05 21:18:02 +00:00
manu acab734a9e Fix a few bugs and get a better notification support (A sample program
actually works)
2003-04-05 19:27:51 +00:00
he 0a34406c13 Fill the target st_qspare array with 0, the source field has been reclaimed
for other use by the UFS2 merge, and this is just a filler anyway.
2003-04-02 22:14:23 +00:00
thorpej d071d9a8d0 Use PAGE_SIZE rather than NBPG. 2003-04-01 15:02:05 +00:00