32READ_BYTES_FUNCTION *InternalQemuFwCfgReadBytes =
MmioReadBytes;
34SKIP_BYTES_FUNCTION *InternalQemuFwCfgSkipBytes =
MmioSkipBytes;
49 &gQemuFirmwareResourceHobGuid,
50 (VOID *)FwCfgResource,
73 if (GuidHob ==
NULL) {
111 IN FIRMWARE_CONFIG_ITEM QemuFwCfgItem
126 IN VOID *Buffer OPTIONAL
133 #if defined (MDE_CPU_AARCH64) || defined (MDE_CPU_RISCV64) || defined (MDE_CPU_LOONGARCH64)
143 #if defined (MDE_CPU_AARCH64) || defined (MDE_CPU_RISCV64) || defined (MDE_CPU_LOONGARCH64)
190 IN OUT VOID *Buffer OPTIONAL,
198 Control == FW_CFG_DMA_CTL_WRITE || Control == FW_CFG_DMA_CTL_READ ||
199 Control == FW_CFG_DMA_CTL_SKIP
206 ASSERT (Size <= MAX_UINT32);
220 #if defined (MDE_CPU_AARCH64) || defined (MDE_CPU_RISCV64) || defined (MDE_CPU_LOONGARCH64)
233 ASSERT ((Status & FW_CFG_DMA_CTL_ERROR) == 0);
234 }
while (Status != 0);
249 IN VOID *Buffer OPTIONAL
273 InternalQemuFwCfgReadBytes (Size, Buffer);
286 IN VOID *Buffer OPTIONAL
291 for (Idx = 0; Idx < Size; ++Idx) {
303 IN VOID *Buffer OPTIONAL
327 InternalQemuFwCfgWriteBytes (Size, Buffer);
341 UINT8 SkipBuffer[256];
351 ChunkSize =
MIN (Size,
sizeof SkipBuffer);
385 InternalQemuFwCfgSkipBytes (Size);
478 OUT FIRMWARE_CONFIG_ITEM *Item,
492 for (Idx = 0; Idx < Count; ++Idx) {
495 CHAR8 FName[QEMU_FW_CFG_FNAME_SIZE];
500 InternalQemuFwCfgReadBytes (
sizeof (FName), FName);
503 *Item = (FIRMWARE_CONFIG_ITEM)
SwapBytes16 (FileSelect);
VOID *EFIAPI GetFirstGuidHob(IN CONST EFI_GUID *Guid)
VOID *EFIAPI BuildGuidDataHob(IN CONST EFI_GUID *Guid, IN VOID *Data, IN UINTN DataLength)
UINT16 EFIAPI SwapBytes16(IN UINT16 Value)
INTN EFIAPI AsciiStrCmp(IN CONST CHAR8 *FirstString, IN CONST CHAR8 *SecondString)
VOID EFIAPI MemoryFence(VOID)
UINT32 EFIAPI SwapBytes32(IN UINT32 Value)
UINT64 EFIAPI SwapBytes64(IN UINT64 Value)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
UINT64 EFIAPI MmioWrite64(IN UINTN Address, IN UINT64 Value)
UINT64 EFIAPI MmioRead64(IN UINTN Address)
UINT16 EFIAPI MmioRead16(IN UINTN Address)
UINT8 EFIAPI MmioRead8(IN UINTN Address)
UINT8 EFIAPI MmioWrite8(IN UINTN Address, IN UINT8 Value)
UINT32 EFIAPI MmioRead32(IN UINTN Address)
UINT16 EFIAPI MmioWrite16(IN UINTN Address, IN UINT16 Value)
UINT32 EFIAPI MmioWrite32(IN UINTN Address, IN UINT32 Value)
#define RETURN_UNSUPPORTED
VOID EFIAPI DmaSkipBytes(IN UINTN Size)
UINT32 EFIAPI QemuFwCfgRead32(VOID)
QEMU_FW_CFG_RESOURCE * QemuGetFwCfgResourceHob(VOID)
VOID EFIAPI DmaReadBytes(IN UINTN Size, IN VOID *Buffer OPTIONAL)
VOID EFIAPI QemuFwCfgWriteBytes(IN UINTN Size, IN VOID *Buffer)
VOID QemuBuildFwCfgResourceHob(IN QEMU_FW_CFG_RESOURCE *FwCfgResource)
VOID DmaTransferBytes(IN UINTN Size, IN OUT VOID *Buffer OPTIONAL, IN UINT32 Control)
VOID EFIAPI MmioReadBytes(IN UINTN Size, IN VOID *Buffer OPTIONAL)
UINT16 EFIAPI QemuFwCfgRead16(VOID)
UINT8 EFIAPI QemuFwCfgRead8(VOID)
RETURN_STATUS EFIAPI QemuFwCfgFindFile(IN CONST CHAR8 *Name, OUT FIRMWARE_CONFIG_ITEM *Item, OUT UINTN *Size)
UINT64 EFIAPI QemuFwCfgRead64(VOID)
VOID EFIAPI MmioWriteBytes(IN UINTN Size, IN VOID *Buffer OPTIONAL)
VOID EFIAPI QemuFwCfgSelectItem(IN FIRMWARE_CONFIG_ITEM QemuFwCfgItem)
VOID EFIAPI QemuFwCfgSkipBytes(IN UINTN Size)
BOOLEAN EFIAPI QemuFwCfgIsAvailable(VOID)
VOID EFIAPI DmaWriteBytes(IN UINTN Size, IN VOID *Buffer OPTIONAL)
VOID EFIAPI MmioSkipBytes(IN UINTN Size)
VOID EFIAPI QemuFwCfgReadBytes(IN UINTN Size, IN VOID *Buffer)
UINTN EFIAPI QemuGetFwCfgDmaAddress(VOID)
UINTN EFIAPI QemuGetFwCfgDataAddress(VOID)
UINTN EFIAPI QemuGetFwCfgSelectorAddress(VOID)