]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h
OvmfPkg/MemEncryptSevLib: find pages of initial SMRAM save state map
[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 This program and the accompanying materials are licensed and made available
8 under the terms and conditions of the BSD License which accompanies this
9 distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
11
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
13 WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14
15 **/
16
17 #ifndef __QEMU_FW_CFG_LIB_INTERNAL_H__
18 #define __QEMU_FW_CFG_LIB_INTERNAL_H__
19
20 /**
21 Returns a boolean indicating if the firmware configuration interface is
22 available for library-internal purposes.
23
24 This function never changes fw_cfg state.
25
26 @retval TRUE The interface is available internally.
27 @retval FALSE The interface is not available internally.
28 **/
29 BOOLEAN
30 InternalQemuFwCfgIsAvailable (
31 VOID
32 );
33
34
35 /**
36 Returns a boolean indicating whether QEMU provides the DMA-like access method
37 for fw_cfg.
38
39 @retval TRUE The DMA-like access method is available.
40 @retval FALSE The DMA-like access method is unavailable.
41 **/
42 BOOLEAN
43 InternalQemuFwCfgDmaIsAvailable (
44 VOID
45 );
46
47 /**
48 Transfer an array of bytes, or skip a number of bytes, using the DMA
49 interface.
50
51 @param[in] Size Size in bytes to transfer or skip.
52
53 @param[in,out] Buffer Buffer to read data into or write data from. Ignored,
54 and may be NULL, if Size is zero, or Control is
55 FW_CFG_DMA_CTL_SKIP.
56
57 @param[in] Control One of the following:
58 FW_CFG_DMA_CTL_WRITE - write to fw_cfg from Buffer.
59 FW_CFG_DMA_CTL_READ - read from fw_cfg into Buffer.
60 FW_CFG_DMA_CTL_SKIP - skip bytes in fw_cfg.
61 **/
62 VOID
63 InternalQemuFwCfgDmaBytes (
64 IN UINT32 Size,
65 IN OUT VOID *Buffer OPTIONAL,
66 IN UINT32 Control
67 );
68
69 #endif