Commit Graph

20 Commits

Author SHA1 Message Date
manu 66fc5fb621 Empty shell for Darwin audit API 2004-07-28 22:24:06 +00:00
manu bc620e30a6 Added the utrace system call 2004-07-28 21:30:00 +00:00
manu 941b113c0e Add the sysctl that provides interface enumeration (used by getifaddrs()
library call). Programs such as ifconfig or XFree86 4.4 XDarwin use it.
The emulation is not complete, as ifconfig is not able to display inet6
addresses correctly.
2004-07-21 01:37:57 +00:00
manu 26200ee754 In MacOS X.3, the kernel maps tw opages of memory in every user process.
This areas is called the comm pages. It is used to provide fast access to
several data and functions.

The comm pages are mapped starting at 0xffff800 (address chosed so that
absolute branch can be used, so it can be accessed even when dynamic linking
is not ready). NetBSD has the user stack here, so we need to provide a
Darwin-specific stack setup routine which sets the top of the stack at
0xbfff0000.

This implementation is not complete but it does enough to get MacOS X.3
starting again (static binaries run, dynamic binaries still have an issue).
in the comm pages functions, we only implement bcopy, pthread_self and
memcpy.

TODO:
- clean up the powerpc specific code from MD parts
- for now we map only one page to avoid a crash, we want two pages.
- write all the comm functions.
2004-07-03 00:14:30 +00:00
manu 0dc13ccc05 Added the getattrlist system call. That was annoying. 2003-12-31 02:55:04 +00:00
manu 3c00d1aad5 Start to implement another strange feature: signals as Mach software
exceptions. This can be requested with ptrace, and cause signals to
be transformed into a particular kind of exception.
2003-11-20 07:12:34 +00:00
manu 53b35abfa2 Parent itarators in the IOKit emulation. A driver can only
have one parent yet (on Darwin, multiple parents are possible: the IOKit
seems to handle a graph more than a tree). Introfuction of a keyboard
driver parent for IOHIDSystem.

The kernel keymapping is still a big mystery.
2003-11-01 00:32:44 +00:00
manu e0a2c17b59 Correctly translate dev_t in stat/fstat/lstat 2003-09-06 11:18:03 +00:00
manu fcd3e861d0 Implement Darwin's FIODTYPE ioctl (get a file d_type) 2003-09-03 07:28:38 +00:00
manu c4c193473f correct translation for struct statfs in getfsstat, ststfs and fstatfs 2003-09-02 21:31:01 +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 ca120fe1a2 Match IOHIDSystem and IOFramebuffer request in the IOKit and handle them in
Darwin specific files. The handler does nothing yet.

This needs some improvement. Darwin attaches an IOHIDSystem device to
each human-interface device in the tree: mouse, keyboard, and a few others.
For now we only emulate one IOHIDSystem device.
2003-02-16 15:02:05 +00:00
manu 9f6565f2bd A working fork/vfork implementation. Darwin fork differs from our fork by
two ways:
- the child gets its pid as retval[0] (userland stub will turn it into a 0),
retval[1] is 1 and it is 0 in the parent.
- in the child, the fork syscall is successful, hence we must skip the next
instruction.
2002-12-08 21:53:10 +00:00
manu 3b0f6d78ed Introduce BSD system calls with alternate patch checking (in /emul) in
compat/common, so that they can be shared by several emulations, and use
them for Darwin.

This removes the ugly dependance on FreeBSD freebsd_file.c for COMPAT_DARWIN
2002-12-08 00:50:23 +00:00
manu 53356d6169 Added an empty shell for signal delivery. Now we just have to fill the
machine dependant bits.
2002-11-25 22:25:12 +00:00
manu 1ee1245718 Add support for two Darwin sysctl 2002-11-23 02:18:53 +00:00
manu 7d02c9fff8 Implement mach_sys_load_shared_file. This are not complete yet, especially
wrt to the flags, but at least it does relocations.
2002-11-17 02:46:24 +00:00
christos 7ae22e4da5 it is not kosher to include the same file twice. 2002-11-15 16:10:51 +00:00
manu 897d942130 Use FreeBSD emulation to get pathname lookups in /emul/darwin. These FreeBSD
emulated system call just check in /emul and call the native system call.
2002-11-14 21:47:15 +00:00
manu 530968e795 The kernel now builds with COMPAT_DARWIN. 2002-11-12 23:40:19 +00:00