Commit Graph

25 Commits

Author SHA1 Message Date
christos f9ddf42b17 the host basic info belongs with the cpu.
attempt to make the semaphore traps work, by doing nothing.
2002-11-14 19:44:06 +00:00
manu 114cae0e54 Fix the stack layout on program startup. This should be:
(8 bytes boundary) PAGE_SIZE   argc    argv  .... envp
2002-11-12 19:01:18 +00:00
manu f130f7a839 In mach_reply_port, don't increment the returned port for now, this confuses
the binary on the second launch.
In mach_vm_map, hack in a failure so that we fail exactly like Darwin when
mapping a page at address 0
Add vm_allocate trap
2002-11-12 06:14:39 +00:00
manu 3eb20e3576 mach_ports_lookup allocate one page of memory and returns its address.
On error, most traps return a short packet with just an error code, emulate
this correctly.
2002-11-12 05:18:31 +00:00
manu d56caea9ae - Cleanup msg bits and trailer values
- a few dumb bug fixes
2002-11-11 09:28:00 +00:00
manu 293d243256 Introduce a better error reporting, using mach error codes
It seems there is no need to use dynamic allocation in mach_host_info.
2002-11-11 01:18:44 +00:00
manu 38455f4db0 The message id of replies is simply the message id of the request plus 100... 2002-11-10 22:05:35 +00:00
manu 556831bae9 More mach traps:
mach_port_deallocate, task_get_special_port, mach_ports_lookup,
vm_deallocate, vm_map, host_get_clock_service.
2002-11-10 21:53:40 +00:00
manu e9adbe1e47 Added mach_sys_msg_trap system call, and the host_page_size trap. 2002-11-10 09:41:45 +00:00
manu 4855282dc6 Implment one command of the host_info mach trap, which check for mach_msg_trap
availability
2002-11-10 02:18:03 +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
jdolecek 81d274c850 make compile without DEBUG_MACH 2002-11-01 20:04:40 +00:00
jdolecek 1524c4bf08 set struct emul's nsysent to compat SYS_NSYSENT, not SYS_MAXSYSCALL 2002-11-01 19:26:21 +00:00
christos 1e48015df9 more debugging for the overwrite trap. 2002-10-30 15:04:17 +00:00
manu e5620d742d KNF 2002-10-27 22:22:04 +00:00
manu 998f955471 Inaccurate comment fixed: This is not about SVR4, it's Mach 2002-10-27 21:41:51 +00:00
manu 80ee637534 - Introduce a e_fault field in struct proc to provide emulation specific
memory fault handler. IRIX uses irix_vm_fault, and all other emulation
use NULL, which means to use uvm_fault.

- While we are there, explicitely set to NULL the uninitialized fields in
struct emul: e_fault and e_sysctl on most ports

- e_fault is used by the trap handler, for now only on mips. In order to avoid
intrusive modifications in UVM, the function pointed by e_fault does not
has exactly the same protoype as uvm_fault:
int uvm_fault __P((struct vm_map *, vaddr_t, vm_fault_t, vm_prot_t));
int e_fault __P((struct proc *, vaddr_t, vm_fault_t, vm_prot_t));

- In IRIX share groups, all the VM space is shared, except one page.
This bounds us to have different VM spaces and synchronize modifications
to the VM space accross share group members. We need an IRIX specific hook
to the page fault handler in order to propagate VM space modifications
caused by page faults.
2002-09-21 21:14:54 +00:00
christos 830c5c171a Implement passing AT_{E,R}{U,G}ID in the elf aux vector, like solaris.
- pass struct proc to copyargs.
- eliminate svr4_copyargs, since it is the same as ours now.
2002-08-26 21:05:59 +00:00
elric 0260906a88 Fixed compiler warnings that would occur if DEBUG_MACH was not defined. 2001-12-18 19:43:24 +00:00
lukem dab6ef8b56 add RCSIDs (including regeneration of files as appropriate) 2001-11-13 02:07:52 +00:00
christos 2a64b3cc60 use the copy of path stashed in pack->ep_emul_arg and free it.
also don't allocate the emul path, because it is causing a memory leak.
2001-10-28 04:47:27 +00:00
jdolecek ef8abe0767 Make the setregs hook emulation-specific, rather than executable
format specific.
Struct emul has a e_setregs hook back, which points to emulation-specific
setregs function. es_setregs of struct execsw now only points to
optional executable-specific setup function (this is only used for
ECOFF).
2001-09-18 19:36:32 +00:00
christos 781411d393 adjust to the new copyargs footprint and cleanup debugging. 2001-07-29 21:26:07 +00:00
christos d5dfcf76de a bit more mach glue. 2001-07-29 19:30:56 +00:00
christos 6f12096732 add a shell that does nothing for now for the mach syscalls. 2001-07-14 02:10:59 +00:00