xref: /minix3/minix/lib/libc/arch/arm/sys/_ipc.S (revision 433d6423c39e34ec4b79c950597bb2d236f886be)
1*433d6423SLionel Sambuc#include <minix/ipcconst.h>
2*433d6423SLionel Sambuc#include <machine/asm.h>
3*433d6423SLionel Sambuc
4*433d6423SLionel Sambuc/**========================================================================* */
5*433d6423SLionel Sambuc/*                           IPC assembly routines			  * */
6*433d6423SLionel Sambuc/**========================================================================* */
7*433d6423SLionel SambucENTRY(_ipc_send_intr)
8*433d6423SLionel Sambuc	push	{fp}
9*433d6423SLionel Sambuc	mov	fp, sp
10*433d6423SLionel Sambuc	mov	r2, r1       /* r2 = msg ptr */
11*433d6423SLionel Sambuc	mov	r1, r0       /* r1 = src_dest */
12*433d6423SLionel Sambuc	mov	r0, #SEND    /* _ipc_send(dest, ptr) */
13*433d6423SLionel Sambuc	mov	r3, #IPCVEC_INTR  /* r3 determines the SVC type */
14*433d6423SLionel Sambuc	svc	#0           /* trap to kernel */
15*433d6423SLionel Sambuc	pop	{fp}
16*433d6423SLionel Sambuc	bx	lr
17*433d6423SLionel Sambuc
18*433d6423SLionel SambucENTRY(_ipc_receive_intr)
19*433d6423SLionel Sambuc	push	{fp}
20*433d6423SLionel Sambuc	mov	fp, sp
21*433d6423SLionel Sambuc	push	{r2}         /* save status ptr */
22*433d6423SLionel Sambuc	mov	r2, r1       /* r2 = msg ptr */
23*433d6423SLionel Sambuc	mov	r1, r0       /* r1 = src_dest */
24*433d6423SLionel Sambuc	mov	r0, #RECEIVE /* _ipc_receive(src, ptr) */
25*433d6423SLionel Sambuc	mov	r3, #IPCVEC_INTR  /* r3 determines the SVC type */
26*433d6423SLionel Sambuc	svc	#0           /* trap to kernel */
27*433d6423SLionel Sambuc	pop	{r2}         /* restore status ptr */
28*433d6423SLionel Sambuc	str	r1, [r2]
29*433d6423SLionel Sambuc	pop	{fp}
30*433d6423SLionel Sambuc	bx	lr
31*433d6423SLionel Sambuc
32*433d6423SLionel SambucENTRY(_ipc_sendrec_intr)
33*433d6423SLionel Sambuc	push	{fp}
34*433d6423SLionel Sambuc	mov	fp, sp
35*433d6423SLionel Sambuc	mov	r2, r1       /* r2 = msg ptr */
36*433d6423SLionel Sambuc	mov	r1, r0       /* r1 = src_dest */
37*433d6423SLionel Sambuc	mov	r0, #SENDREC /* _ipc_sendrec(srcdest, ptr) */
38*433d6423SLionel Sambuc	mov	r3, #IPCVEC_INTR  /* r3 determines the SVC type */
39*433d6423SLionel Sambuc	svc	#0           /* trap to kernel */
40*433d6423SLionel Sambuc	pop	{fp}
41*433d6423SLionel Sambuc	bx	lr
42*433d6423SLionel Sambuc
43*433d6423SLionel SambucENTRY(_ipc_notify_intr)
44*433d6423SLionel Sambuc	push	{fp}
45*433d6423SLionel Sambuc	mov	fp, sp
46*433d6423SLionel Sambuc	mov	r1, r0       /* r1 = src_dest */
47*433d6423SLionel Sambuc	mov	r0, #NOTIFY  /* _ipc_notify(srcdst) */
48*433d6423SLionel Sambuc	mov	r3, #IPCVEC_INTR  /* r3 determines the SVC type */
49*433d6423SLionel Sambuc	svc	#0           /* trap to kernel */
50*433d6423SLionel Sambuc	pop	{fp}
51*433d6423SLionel Sambuc	bx	lr
52*433d6423SLionel Sambuc
53*433d6423SLionel SambucENTRY(_ipc_sendnb_intr)
54*433d6423SLionel Sambuc	push	{fp}
55*433d6423SLionel Sambuc	mov	fp, sp
56*433d6423SLionel Sambuc	mov	r2, r1       /* r2 = msg ptr */
57*433d6423SLionel Sambuc	mov	r1, r0       /* r1 = src_dest */
58*433d6423SLionel Sambuc	mov	r0, #SENDNB  /* _ipc_sendnb(dest, ptr) */
59*433d6423SLionel Sambuc	mov	r3, #IPCVEC_INTR  /* r3 determines the SVC type */
60*433d6423SLionel Sambuc	svc	#0           /* trap to kernel */
61*433d6423SLionel Sambuc	pop	{fp}
62*433d6423SLionel Sambuc	bx	lr
63*433d6423SLionel Sambuc
64*433d6423SLionel SambucENTRY(_ipc_senda_intr)
65*433d6423SLionel Sambuc	push	{fp}
66*433d6423SLionel Sambuc	mov	fp, sp
67*433d6423SLionel Sambuc	mov	r2, r0       /* r2 = table */
68*433d6423SLionel Sambuc	/* r1 already holds count */
69*433d6423SLionel Sambuc	mov	r0, #SENDA   /* _ipc_senda(table, count) */
70*433d6423SLionel Sambuc	mov	r3, #IPCVEC_INTR  /* r3 determines the SVC type */
71*433d6423SLionel Sambuc	svc	#0           /* trap to kernel */
72*433d6423SLionel Sambuc	pop	{fp}
73*433d6423SLionel Sambuc	bx	lr
74*433d6423SLionel Sambuc
75