TianoCore EDK2 master
Loading...
Searching...
No Matches
QemuFwCfgLibMmioInternal.h File Reference

Go to the source code of this file.

Data Structures

struct  QEMU_FW_CFG_RESOURCE
 

Typedefs

typedef IN VOID *Buffer OPTIONAL
 

Functions

typedef VOID (EFIAPI READ_BYTES_FUNCTION)(IN UINTN Size
 
 VOID (EFIAPI *InternalQemuFwCfgReadBytes)(IN UINTN Size
 
VOID QemuBuildFwCfgResourceHob (IN QEMU_FW_CFG_RESOURCE *FwCfgResource)
 
QEMU_FW_CFG_RESOURCEQemuGetFwCfgResourceHob (VOID)
 
UINTN EFIAPI QemuGetFwCfgSelectorAddress (VOID)
 
UINTN EFIAPI QemuGetFwCfgDataAddress (VOID)
 
UINTN EFIAPI QemuGetFwCfgDmaAddress (VOID)
 
VOID EFIAPI MmioReadBytes (IN UINTN Size, IN VOID *Buffer OPTIONAL)
 
VOID EFIAPI MmioWriteBytes (IN UINTN Size, IN VOID *Buffer OPTIONAL)
 
VOID EFIAPI MmioSkipBytes (IN UINTN Size)
 
VOID EFIAPI DmaReadBytes (IN UINTN Size, IN VOID *Buffer OPTIONAL)
 
VOID EFIAPI DmaWriteBytes (IN UINTN Size, IN VOID *Buffer OPTIONAL)
 
VOID EFIAPI DmaSkipBytes (IN UINTN Size)
 
VOID DmaTransferBytes (IN UINTN Size, IN OUT VOID *Buffer OPTIONAL, IN UINT32 Control)
 

Detailed Description

Internal interfaces specific to the QemuFwCfgLibMmio instances in OvmfPkg.

Copyright (C) 2016, Red Hat, Inc. Copyright (C) 2017, Advanced Micro Devices. All rights reserved Copyright (c) 2024 Loongson Technology Corporation Limited. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file QemuFwCfgLibMmioInternal.h.

Typedef Documentation

◆ OPTIONAL

IN VOID* Buffer OPTIONAL

Definition at line 31 of file QemuFwCfgLibMmioInternal.h.

Function Documentation

◆ DmaReadBytes()

VOID EFIAPI DmaReadBytes ( IN UINTN  Size,
IN VOID *Buffer  OPTIONAL 
)

Fast READ_BYTES_FUNCTION.

Definition at line 247 of file QemuFwCfgLibMmio.c.

◆ DmaSkipBytes()

VOID EFIAPI DmaSkipBytes ( IN UINTN  Size)

Fast SKIP_BYTES_FUNCTION.

Definition at line 362 of file QemuFwCfgLibMmio.c.

◆ DmaTransferBytes()

VOID DmaTransferBytes ( IN UINTN  Size,
IN OUT VOID *Buffer  OPTIONAL,
IN UINT32  Control 
)

Transfer an array of bytes, or skip a number of bytes, using the DMA interface.

Parameters
[in]SizeSize in bytes to transfer or skip.
[in,out]BufferBuffer 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.
[in]ControlOne 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.

Definition at line 188 of file QemuFwCfgLibMmio.c.

◆ DmaWriteBytes()

VOID EFIAPI DmaWriteBytes ( IN UINTN  Size,
IN VOID *Buffer  OPTIONAL 
)

Fast WRITE_BYTES_FUNCTION.

Definition at line 301 of file QemuFwCfgLibMmio.c.

◆ MmioReadBytes()

VOID EFIAPI MmioReadBytes ( IN UINTN  Size,
IN VOID *Buffer  OPTIONAL 
)

Slow READ_BYTES_FUNCTION.

Definition at line 124 of file QemuFwCfgLibMmio.c.

◆ MmioSkipBytes()

VOID EFIAPI MmioSkipBytes ( IN UINTN  Size)

Slow SKIP_BYTES_FUNCTION.

Definition at line 336 of file QemuFwCfgLibMmio.c.

◆ MmioWriteBytes()

VOID EFIAPI MmioWriteBytes ( IN UINTN  Size,
IN VOID *Buffer  OPTIONAL 
)

Slow WRITE_BYTES_FUNCTION.

Definition at line 284 of file QemuFwCfgLibMmio.c.

◆ QemuBuildFwCfgResourceHob()

VOID QemuBuildFwCfgResourceHob ( IN QEMU_FW_CFG_RESOURCE FwCfgResource)

Build firmware configure resource HOB.

Parameters
[in]FwCfgResourceA pointer to firmware configure resource.
Return values
NULL

Build firmware configure resource HOB.

Parameters
[in]FwCfgResourceA pointer to firmware configure resource.
Return values
VOID

Definition at line 44 of file QemuFwCfgLibMmio.c.

◆ QemuGetFwCfgDataAddress()

UINTN EFIAPI QemuGetFwCfgDataAddress ( VOID  )

To get firmware configure Data address.

Parameters
VOID
Return values
firmwareconfigure data address

Definition at line 53 of file QemuFwCfgMmioDxe.c.

◆ QemuGetFwCfgDmaAddress()

UINTN EFIAPI QemuGetFwCfgDmaAddress ( VOID  )

To get firmware DMA address.

Parameters
VOID
Return values
firmwareDMA address

Definition at line 69 of file QemuFwCfgMmioDxe.c.

◆ QemuGetFwCfgResourceHob()

QEMU_FW_CFG_RESOURCE * QemuGetFwCfgResourceHob ( VOID  )

Get firmware configure resource HOB.

Parameters
VOID
Return values
FwCfgResourceThe firmware configure resouce in HOB.

Get firmware configure resource in HOB.

Parameters
VOID
Return values
non-NULLThe firmware configure resource in HOB. NULL The firmware configure resource not found.

Definition at line 64 of file QemuFwCfgLibMmio.c.

◆ QemuGetFwCfgSelectorAddress()

UINTN EFIAPI QemuGetFwCfgSelectorAddress ( VOID  )

To get firmware configure selector address.

Parameters
VOID
Return values
firmwareconfigure selector address

Definition at line 37 of file QemuFwCfgMmioDxe.c.

◆ VOID() [1/2]

VOID ( EFIAPI *  InternalQemuFwCfgReadBytes)

Reads firmware configuration bytes into a buffer

Parameters
[in]SizeSize in bytes to read
[in]BufferBuffer to store data into (OPTIONAL if Size is 0)

Writes bytes from a buffer to firmware configuration

Parameters
[in]SizeSize in bytes to write
[in]BufferBuffer to transfer data from (OPTIONAL if Size is 0)

Skips bytes in firmware configuration

Parameters
[in]SizeSize in bytes to skip

◆ VOID() [2/2]

typedef VOID ( EFIAPI  READ_BYTES_FUNCTION)

Reads firmware configuration bytes into a buffer

Parameters
[in]SizeSize in bytes to read
[in]BufferBuffer to store data into (OPTIONAL if Size is 0)

Writes bytes from a buffer to firmware configuration

Parameters
[in]SizeSize in bytes to write
[in]BufferBuffer to transfer data from (OPTIONAL if Size is 0)

Skips bytes in firmware configuration

Parameters
[in]SizeSize in bytes to skip