manu
98bc8767ae
Bug fixes:
...
- In case of ailure in the child, kill the child and wakeup the parent
- Do call child_return
- The src and dst args were mixed up when copying regs 0-31 to the trapframe
This makes pthread_create(3) fully working (test program works).
2002-12-12 08:23:27 +00:00
manu
66a29c52af
Added a few Mach traps: mach_boostrap_register, mach_port_set_attributes,
...
mach_port_move_member, mach_port_set_attributes, mach_task_set_special_port,
(none do anything)
Added mach_thread_create_running, which creates a new Mach thread. It
provides the register context of the new thread. We use it in a child
function provided to fork1(). The child function is machine dependent and
is not yet implemented for i386.
The new thread crashes quickly, but at least it starts.
2002-12-12 00:29:23 +00:00
thorpej
e8cc3884de
Rename __LDPGSZ to AOUT_LDPGSZ, to accurately reflect what it is.
2002-12-10 17:14:02 +00:00
thorpej
78ea2dd367
Use __LDPGSZ (which must be == USRTEXT) as the text address for a.out
...
executables, and eliminate the USRTEXT constant, which was only used
by the a.out exec code.
2002-12-10 05:14:24 +00:00
scw
67d6f49379
Changes/additions to support evbppc.
2002-12-09 12:28:12 +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
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