]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/XenBusDxe/GrantTable.h
IntelFsp2Pkg/SplitFspBin.py: Support rebasing 1.x binary.
[mirror_edk2.git] / OvmfPkg / XenBusDxe / GrantTable.h
CommitLineData
0fd14246
SS
1/** @file\r
2 Grant Table function declaration.\r
3\r
4 Grant Table are used to grant access to certain page of the current\r
5 VM to an other VM.\r
6\r
7 Copyright (C) 2014, Citrix Ltd.\r
8\r
b26f0cf9 9 SPDX-License-Identifier: BSD-2-Clause-Patent\r
0fd14246
SS
10\r
11**/\r
12#ifndef __GNTTAB_H__\r
13#define __GNTTAB_H__\r
14\r
15#include <IndustryStandard/Xen/grant_table.h>\r
16\r
17/**\r
18 Initialize the Grant Table at the address MmioAddr.\r
19\r
20 @param Dev A pointer to XENBUS_DEVICE.\r
21 @param MmioAddr An address where the grant table can be mapped into\r
22 the guest.\r
23**/\r
24VOID\r
25XenGrantTableInit (\r
d9fdfd85 26 IN XENBUS_DEVICE *Dev\r
0fd14246
SS
27 );\r
28\r
29/**\r
30 Desinitilize the Grant Table.\r
31**/\r
32VOID\r
33XenGrantTableDeinit (\r
34 IN XENBUS_DEVICE *Dev\r
35 );\r
36\r
37/**\r
38 Grant access to the page Frame to the domain DomainId.\r
39\r
40 @param This A pointer to XENBUS_PROTOCOL instance.\r
41 @param DomainId ID of the domain to grant acces to.\r
42 @param Frame Frame Number of the page to grant access to.\r
43 @param ReadOnly Provide read-only or read-write access.\r
b6b33f67 44 @param RefPtr Reference number of the grant will be written to this pointer.\r
0fd14246
SS
45**/\r
46EFI_STATUS\r
47EFIAPI\r
48XenBusGrantAccess (\r
49 IN XENBUS_PROTOCOL *This,\r
50 IN domid_t DomainId,\r
51 IN UINTN Frame, // MFN\r
52 IN BOOLEAN ReadOnly,\r
53 OUT grant_ref_t *RefPtr\r
54 );\r
55\r
56/**\r
57 End access to grant Ref, previously return by XenBusGrantAccess.\r
58\r
59 @param This A pointer to XENBUS_PROTOCOL instance.\r
60 @param Ref Reference numeber of a grant previously returned by\r
61 XenBusGrantAccess.\r
62**/\r
63EFI_STATUS\r
64EFIAPI\r
65XenBusGrantEndAccess (\r
66 IN XENBUS_PROTOCOL *This,\r
67 IN grant_ref_t Ref\r
68 );\r
69\r
70#endif /* !__GNTTAB_H__ */\r