]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Internal interfaces specific to the QemuFwCfgLib instances in OvmfPkg.\r | |
3 | \r | |
4 | Copyright (C) 2016, Red Hat, Inc.\r | |
5 | Copyright (C) 2017, Advanced Micro Devices. All rights reserved\r | |
6 | \r | |
7 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
8 | \r | |
9 | **/\r | |
10 | \r | |
11 | #ifndef __QEMU_FW_CFG_LIB_INTERNAL_H__\r | |
12 | #define __QEMU_FW_CFG_LIB_INTERNAL_H__\r | |
13 | \r | |
14 | /**\r | |
15 | Returns a boolean indicating if the firmware configuration interface is\r | |
16 | available for library-internal purposes.\r | |
17 | \r | |
18 | This function never changes fw_cfg state.\r | |
19 | \r | |
20 | @retval TRUE The interface is available internally.\r | |
21 | @retval FALSE The interface is not available internally.\r | |
22 | **/\r | |
23 | BOOLEAN\r | |
24 | InternalQemuFwCfgIsAvailable (\r | |
25 | VOID\r | |
26 | );\r | |
27 | \r | |
28 | /**\r | |
29 | Returns a boolean indicating whether QEMU provides the DMA-like access method\r | |
30 | for fw_cfg.\r | |
31 | \r | |
32 | @retval TRUE The DMA-like access method is available.\r | |
33 | @retval FALSE The DMA-like access method is unavailable.\r | |
34 | **/\r | |
35 | BOOLEAN\r | |
36 | InternalQemuFwCfgDmaIsAvailable (\r | |
37 | VOID\r | |
38 | );\r | |
39 | \r | |
40 | /**\r | |
41 | Transfer an array of bytes, or skip a number of bytes, using the DMA\r | |
42 | interface.\r | |
43 | \r | |
44 | @param[in] Size Size in bytes to transfer or skip.\r | |
45 | \r | |
46 | @param[in,out] Buffer Buffer to read data into or write data from. Ignored,\r | |
47 | and may be NULL, if Size is zero, or Control is\r | |
48 | FW_CFG_DMA_CTL_SKIP.\r | |
49 | \r | |
50 | @param[in] Control One of the following:\r | |
51 | FW_CFG_DMA_CTL_WRITE - write to fw_cfg from Buffer.\r | |
52 | FW_CFG_DMA_CTL_READ - read from fw_cfg into Buffer.\r | |
53 | FW_CFG_DMA_CTL_SKIP - skip bytes in fw_cfg.\r | |
54 | **/\r | |
55 | VOID\r | |
56 | InternalQemuFwCfgDmaBytes (\r | |
57 | IN UINT32 Size,\r | |
58 | IN OUT VOID *Buffer OPTIONAL,\r | |
59 | IN UINT32 Control\r | |
60 | );\r | |
61 | \r | |
62 | /**\r | |
63 | Check if it is Tdx guest\r | |
64 | \r | |
65 | @retval TRUE It is Tdx guest\r | |
66 | @retval FALSE It is not Tdx guest\r | |
67 | **/\r | |
68 | BOOLEAN\r | |
69 | QemuFwCfgIsTdxGuest (\r | |
70 | VOID\r | |
71 | );\r | |
72 | \r | |
73 | #endif\r |