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