]>
Commit | Line | Data |
---|---|---|
5297c0bf LE |
1 | /** @file\r |
2 | Internal interfaces specific to the QemuFwCfgLib instances in OvmfPkg.\r | |
3 | \r | |
4 | Copyright (C) 2016, Red Hat, Inc.\r | |
b049655d | 5 | Copyright (C) 2017, Advanced Micro Devices. All rights reserved\r |
5297c0bf LE |
6 | \r |
7 | This program and the accompanying materials are licensed and made available\r | |
8 | under the terms and conditions of the BSD License which accompanies this\r | |
9 | distribution. The full text of the license may be found at\r | |
10 | http://opensource.org/licenses/bsd-license.php\r | |
11 | \r | |
12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r | |
13 | WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
14 | \r | |
15 | **/\r | |
16 | \r | |
17 | #ifndef __QEMU_FW_CFG_LIB_INTERNAL_H__\r | |
18 | #define __QEMU_FW_CFG_LIB_INTERNAL_H__\r | |
19 | \r | |
20 | /**\r | |
21 | Returns a boolean indicating if the firmware configuration interface is\r | |
22 | available for library-internal purposes.\r | |
23 | \r | |
24 | This function never changes fw_cfg state.\r | |
25 | \r | |
26 | @retval TRUE The interface is available internally.\r | |
27 | @retval FALSE The interface is not available internally.\r | |
28 | **/\r | |
29 | BOOLEAN\r | |
30 | InternalQemuFwCfgIsAvailable (\r | |
31 | VOID\r | |
32 | );\r | |
33 | \r | |
2c8dcbc6 LE |
34 | \r |
35 | /**\r | |
36 | Returns a boolean indicating whether QEMU provides the DMA-like access method\r | |
37 | for fw_cfg.\r | |
38 | \r | |
39 | @retval TRUE The DMA-like access method is available.\r | |
40 | @retval FALSE The DMA-like access method is unavailable.\r | |
41 | **/\r | |
42 | BOOLEAN\r | |
43 | InternalQemuFwCfgDmaIsAvailable (\r | |
44 | VOID\r | |
45 | );\r | |
46 | \r | |
b049655d BS |
47 | /**\r |
48 | Returns a boolean indicating whether SEV support is enabled\r | |
49 | \r | |
50 | @retval TRUE SEV is enabled\r | |
51 | @retval FALSE SEV is disabled\r | |
52 | **/\r | |
53 | BOOLEAN\r | |
54 | InternalQemuFwCfgSevIsEnabled (\r | |
55 | VOID\r | |
56 | );\r | |
57 | \r | |
58 | /**\r | |
59 | Allocate a bounce buffer for SEV DMA.\r | |
60 | \r | |
61 | @param[out] Buffer Allocated DMA Buffer pointer\r | |
62 | @param[in] NumPage Number of pages.\r | |
63 | \r | |
64 | **/\r | |
65 | VOID\r | |
66 | InternalQemuFwCfgSevDmaAllocateBuffer (\r | |
67 | OUT VOID **Buffer,\r | |
68 | IN UINT32 NumPages\r | |
69 | );\r | |
70 | \r | |
71 | /**\r | |
72 | Free the DMA buffer allocated using InternalQemuFwCfgSevDmaAllocateBuffer\r | |
73 | \r | |
74 | @param[in] NumPage Number of pages.\r | |
75 | @param[in] Buffer DMA Buffer pointer\r | |
76 | \r | |
77 | **/\r | |
78 | VOID\r | |
79 | InternalQemuFwCfgSevDmaFreeBuffer (\r | |
80 | IN VOID *Buffer,\r | |
81 | IN UINT32 NumPages\r | |
82 | );\r | |
5297c0bf | 83 | #endif\r |