123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- /** @file
- fw_cfg library implementation.
- Copyright (c) 2022 Loongson Technology Corporation Limited. All rights reserved.<BR>
- SPDX-License-Identifier: BSD-2-Clause-Patent
- @par Glossary:
- - FwCfg - firmWare Configure
- **/
- #ifndef QEMU_FW_CFG_LIB_INTERNAL_H_
- #define QEMU_FW_CFG_LIB_INTERNAL_H_
- /**
- Returns a boolean indicating if the firmware configuration interface is
- available for library-internal purposes.
- This function never changes fw_cfg state.
- @retval TRUE The interface is available internally.
- @retval FALSE The interface is not available internally.
- **/
- BOOLEAN
- InternalQemuFwCfgIsAvailable (
- VOID
- );
- /**
- Returns a boolean indicating whether QEMU provides the DMA-like access method
- for fw_cfg.
- @retval TRUE The DMA-like access method is available.
- @retval FALSE The DMA-like access method is unavailable.
- **/
- BOOLEAN
- InternalQemuFwCfgDmaIsAvailable (
- VOID
- );
- /**
- Transfer an array of bytes, or skip a number of bytes, using the DMA
- interface.
- @param[in] Size Size in bytes to transfer or skip.
- @param[in,out] Buffer Buffer to read data into or write data from. Ignored,
- and may be NULL, if Size is zero, or Control is
- FW_CFG_DMA_CTL_SKIP.
- @param[in] Control One of the following:
- FW_CFG_DMA_CTL_WRITE - write to fw_cfg from Buffer.
- FW_CFG_DMA_CTL_READ - read from fw_cfg into Buffer.
- FW_CFG_DMA_CTL_SKIP - skip bytes in fw_cfg.
- **/
- VOID
- InternalQemuFwCfgDmaBytes (
- IN UINT32 Size,
- IN OUT VOID *Buffer OPTIONAL,
- IN UINT32 Control
- );
- #endif // QEMU_FW_CFG_LIB_INTERNAL_H_
|