Zephyr API Documentation  3.0.0
A Scalable Open Source RTOS
3.0.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
event_channel.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: MIT */
2
3/******************************************************************************
4 * event_channel.h
5 *
6 * Event channels between domains.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files (the "Software"), to
10 * deal in the Software without restriction, including without limitation the
11 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
12 * sell copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24 * DEALINGS IN THE SOFTWARE.
25 *
26 * Copyright (c) 2003-2004, K A Fraser.
27 */
28
29#ifndef __XEN_PUBLIC_EVENT_CHANNEL_H__
30#define __XEN_PUBLIC_EVENT_CHANNEL_H__
31
32#include "xen.h"
33
34/*
35 * `incontents 150 evtchn Event Channels
36 *
37 * Event channels are the basic primitive provided by Xen for event
38 * notifications. An event is the Xen equivalent of a hardware
39 * interrupt. They essentially store one bit of information, the event
40 * of interest is signalled by transitioning this bit from 0 to 1.
41 *
42 * Notifications are received by a guest via an upcall from Xen,
43 * indicating when an event arrives (setting the bit). Further
44 * notifications are masked until the bit is cleared again (therefore,
45 * guests must check the value of the bit after re-enabling event
46 * delivery to ensure no missed notifications).
47 *
48 * Event notifications can be masked by setting a flag; this is
49 * equivalent to disabling interrupts and can be used to ensure
50 * atomicity of certain operations in the guest kernel.
51 *
52 * Event channels are represented by the evtchn_* fields in
53 * struct shared_info and struct vcpu_info.
54 */
55
56#define EVTCHNOP_bind_interdomain 0
57#define EVTCHNOP_bind_virq 1
58#define EVTCHNOP_bind_pirq 2
59#define EVTCHNOP_close 3
60#define EVTCHNOP_send 4
61#define EVTCHNOP_status 5
62#define EVTCHNOP_alloc_unbound 6
63#define EVTCHNOP_bind_ipi 7
64#define EVTCHNOP_bind_vcpu 8
65#define EVTCHNOP_unmask 9
66#define EVTCHNOP_reset 10
67#define EVTCHNOP_init_control 11
68#define EVTCHNOP_expand_array 12
69#define EVTCHNOP_set_priority 13
70#ifdef __XEN__
71#define EVTCHNOP_reset_cont 14
72#endif
73
76
77/*
78 * EVTCHNOP_send: Send an event to the remote end of the channel whose local
79 * endpoint is <port>.
80 */
82 /* IN parameters. */
84};
86
87#define EVTCHN_2L_NR_CHANNELS (sizeof(xen_ulong_t) * sizeof(xen_ulong_t) * 64)
88
89#endif /* __XEN_PUBLIC_EVENT_CHANNEL_H__ */
uint32_t evtchn_port_t
Definition: event_channel.h:74
DEFINE_XEN_GUEST_HANDLE(evtchn_port_t)
__UINT32_TYPE__ uint32_t
Definition: stdint.h:60
Definition: event_channel.h:81
evtchn_port_t port
Definition: event_channel.h:83