Commit Graph

804 Commits

Author SHA1 Message Date
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
thorpej
a13469e728 Revert my previous GCC 3.3-related changes; GCC 3.3 has been fixed
to handle our stdarg/varargs ABI for PowerPC.
2002-12-04 17:42:51 +00:00
manu
a9a3da8aca The recent mach trap support caused indirect system calls (a la syscall(2))
to be incorectly recorded as 'syscall'. Fix this.
2002-11-29 11:56:36 +00:00
manu
508a5615a6 Build the beast again after siginfo changes 2002-11-29 00:04:03 +00:00
manu
dfa96ff4b3 Add signal delivery for the PowerPC. Everything is implemented except siginfo.
The stack layout is observed from stack dumps on Darwin, so it should be
very accurate.
2002-11-26 23:54:09 +00:00
manu
edff1c8d0a There is too much debugging, it's getting annoying. Let's remove some. 2002-11-26 23:48:44 +00:00
lukem
0635de35a3 Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more. 2002-11-26 23:30:07 +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
thorpej
b65c7c5437 Avoid strict-alias warnings. 2002-11-25 05:37:00 +00:00
thorpej
2e9c89031c Statements after labels. 2002-11-25 05:11:32 +00:00
thorpej
35a57313da Use tlbrelo and tlbrehi. 2002-11-25 05:10:39 +00:00
thorpej
54dbc0eab3 Avoid strict-alias warnings. 2002-11-25 02:46:10 +00:00
thorpej
113c35cbf2 Remove an unnecessary token-paste, as pointed out by GCC 3.3. 2002-11-25 02:45:46 +00:00
thorpej
3151023170 Remove redundant (and incorrect) extern decl. 2002-11-25 02:07:37 +00:00
thorpej
796aa6a84a Statements after labels. 2002-11-25 02:06:16 +00:00
thorpej
3911a545e1 No newlines in string constants. 2002-11-25 01:36:35 +00:00
thorpej
6fd88f0e65 Avoid a trigraph. 2002-11-25 01:33:51 +00:00
thorpej
11707809eb No newlines in string constants. 2002-11-25 01:31:12 +00:00
thorpej
0eb35ef834 Instrument FP emulation traps. 2002-11-24 17:34:06 +00:00
thorpej
baf5c58201 Use EVCNT_TYPE_TRAP. 2002-11-24 17:05:45 +00:00
thorpej
02c69e5261 Put interface attributes on the device, not another attribute with
the same name as the device.
2002-11-23 19:42:41 +00:00
manu
c6cc98345b Correctly report the CPU type in Mach host_info(BASIC_INFO) 2002-11-17 01:24:03 +00:00
manu
93df539f73 As we use one FreeBSD file for COMPAT_DARWIN, we must include file.freebsd 2002-11-17 00:59:13 +00:00
manu
a26a564e59 Implment map_fd mach trap
Fix host_info(BASIC_INFO) which was broken wrt to the number of field
returned.
2002-11-16 20:00:29 +00:00
manu
e7cfdc3995 Darwin skips the next instruction after a successful system call. Strange
world.
2002-11-15 23:19:22 +00:00
manu
3fc8f36b8d Make it build again 2002-11-15 21:48:06 +00:00
manu
d584ed9598 Add a realcode argument to trace_enter and ktrsyscall. realcode is the
original system call number, which can be negative for a Mach trap.
We cannot just replace code by realcode, because ktrsyscall uses it as
an index in the system call table, thus crashing the kernel when the
value is negative.
2002-11-15 20:06:00 +00:00
christos
1a546a91c0 get the cpu basic info. 2002-11-14 19:44:36 +00:00
matt
da584e2f99 If MULTIPROCESSOR, just accept the penalties of doing BAT flipping when
syncing the icache.
2002-11-13 21:08:50 +00:00
matt
3a5d673363 Change syscall to bound code so that systrace and ktrace won't fall off
the end of a table.   XXX this is wrong since code does not indicate the
sysent table for which code was used as an index.
2002-11-13 09:36:10 +00:00
matt
9cf475322b Do kernel non-USER_SR pte spilling regardless of interrupt count. Only do
kernel USER_SR spillage if interrupt depth is 0.
2002-11-13 09:33:20 +00:00
manu
530968e795 The kernel now builds with COMPAT_DARWIN. 2002-11-12 23:40:19 +00:00
jdolecek
2ba45545df back previous off; don't install macho_machdep.h 2002-11-04 15:27:15 +00:00
matt
85529376d3 Get rid of nsysent. Use EMULNAMEU to use the appropriate constant.
Revamp the mach_syscall_dispatch function to be much simplier (pass in
a syscall code and return a const struct sysent * pointer).
2002-11-04 00:01:02 +00:00
manu
873ed6f9ee Added support for Darwin's PowerPC-only system calls:
ppccalls, with system call numbers starting at 0x6000
fasttraps, with system call numbers starting at 0x7FF0

