]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h
OvmfPkg: Apply uncrustify changes
[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 6\r
b26f0cf9 7 SPDX-License-Identifier: BSD-2-Clause-Patent\r
5297c0bf
LE
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
23BOOLEAN\r
24InternalQemuFwCfgIsAvailable (\r
25 VOID\r
26 );\r
27\r
2c8dcbc6
LE
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
35BOOLEAN\r
36InternalQemuFwCfgDmaIsAvailable (\r
37 VOID\r
38 );\r
39\r
b049655d 40/**\r
f6c909ae
BS
41 Transfer an array of bytes, or skip a number of bytes, using the DMA\r
42 interface.\r
b049655d 43\r
f6c909ae 44 @param[in] Size Size in bytes to transfer or skip.\r
b049655d 45\r
f6c909ae
BS
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
b049655d 49\r
f6c909ae
BS
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
b049655d
BS
54**/\r
55VOID\r
f6c909ae 56InternalQemuFwCfgDmaBytes (\r
ac0a286f
MK
57 IN UINT32 Size,\r
58 IN OUT VOID *Buffer OPTIONAL,\r
59 IN UINT32 Control\r
b049655d
BS
60 );\r
61\r
5297c0bf 62#endif\r