2 * \file sigma0/lib/src/tbuf.c
3 * \brief map tracebuffer descriptor using sigma0 protocol
6 * \author Frank Mehnert <fm3@os.inf.tu-dresden.de> */
9 * (c) 2006-2009 Technische Universität Dresden
10 * This file is part of TUD:OS and distributed under the terms of the
11 * GNU Lesser General Public License 2.1.
12 * Please see the COPYING-LGPL-2.1 file for details.
15 #include <l4/sys/ipc.h>
16 #include <l4/sigma0/sigma0.h>
19 * Map the Fiasco tracebuffer status descriptor using the Sigma0 protocol.
21 * \param pager pager implementing the Sigma0 protocol
22 * \param virt virtual address the descriptor should be mapped to
23 * \return #0 on success
24 * -#L4SIGMA0_IPCERROR IPC error
25 * -#L4SIGMA0_NOFPAGE no fpage received
28 l4sigma0_map_tbuf(l4_cap_idx_t pager, l4_addr_t virt)
38 l4_msgtag_t tag = l4_msgtag(L4_MSGTAG_SIGMA0, 0, 0, 0);
40 error = l4_ipc_call(pager, tag, L4_IPC_NEVER, &result, &tag);
43 return -L4SIGMA0_IPCERROR;
45 if (fpage.fpage == 0 || !l4_ipc_fpage_received(result))
46 return -L4SIGMA0_NOFPAGE;