]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Include/Library/XenHypercallLib.h
OvmfPkg: XenHypercallLib: add empty constructor for ARM & AARCH64
[mirror_edk2.git] / OvmfPkg / Include / Library / XenHypercallLib.h
1 /** @file
2 Functions declarations to make Xen hypercalls.
3
4 Copyright (C) 2014, Citrix Ltd.
5
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef __XEN_HYPERCALL_LIB_H__
17 #define __XEN_HYPERCALL_LIB_H__
18
19 /**
20 This function will put the two arguments in the right place (registers) and
21 invoke the hypercall identified by HypercallID.
22
23 @param HypercallID The symbolic ID of the hypercall to be invoked
24 @param Arg1 First argument.
25 @param Arg2 Second argument.
26
27 @return Return 0 if success otherwise it return an errno.
28 **/
29 INTN
30 EFIAPI
31 XenHypercall2 (
32 IN UINTN HypercallID,
33 IN OUT INTN Arg1,
34 IN OUT INTN Arg2
35 );
36
37 /**
38 Return the value of the HVM parameter Index.
39
40 @param Index The parameter to get, e.g. HVM_PARAM_STORE_EVTCHN.
41
42 @return The value of the asked parameter or 0 in case of error.
43 **/
44 UINT64
45 XenHypercallHvmGetParam (
46 UINT32 Index
47 );
48
49 /**
50 Hypercall to do different operation on the memory.
51
52 @param Operation The operation number, e.g. XENMEM_add_to_physmap.
53 @param Arguments The arguments associated to the operation.
54
55 @return Return the return value from the hypercall, 0 in case of success
56 otherwise, an error code.
57 **/
58 INTN
59 XenHypercallMemoryOp (
60 IN UINTN Operation,
61 IN OUT VOID *Arguments
62 );
63
64 /**
65 Do an operation on the event channels.
66
67 @param Operation The operation number, e.g. EVTCHNOP_send.
68 @param Arguments The argument associated to the operation.
69
70 @return Return the return value from the hypercall, 0 in case of success
71 otherwise, an error code.
72 **/
73 INTN
74 XenHypercallEventChannelOp (
75 IN INTN Operation,
76 IN OUT VOID *Arguments
77 );
78
79 #endif