1$NetBSD: README.mach-traps,v 1.3 2001/06/04 20:06:41 nathanw Exp $
2
3Some Alpha AXP OSF/1 binaries directly use the facilities provided by
4the Mach kernel that is the basis for OSF/1.  These include (but are
5surely not limited to) 'dd', 'ps', and 'w'.
6
7Invariably, the symptom that these binaries display is that they crash
8with an "unimplemented system call" trap (SIGSYS signal) for a syscall
9that has a negative number.  In general, binaries that use the Mach
10syscalls appear to invoke task_self() as their first syscall.
11
12Note that system call numbers are now range-bounded by masking off the
13high bits, so negative system call numbers will appear in the high
14end of the system call number range, thanks to the wonders of two's
15compliment arithmetic. System call -10, for example, will appear as
16"CALL  [502]" in kdump output.
17
18The name, number, and number of arguments for each Mach syscall is
19given below; this information was gleaned by looking through the OSF/1
20libmach.a's object files with dbx, then double-checked against the
21contents of OSF/1's <mach/syscall_sw.h>.
22
23These calls would be very difficult to implement properly in the
24OSF/1 emulation code; by its very nature, NetBSD is not Mach, and we
25don't and can't provide the underlying facilities that it does.
26
27-- cgd
28
29trap name			number	nargs	notes
30---- ----			------	-----	-----
31task_self			-10	0
32thread_reply			-11	0
33task_notify			-12	0
34thread_self			-13	0
35msg_send_old			-14	3
36msg_receive_old			-15	3
37msg_rpc_old			-16	5
38msg_send_trap			-20	4
39msg_receive_trap		-21	5
40msg_rpc_trap			-22	6
41lw_wire				-30	3
42lw_unwire			-31	1
43nxm_task_init			-33	2
44nxm_sched_thread		-34	1
45nxm_idle			-35	1
46nxm_wakeup_idle			-36	1
47nxm_set_pthid			-37	2
48nxm_thread_kill			-38	2
49nxm_thread_block		-39	1
50nxm_thread_wakeup		-40	1
51inode_swap_preference		-40	3	old call?
52init_process			-41	0
53map_fd				-43	5
54nxm_resched			-44	2
55htg_unix_syscall		-52	3
56host_self			-55	1
57host_priv_self			-56	1
58swtch_pri			-59	1
59swtch				-60	0
60thread_switch			-61	3
61semop_fast			-62	4
62mach_sctimes_0			-70	0	only if MACH_SCTIMES defined
63mach_sctimes_1			-71	1	only if MACH_SCTIMES defined
64mach_sctimes_2			-72	2	only if MACH_SCTIMES defined
65mach_sctimes_3			-73	3	only if MACH_SCTIMES defined
66mach_sctimes_4			-74	4	only if MACH_SCTIMES defined
67mach_sctimes_5			-75	5	only if MACH_SCTIMES defined
68mach_sctimes_6			-76	6	only if MACH_SCTIMES defined
69mach_sctimes_7			-77	0	only if MACH_SCTIMES defined
70mach_sctimes_8			-78	6	only if MACH_SCTIMES defined
71mach_sctimes_9			-79	1	only if MACH_SCTIMES defined
72mach_sctimes_10			-80	2	only if MACH_SCTIMES defined
73mach_sctimes_11			-81	2	only if MACH_SCTIMES defined
74mach_sctimes_port_alloc_dealloc	-82	1	only if MACH_SCTIMES defined
75