]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h
OvmfPkg/MemEncryptSevLib: find pages of initial SMRAM save state map
[mirror_edk2.git] / OvmfPkg / Library / QemuFwCfgLib / QemuFwCfgLibInternal.h
... / ...
CommitLineData
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 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
29BOOLEAN\r
30InternalQemuFwCfgIsAvailable (\r
31 VOID\r
32 );\r
33\r
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
42BOOLEAN\r
43InternalQemuFwCfgDmaIsAvailable (\r
44 VOID\r
45 );\r
46\r
47/**\r
48 Transfer an array of bytes, or skip a number of bytes, using the DMA\r
49 interface.\r
50\r
51 @param[in] Size Size in bytes to transfer or skip.\r
52\r
53 @param[in,out] Buffer Buffer to read data into or write data from. Ignored,\r
54 and may be NULL, if Size is zero, or Control is\r
55 FW_CFG_DMA_CTL_SKIP.\r
56\r
57 @param[in] Control One of the following:\r
58 FW_CFG_DMA_CTL_WRITE - write to fw_cfg from Buffer.\r
59 FW_CFG_DMA_CTL_READ - read from fw_cfg into Buffer.\r
60 FW_CFG_DMA_CTL_SKIP - skip bytes in fw_cfg.\r
61**/\r
62VOID\r
63InternalQemuFwCfgDmaBytes (\r
64 IN UINT32 Size,\r
65 IN OUT VOID *Buffer OPTIONAL,\r
66 IN UINT32 Control\r
67 );\r
68\r
69#endif\r