]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h
OvmfPkg/MemEncryptSevLib: find pages of initial SMRAM save state map
[mirror_edk2.git] / OvmfPkg / Library / QemuFwCfgLib / QemuFwCfgLibInternal.h
CommitLineData
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
29BOOLEAN\r
30InternalQemuFwCfgIsAvailable (\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
42BOOLEAN\r
43InternalQemuFwCfgDmaIsAvailable (\r
44 VOID\r
45 );\r
46\r
b049655d 47/**\r
f6c909ae
BS
48 Transfer an array of bytes, or skip a number of bytes, using the DMA\r
49 interface.\r
b049655d 50\r
f6c909ae 51 @param[in] Size Size in bytes to transfer or skip.\r
b049655d 52\r
f6c909ae
BS
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
b049655d 56\r
f6c909ae
BS
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
b049655d
BS
61**/\r
62VOID\r
f6c909ae
BS
63InternalQemuFwCfgDmaBytes (\r
64 IN UINT32 Size,\r
65 IN OUT VOID *Buffer OPTIONAL,\r
66 IN UINT32 Control\r
b049655d
BS
67 );\r
68\r
5297c0bf 69#endif\r