1/**
2 * \file
3 * \brief Arch-specific inter-monitor communication
4 */
5
6/*
7 * Copyright (c) 2009, 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, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
13 */
14
15#include <inttypes.h>
16#include "monitor.h"
17#include <trace/trace.h>
18
19/**
20 * \brief A monitor receives request to setup a connection
21 * with another newly booted monitor from a third monitor
22 */
23static void bind_monitor_request(struct intermon_binding *st,
24                                 coreid_t core_id,
25                                 intermon_caprep_t caprep)
26{
27    USER_PANIC("NYI!");
28}
29
30/**
31 * \brief The monitor that proxied the request for one monitor to
32 * setup a connection with another monitor gets the reply
33 */
34static void bind_monitor_reply(struct intermon_binding *closure, errval_t err)
35{
36    USER_PANIC("NYI!");
37}
38
39/**
40 * \brief A monitor asks this monitor to proxy
41 * its request to bind to another monitor
42 */
43static void bind_monitor_proxy(struct intermon_binding *st,
44                               coreid_t dst_core_id,
45                               intermon_caprep_t caprep)
46{
47    USER_PANIC("NYI!");
48}
49
50/**
51 * \brief Notification of a newly booted monitor.
52 *  Setup our connection and request the sender to proxy
53 *  the bind request to the monitor
54 */
55static void new_monitor_notify(struct intermon_binding *st,
56                               coreid_t core_id)
57{
58    USER_PANIC("NYI!");
59}
60
61errval_t arch_intermon_init(struct intermon_binding *b)
62{
63    b->rx_vtbl.bind_monitor_request = bind_monitor_request;
64    b->rx_vtbl.bind_monitor_reply = bind_monitor_reply;
65    b->rx_vtbl.bind_monitor_proxy = bind_monitor_proxy;
66    b->rx_vtbl.new_monitor_notify = new_monitor_notify;
67
68    return SYS_ERR_OK;
69}
70