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