]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Functions declarations to make Xen hypercalls.\r | |
3 | \r | |
4 | Copyright (C) 2014, Citrix Ltd.\r | |
5 | \r | |
6 | This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | \r | |
16 | #ifndef __XENBUS_DXE_HYPERCALL_H__\r | |
17 | #define __XENBUS_DXE_HYPERCALL_H__\r | |
18 | \r | |
19 | /**\r | |
20 | This function will put the two arguments in the right place (registers) and\r | |
21 | invoke the hypercall identified by HypercallID.\r | |
22 | \r | |
23 | @param HypercallID The symbolic ID of the hypercall to be invoked\r | |
24 | @param Arg1 First argument.\r | |
25 | @param Arg2 Second argument.\r | |
26 | \r | |
27 | @return Return 0 if success otherwise it return an errno.\r | |
28 | **/\r | |
29 | INTN\r | |
30 | EFIAPI\r | |
31 | XenHypercall2 (\r | |
32 | IN INTN HypercallID,\r | |
33 | IN OUT INTN Arg1,\r | |
34 | IN OUT INTN Arg2\r | |
35 | );\r | |
36 | \r | |
37 | /**\r | |
38 | Get the page where all hypercall are from the XenInfo hob.\r | |
39 | \r | |
40 | @param Dev A XENBUS_DEVICE instance.\r | |
41 | \r | |
42 | @retval EFI_NOT_FOUND hyperpage could not be found.\r | |
43 | @retval EFI_SUCCESS Successfully retrieve the hyperpage pointer.\r | |
44 | **/\r | |
45 | EFI_STATUS\r | |
46 | XenHyperpageInit (\r | |
47 | );\r | |
48 | \r | |
49 | /**\r | |
50 | Return the value of the HVM parameter Index.\r | |
51 | \r | |
52 | @param Index The parameter to get, e.g. HVM_PARAM_STORE_EVTCHN.\r | |
53 | \r | |
54 | @return The value of the asked parameter or 0 in case of error.\r | |
55 | **/\r | |
56 | UINT64\r | |
57 | XenHypercallHvmGetParam (\r | |
58 | UINT32 Index\r | |
59 | );\r | |
60 | \r | |
61 | /**\r | |
62 | Hypercall to do different operation on the memory.\r | |
63 | \r | |
64 | @param Operation The operation number, e.g. XENMEM_add_to_physmap.\r | |
65 | @param Arguments The arguments associated to the operation.\r | |
66 | \r | |
67 | @return Return the return value from the hypercall, 0 in case of success\r | |
68 | otherwise, an error code.\r | |
69 | **/\r | |
70 | INTN\r | |
71 | XenHypercallMemoryOp (\r | |
72 | IN UINTN Operation,\r | |
73 | IN OUT VOID *Arguments\r | |
74 | );\r | |
75 | \r | |
76 | /**\r | |
77 | Do an operation on the event channels.\r | |
78 | \r | |
79 | @param Operation The operation number, e.g. EVTCHNOP_send.\r | |
80 | @param Arguments The argument associated to the operation.\r | |
81 | \r | |
82 | @return Return the return value from the hypercall, 0 in case of success\r | |
83 | otherwise, an error code.\r | |
84 | **/\r | |
85 | INTN\r | |
86 | XenHypercallEventChannelOp (\r | |
87 | IN INTN Operation,\r | |
88 | IN OUT VOID *Arguments\r | |
89 | );\r | |
90 | \r | |
91 | #endif\r |