Because the Mach system call dispatching code has grown a bit
too much, introduce an inline function to handle it (mach_syscall_dispatch).

While we are there, remove the Mach and Linux includes from
arch/powerpc/powerpc/syscall.c and push them into
arch/powerpc/powerpc/{mach|linux}_syscall.c
2002-11-03 23:17:18 +00:00
matt
6d54e503b3 LP64 changes (copied from mips and changed CHAR_MIN/MAX to 0/0xffU). 2002-11-03 22:55:24 +00:00
matt
c89494d09b Change _MACHINE_foo_H_ to _POWERPC_foo_H_ 2002-11-03 22:36:22 +00:00
matt
6dc0eb390f Add LP64 bits (copied from MIPS). 2002-11-03 22:35:33 +00:00
matt
0d380378cf Add LP64 limits. 2002-11-03 22:23:59 +00:00
jdolecek
80f0f798bc back previous revision 1.9 off - compat code was changed to set
struct emul e_nsysent to *SYS_NSYSENT now, and the mask is more efficient
2002-11-02 07:37:33 +00:00
matt
71416f6690 In struct emul, e_nsysent is *not* initialized to *SYS_NSYSENT but
*SYS_MAXSYSCALL.  Adjust to this and simply compare 'code' to it instead
of doing the p-o-2 dance.
2002-11-01 00:02:40 +00:00
matt
1cec255a41 Move child_return back to syscall.c
Fix syscall to use emulations SYS_syscall/SYS___syscall definitions.
Use the emulation NSYSENT to limit code.
Don't define *syscall_fancy if it will never be used.
2002-10-30 18:34:15 +00:00
manu
6224b0c0ce Fixed mistakes 2002-10-30 07:39:40 +00:00
manu
fddf44c0bf Add COMPAT_MACH and EXEC_MACHO support on the PowerPC 2002-10-30 06:41:45 +00:00
manu
a3da524774 Prepare syscall.c for COMPAT_MACH support. linux_syscall_intern is
moved to a Linux specific file, child_return is moved to trap.c,
and we introduce a EMULNAME macro co that syscall.c can be included to
define the system call handler for another emulation.
2002-10-30 06:37:37 +00:00
manu
fe4e91080d Moved binary compatibility options from arch directory to cpu directory 2002-10-30 06:26:42 +00:00
manu
f9cac3b168 Changed the ifndef guard of this header file from _MACH_EXEC_H_ to
_POWERPC_AOUT_EXEC_H_. The former was conflicting with
<compat/mach/mach_exec.h>.
2002-10-28 18:00:40 +00:00
thorpej
4b68c83f09 Make these work with GCC 3.x. 2002-10-25 20:46:44 +00:00
jdolecek
e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
chs
4017fd1809 fix two bugs in the previous PTE-spill handling changes:
- in pmap_pte_spill(), the victim PTE could be using the secondary hash,
   in which case its pvo entry is actually in the other bucket.  use the
   correct bucket for the victim pvo when moving it to the front of its list.
 - similarly, in pmap_pvo_remove(), if the pteidx is pre-computed for us,
   it might actually point to the other bucket if the entry is using the
   secondary hash.  adjust ptegidx if this is the case.

these should fix PRs 18645 and 18736.
while I'm here, wrap line lines and do some other misc cleanup.
2002-10-22 04:34:13 +00:00