]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h
OvmfPkg: Replace BSD License with BSD+Patent License
[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/**\r
30 Returns a boolean indicating whether QEMU provides the DMA-like access method\r
31 for fw_cfg.\r
32\r
33 @retval TRUE The DMA-like access method is available.\r
34 @retval FALSE The DMA-like access method is unavailable.\r
35**/\r
36BOOLEAN\r
37InternalQemuFwCfgDmaIsAvailable (\r
38 VOID\r
39 );\r
40\r
b049655d 41/**\r
f6c909ae
BS
42 Transfer an array of bytes, or skip a number of bytes, using the DMA\r
43 interface.\r
b049655d 44\r
f6c909ae 45 @param[in] Size Size in bytes to transfer or skip.\r
b049655d 46\r
f6c909ae
BS
47 @param[in,out] Buffer Buffer to read data into or write data from. Ignored,\r
48 and may be NULL, if Size is zero, or Control is\r
49 FW_CFG_DMA_CTL_SKIP.\r
b049655d 50\r
f6c909ae
BS
51 @param[in] Control One of the following:\r
52 FW_CFG_DMA_CTL_WRITE - write to fw_cfg from Buffer.\r
53 FW_CFG_DMA_CTL_READ - read from fw_cfg into Buffer.\r
54 FW_CFG_DMA_CTL_SKIP - skip bytes in fw_cfg.\r
b049655d
BS
55**/\r
56VOID\r
f6c909ae
BS
57InternalQemuFwCfgDmaBytes (\r
58 IN UINT32 Size,\r
59 IN OUT VOID *Buffer OPTIONAL,\r
60 IN UINT32 Control\r
b049655d
BS
61 );\r
62\r
5297c0bf 63#endif\r