minix/lib/libc/arch/i386/sys-minix/_ipc.S
Ben Gras 2fe8fb192f Full switch to clang/ELF. Drop ack. Simplify.
There is important information about booting non-ack images in
docs/UPDATING. ack/aout-format images can't be built any more, and
booting clang/ELF-format ones is a little different. Updating to the
new boot monitor is recommended.

Changes in this commit:

	. drop boot monitor -> allowing dropping ack support
	. facility to copy ELF boot files to /boot so that old boot monitor
	  can still boot fairly easily, see UPDATING
	. no more ack-format libraries -> single-case libraries
	. some cleanup of OBJECT_FMT, COMPILER_TYPE, etc cases
	. drop several ack toolchain commands, but not all support
	  commands (e.g. aal is gone but acksize is not yet).
	. a few libc files moved to netbsd libc dir
	. new /bin/date as minix date used code in libc/
	. test compile fix
	. harmonize includes
	. /usr/lib is no longer special: without ack, /usr/lib plays no
	  kind of special bootstrapping role any more and bootstrapping
	  is done exclusively through packages, so releases depend even
	  less on the state of the machine making them now.
	. rename nbsd_lib* to lib*
	. reduce mtree
2012-02-14 14:52:02 +01:00

80 lines
2 KiB
ArmAsm

#include <minix/ipcconst.h>
#include <machine/asm.h>
IPCVEC = 33 /* ipc trap to kernel */
KERVEC = 32 /* syscall trap to kernel */
SRC_DST = 8 /* source/ destination process */
MESSAGE = 12 /* message pointer */
STATUS = 16 /* status pointer */
/**========================================================================* */
/* IPC assembly routines * */
/**========================================================================* */
/* all message passing routines save ebx, but destroy eax and ecx. */
ENTRY(_send)
push %ebp
movl %esp, %ebp
push %ebx
movl SRC_DST(%ebp), %eax /* eax = dest-src */
movl MESSAGE(%ebp), %ebx /* ebx = message pointer */
movl $SEND, %ecx /* _send(dest, ptr) */
int $IPCVEC /* trap to the kernel */
pop %ebx
pop %ebp
ret
ENTRY(_receive)
push %ebp
movl %esp, %ebp
push %ebx
movl SRC_DST(%ebp), %eax /* eax = dest-src */
movl MESSAGE(%ebp), %ebx /* ebx = message pointer */
movl $RECEIVE, %ecx /* _receive(src, ptr) */
int $IPCVEC /* trap to the kernel */
movl STATUS(%ebp), %ecx /* ecx = status pointer */
movl %ebx, (%ecx)
pop %ebx
pop %ebp
ret
ENTRY(_sendrec)
push %ebp
movl %esp, %ebp
push %ebx
movl SRC_DST(%ebp), %eax /* eax = dest-src */
movl MESSAGE(%ebp), %ebx /* ebx = message pointer */
movl $SENDREC, %ecx /* _sendrec(srcdest, ptr) */
int $IPCVEC /* trap to the kernel */
pop %ebx
pop %ebp
ret
ENTRY(_notify)
push %ebp
movl %esp, %ebp
push %ebx
movl SRC_DST(%ebp), %eax /* eax = destination */
movl $NOTIFY, %ecx /* _notify(srcdst) */
int $IPCVEC /* trap to the kernel */
pop %ebx
pop %ebp
ret
ENTRY(_sendnb)
push %ebp
movl %esp, %ebp
push %ebx
movl SRC_DST(%ebp), %eax /* eax = dest-src */
movl MESSAGE(%ebp), %ebx /* ebx = message pointer */
movl $SENDNB, %ecx /* _sendnb(dest, ptr) */
int $IPCVEC /* trap to the kernel */
pop %ebx
pop %ebp
ret
ENTRY(_do_kernel_call)
/* pass the message pointer to kernel in the %eax register */
movl 4(%esp), %eax
int $KERVEC
ret