1/** 2 * \file 3 * \brief IDC declarations common to all transports 4 */ 5 6/* 7 * Copyright (c) 2010, ETH Zurich. 8 * All rights reserved. 9 * 10 * This file is distributed under the terms in the attached LICENSE file. 11 * If you do not find this file, copies can be found by writing to: 12 * ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group. 13 */ 14 15#ifndef BARRELFISH_IDC_H 16#define BARRELFISH_IDC_H 17 18#include <sys/cdefs.h> 19 20__BEGIN_DECLS 21 22/// Generic control operations on an established IDC binding 23typedef enum idc_control { 24 IDC_CONTROL_TEARDOWN, ///< Initiate connection teardown 25 IDC_CONTROL_SET_SYNC, ///< Enable synchronous optimisations 26 IDC_CONTROL_CLEAR_SYNC, ///< Disable synchronous optimisations 27} idc_control_t; 28 29/// Flags on an IDC export/service 30typedef enum idc_export_flags { 31 // Do not block on receipt notifications even if transport supports it 32 IDC_EXPORT_FLAG_NO_NOTIFY = 1 << 0, 33} idc_export_flags_t; 34 35#define IDC_EXPORT_FLAGS_DEFAULT 0 36 37/// Flags on an IDC bind 38typedef enum idc_bind_flags { 39 /// signals that binding will use RPCs involving capability transfer 40 /// in practice, this results in a new monitor binding for non-LMP transports 41 IDC_BIND_FLAG_RPC_CAP_TRANSFER = 1 << 0, 42 // Do not block on receipt notifications even if transport supports it 43 IDC_BIND_FLAG_NO_NOTIFY = 1 << 1, 44 45 // request a multi-hop channel 46 IDC_BIND_FLAG_MULTIHOP = 1 << 2, 47} idc_bind_flags_t; 48 49#define IDC_BIND_FLAGS_DEFAULT 0 50 51 52typedef enum idc_endpoint_type { 53 IDC_ENDPOINT_LMP = 1<<0, 54 IDC_ENDPOINT_UMP = 1<<1, 55} idc_endpoint_t; 56 57 58typedef enum idc_endpoint_flags { 59 IDC_ENDPOINT_FLAGS_DUMMY = 1, 60} idc_endpoint_flags_t; 61 62#define IDC_ENDPOINT_FLAGS_DEFAULT 0 63 64 65 66#ifdef CONFIG_INTERCONNECT_DRIVER_LMP 67#include <barrelfish/lmp_chan.h> 68#endif 69 70#ifdef CONFIG_INTERCONNECT_DRIVER_UMP 71#include <barrelfish/ump_chan.h> 72#endif 73 74#if defined(CONFIG_FLOUNDER_BACKEND_UMP_IPI) 75#include <arch/x86/barrelfish/ipi_notify.h> 76#endif 77 78#ifdef CONFIG_INTERCONNECT_DRIVER_MULTIHOP 79#include <barrelfish/multihop_chan.h> 80#endif 81 82void idc_init(void); 83 84 85/* XXX: glue junk for old IDC system, to be removed!! */ 86 87void messages_wait_and_handle_next(void); 88void __attribute__((noreturn)) messages_handler_loop(void); 89 90 91__END_DECLS 92 93#endif // BARRELFISH_IDC_H 94