minix/lib/libc/arch/arm/sys-minix/_ipc.S

84 lines
2.1 KiB
ArmAsm
Raw Normal View History

2012-08-28 19:34:08 +02:00
#include <minix/ipcconst.h>
#include <machine/asm.h>
/**========================================================================* */
/* IPC assembly routines * */
/**========================================================================* */
2012-10-08 03:38:03 +02:00
ENTRY(_send_orig)
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 */
mov r0, #SEND /* _send(dest, ptr) */
mov r3, #IPCVEC /* r3 determines the SVC type */
svc #0 /* trap to kernel */
pop {fp}
bx lr
2012-10-08 03:38:03 +02:00
ENTRY(_receive_orig)
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 */
mov r0, #RECEIVE /* _receive(src, ptr) */
mov r3, #IPCVEC /* r3 determines the SVC type */
svc #0 /* trap to kernel */
pop {r2} /* restore status ptr */
str r1, [r2]
pop {fp}
bx lr
2012-10-08 03:38:03 +02:00
ENTRY(_sendrec_orig)
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 */
mov r0, #SENDREC /* _sendrec(srcdest, ptr) */
mov r3, #IPCVEC /* r3 determines the SVC type */
svc #0 /* trap to kernel */
pop {fp}
bx lr
ENTRY(_minix_kernel_info_struct)
push {fp}
mov fp, sp
push {r0}
mov r1, #0
mov r2, #0
mov r0, #MINIX_KERNINFO /* kerninfo() */
mov r3, #IPCVEC /* r3 determines the SVC type */
svc #0 /* trap to kernel */
pop {r2} /* r2 = return struct ptr (was r0) */
str r1, [r2]
2012-08-28 19:34:08 +02:00
pop {fp}
bx lr
2012-10-08 03:38:03 +02:00
ENTRY(_notify_orig)
2012-08-28 19:34:08 +02:00
push {fp}
mov fp, sp
mov r1, r0 /* r1 = src_dest */
mov r0, #NOTIFY /* _notify(srcdst) */
mov r3, #IPCVEC /* r3 determines the SVC type */
svc #0 /* trap to kernel */
pop {fp}
bx lr
2012-10-08 03:38:03 +02:00
ENTRY(_sendnb_orig)
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 */
mov r0, #SENDNB /* _sendnb(dest, ptr) */
mov r3, #IPCVEC /* r3 determines the SVC type */
svc #0 /* trap to kernel */
pop {fp}
bx lr
2012-10-08 03:38:03 +02:00
ENTRY(_do_kernel_call_orig)
2012-08-28 19:34:08 +02:00
/* r0 already holds msg ptr */
mov r3, #KERVEC /* r3 determines the SVC type */
svc #0 /* trap to kernel */
bx lr