minix/lib/libc/arch/arm/sys-minix/_ipc.S
Lionel Sambuc c3fc9df84a Adding ipc_ prefix to ipc primitives
* Also change _orig to _intr for clarity
 * Cleaned up {IPC,KER}VEC
 * Renamed _minix_kernel_info_struct to get_minix_kerninfo
 * Merged _senda.S into _ipc.S
 * Moved into separate files get_minix_kerninfo and _do_kernel_call
 * Adapted do_kernel_call to follow same _ convention as ipc functions
 * Drop patches in libc/net/send.c and libc/include/namespace.h

Change-Id: If4ea21ecb65435170d7d87de6c826328e84c18d0
2014-03-01 09:05:01 +01:00

75 lines
2 KiB
ArmAsm

#include <minix/ipcconst.h>
#include <machine/asm.h>
/**========================================================================* */
/* IPC assembly routines * */
/**========================================================================* */
ENTRY(_ipc_send_intr)
push {fp}
mov fp, sp
mov r2, r1 /* r2 = msg ptr */
mov r1, r0 /* r1 = src_dest */
mov r0, #SEND /* _ipc_send(dest, ptr) */
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
svc #0 /* trap to kernel */
pop {fp}
bx lr
ENTRY(_ipc_receive_intr)
push {fp}
mov fp, sp
push {r2} /* save status ptr */
mov r2, r1 /* r2 = msg ptr */
mov r1, r0 /* r1 = src_dest */
mov r0, #RECEIVE /* _ipc_receive(src, ptr) */
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
svc #0 /* trap to kernel */
pop {r2} /* restore status ptr */
str r1, [r2]
pop {fp}
bx lr
ENTRY(_ipc_sendrec_intr)
push {fp}
mov fp, sp
mov r2, r1 /* r2 = msg ptr */
mov r1, r0 /* r1 = src_dest */
mov r0, #SENDREC /* _ipc_sendrec(srcdest, ptr) */
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
svc #0 /* trap to kernel */
pop {fp}
bx lr
ENTRY(_ipc_notify_intr)
push {fp}
mov fp, sp
mov r1, r0 /* r1 = src_dest */
mov r0, #NOTIFY /* _ipc_notify(srcdst) */
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
svc #0 /* trap to kernel */
pop {fp}
bx lr
ENTRY(_ipc_sendnb_intr)
push {fp}
mov fp, sp
mov r2, r1 /* r2 = msg ptr */
mov r1, r0 /* r1 = src_dest */
mov r0, #SENDNB /* _ipc_sendnb(dest, ptr) */
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
svc #0 /* trap to kernel */
pop {fp}
bx lr
ENTRY(_ipc_senda_intr)
push {fp}
mov fp, sp
mov r2, r0 /* r2 = table */
/* r1 already holds count */
mov r0, #SENDA /* _ipc_senda(table, count) */
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
svc #0 /* trap to kernel */
pop {fp}
bx lr