3 * \brief L4 IPC System Calls, PPC
7 * (c) 2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>
8 * economic rights: Technische Universität Dresden (Germany)
10 * This file is part of TUD:OS and distributed under the terms of the
11 * GNU General Public License 2.
12 * Please see the COPYING-GPL-2 file for details.
14 * As a special exception, you may use this file as part of a free software
15 * library without restriction. Specifically, if other files instantiate
16 * templates or use macros or inline functions from this file, or you compile
17 * this file and link it with other files to produce an executable, this
18 * file does not by itself cause the resulting executable to be covered by
19 * the GNU General Public License. This exception does not however
20 * invalidate any other reasons why the executable file might be covered by
21 * the GNU General Public License.
27 #include <l4/sys/compiler.h>
29 #include_next <l4/sys/ipc.h>
31 #define L4_IPC_CAPMAPMSG_BASE 0xf0000100 ///< Capability mapmsg base
33 #ifndef L4_SYSCALL_MAGIC_OFFSET
34 # define L4_SYSCALL_MAGIC_OFFSET 8
36 #define L4_SYSCALL_INVOKE (-0x00000004-L4_SYSCALL_MAGIC_OFFSET)
39 l4_ipc(l4_cap_idx_t dest, l4_utcb_t *utcb,
44 l4_timeout_t timeout) L4_NOTHROW
46 register l4_umword_t _dest __asm__("r4") = dest | flags;
47 register l4_umword_t _timeout __asm__("r5") = timeout.raw;
48 register l4_umword_t _tag __asm__("r3") = tag.raw;
49 register l4_umword_t _lab __asm__("r6") = slabel;
60 [addr] "i" (L4_SYSCALL_INVOKE)
72 l4_ipc_call(l4_cap_idx_t dest, l4_utcb_t *utcb,
74 l4_timeout_t timeout) L4_NOTHROW
76 return l4_ipc(dest, utcb, L4_SYSF_CALL, 0, tag, 0, timeout);
80 l4_ipc_reply_and_wait(l4_utcb_t *utcb, l4_msgtag_t tag,
82 l4_timeout_t timeout) L4_NOTHROW
84 return l4_ipc(L4_INVALID_CAP, utcb, L4_SYSF_REPLY_AND_WAIT, 0, tag, label, timeout);
88 l4_ipc_send_and_wait(l4_cap_idx_t dest, l4_utcb_t *utcb,
91 l4_timeout_t timeout) L4_NOTHROW
93 return l4_ipc(dest, utcb, L4_SYSF_SEND_AND_WAIT, 0, tag, src, timeout);
97 l4_ipc_send(l4_cap_idx_t dest, l4_utcb_t *utcb,
99 l4_timeout_t timeout) L4_NOTHROW
101 return l4_ipc(dest, utcb, L4_SYSF_SEND, 0, tag, 0, timeout);
104 L4_INLINE l4_msgtag_t
105 l4_ipc_wait(l4_utcb_t *utcb, l4_umword_t *src,
106 l4_timeout_t timeout) L4_NOTHROW
110 return l4_ipc(L4_INVALID_CAP, utcb, L4_SYSF_WAIT, 0, t, src, timeout);
113 L4_INLINE l4_msgtag_t
114 l4_ipc_receive(l4_cap_idx_t src, l4_utcb_t *utcb,
115 l4_timeout_t timeout) L4_NOTHROW
119 return l4_ipc(src, utcb, L4_SYSF_RECV, 0, t, 0, timeout);
122 #include <l4/sys/ipc-impl.h>