2012-08-28 19:34:08 +02:00
|
|
|
#include <minix/ipcconst.h>
|
|
|
|
#include <machine/asm.h>
|
|
|
|
|
|
|
|
/**========================================================================* */
|
|
|
|
/* IPC assembly routines * */
|
|
|
|
/**========================================================================* */
|
2013-11-01 13:34:14 +01:00
|
|
|
ENTRY(_ipc_send_intr)
|
2012-08-28 19:34:08 +02:00
|
|
|
push {fp}
|
|
|
|
mov fp, sp
|
|
|
|
mov r2, r1 /* r2 = msg ptr */
|
|
|
|
mov r1, r0 /* r1 = src_dest */
|
2013-11-01 13:34:14 +01:00
|
|
|
mov r0, #SEND /* _ipc_send(dest, ptr) */
|
|
|
|
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
|
2012-08-28 19:34:08 +02:00
|
|
|
svc #0 /* trap to kernel */
|
|
|
|
pop {fp}
|
|
|
|
bx lr
|
|
|
|
|
2013-11-01 13:34:14 +01:00
|
|
|
ENTRY(_ipc_receive_intr)
|
2012-08-28 19:34:08 +02:00
|
|
|
push {fp}
|
|
|
|
mov fp, sp
|
|
|
|
push {r2} /* save status ptr */
|
|
|
|
mov r2, r1 /* r2 = msg ptr */
|
|
|
|
mov r1, r0 /* r1 = src_dest */
|
2013-11-01 13:34:14 +01:00
|
|
|
mov r0, #RECEIVE /* _ipc_receive(src, ptr) */
|
|
|
|
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
|
2012-08-28 19:34:08 +02:00
|
|
|
svc #0 /* trap to kernel */
|
|
|
|
pop {r2} /* restore status ptr */
|
|
|
|
str r1, [r2]
|
|
|
|
pop {fp}
|
|
|
|
bx lr
|
|
|
|
|
2013-11-01 13:34:14 +01:00
|
|
|
ENTRY(_ipc_sendrec_intr)
|
2012-08-28 19:34:08 +02:00
|
|
|
push {fp}
|
|
|
|
mov fp, sp
|
|
|
|
mov r2, r1 /* r2 = msg ptr */
|
|
|
|
mov r1, r0 /* r1 = src_dest */
|
2013-11-01 13:34:14 +01:00
|
|
|
mov r0, #SENDREC /* _ipc_sendrec(srcdest, ptr) */
|
|
|
|
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
|
2012-08-28 19:34:08 +02:00
|
|
|
svc #0 /* trap to kernel */
|
|
|
|
pop {fp}
|
|
|
|
bx lr
|
|
|
|
|
2013-11-01 13:34:14 +01:00
|
|
|
ENTRY(_ipc_notify_intr)
|
2012-08-28 19:34:08 +02:00
|
|
|
push {fp}
|
|
|
|
mov fp, sp
|
2013-11-01 13:34:14 +01:00
|
|
|
mov r1, r0 /* r1 = src_dest */
|
|
|
|
mov r0, #NOTIFY /* _ipc_notify(srcdst) */
|
|
|
|
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
|
2012-08-28 19:34:08 +02:00
|
|
|
svc #0 /* trap to kernel */
|
|
|
|
pop {fp}
|
|
|
|
bx lr
|
|
|
|
|
2013-11-01 13:34:14 +01:00
|
|
|
ENTRY(_ipc_sendnb_intr)
|
2012-08-28 19:34:08 +02:00
|
|
|
push {fp}
|
|
|
|
mov fp, sp
|
2013-11-01 13:34:14 +01:00
|
|
|
mov r2, r1 /* r2 = msg ptr */
|
2012-08-28 19:34:08 +02:00
|
|
|
mov r1, r0 /* r1 = src_dest */
|
2013-11-01 13:34:14 +01:00
|
|
|
mov r0, #SENDNB /* _ipc_sendnb(dest, ptr) */
|
|
|
|
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
|
2012-08-28 19:34:08 +02:00
|
|
|
svc #0 /* trap to kernel */
|
|
|
|
pop {fp}
|
|
|
|
bx lr
|
|
|
|
|
2013-11-01 13:34:14 +01:00
|
|
|
ENTRY(_ipc_senda_intr)
|
2012-08-28 19:34:08 +02:00
|
|
|
push {fp}
|
|
|
|
mov fp, sp
|
2013-11-01 13:34:14 +01:00
|
|
|
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 */
|
2012-08-28 19:34:08 +02:00
|
|
|
svc #0 /* trap to kernel */
|
|
|
|
pop {fp}
|
|
|
|
bx lr
|
|
|
|
|