Commit Graph

12 Commits

Author SHA1 Message Date
manu 5ba396cfb3 Added support for exchange of Mach messages between processes.
This does not buy us new functionnality for now, because we still have to
discover how mach_init (which acts as a name server, enabling processes to
discover each other's ports) is able to receive messages from other processes
(this is a bootstrap problem, and the bootstrap port might be the place to
search).

While we are there:
- removed a lot of debug which is now available using ktrace.
- reworked message handling to avoid mutliple copyin/copyout of the
same data. ktrace of Mach message now uses the in-kernel copy of the
message instead of copying it from userland.
- packed mach trap handlers arguments into a structure to avoid modifying
everything next time we have to add an argument.
2002-12-17 18:42:54 +00:00
manu b8a9df5e21 FIrst attempt at mach ports and rights, which are needed if we ever want
to implement messages between kernel and userland.
While we are there, cleanup some debug messages.
2002-12-15 00:40:24 +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
manu 9e08cf7d46 Remove debug printf (now ktrace does the job) 2002-12-09 21:53:28 +00:00
manu 6492e2171f Added support for dumping mach messages in ktrace/kdump. While we are
there, KNFify a few functions.
2002-12-09 21:29:20 +00:00
manu 0f239dc026 Check for alternate receive buffer for mach_msg_overwrite_trap
Check for target buffer length, and fail if it is too short
Move mach_msg_trap and mach_msg_overwrite_trap to their own file
Remove some useless debug messages now we have ktrace
Remove __P()
2002-11-28 21:21:32 +00:00
manu 11aa9ca2f6 Add thread_policy and clock_get_time mach traps. Implement
mach_sys_clock_sleep_trap. This makes sleep(3) emulation working.
2002-11-26 08:10:14 +00:00
christos b165b2e229 improve on debugging. 2002-11-14 21:17:30 +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 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