TianoCore EDK2 master
|
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiLib.h>
#include "VirtioPciDevice.h"
Go to the source code of this file.
This driver produces Virtio Device Protocol instances for Virtio PCI devices.
Copyright (C) 2012, Red Hat, Inc. Copyright (c) 2012, Intel Corporation. All rights reserved.
Copyright (C) 2013, ARM Ltd. Copyright (C) 2017, AMD Inc, All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file VirtioPciFunctions.c.
EFI_STATUS EFIAPI VirtioPciAllocateSharedPages | ( | IN VIRTIO_DEVICE_PROTOCOL * | This, |
IN UINTN | NumPages, | ||
OUT VOID ** | HostAddress | ||
) |
Definition at line 320 of file VirtioPciFunctions.c.
EFI_STATUS EFIAPI VirtioPciDeviceRead | ( | IN VIRTIO_DEVICE_PROTOCOL * | This, |
IN UINTN | FieldOffset, | ||
IN UINTN | FieldSize, | ||
IN UINTN | BufferSize, | ||
OUT VOID * | Buffer | ||
) |
Read a word from Region 0 of the device specified by VirtIo Device protocol.
The function implements the ReadDevice protocol member of VIRTIO_DEVICE_PROTOCOL.
[in] | This | VirtIo Device protocol. |
[in] | FieldOffset | Source offset. |
[in] | FieldSize | Source field size, must be in { 1, 2, 4, 8 }. |
[in] | BufferSize | Number of bytes available in the target buffer. Must equal FieldSize. |
[out] | Buffer | Target buffer. |
Definition at line 44 of file VirtioPciFunctions.c.
EFI_STATUS EFIAPI VirtioPciDeviceWrite | ( | IN VIRTIO_DEVICE_PROTOCOL * | This, |
IN UINTN | FieldOffset, | ||
IN UINTN | FieldSize, | ||
IN UINT64 | Value | ||
) |
Write a word into Region 0 of the device specified by VirtIo Device protocol.
[in] | This | VirtIo Device protocol. |
[in] | FieldOffset | Destination offset. |
[in] | FieldSize | Destination field size, must be in { 1, 2, 4, 8 }. |
[in] | Value | Little endian value to write, converted to UINT64. The least significant FieldSize bytes will be used. |
Definition at line 84 of file VirtioPciFunctions.c.
VOID EFIAPI VirtioPciFreeSharedPages | ( | IN VIRTIO_DEVICE_PROTOCOL * | This, |
IN UINTN | NumPages, | ||
IN VOID * | HostAddress | ||
) |
Definition at line 339 of file VirtioPciFunctions.c.
EFI_STATUS EFIAPI VirtioPciGetDeviceFeatures | ( | IN VIRTIO_DEVICE_PROTOCOL * | This, |
OUT UINT64 * | DeviceFeatures | ||
) |
Definition at line 105 of file VirtioPciFunctions.c.
EFI_STATUS EFIAPI VirtioPciGetDeviceStatus | ( | IN VIRTIO_DEVICE_PROTOCOL * | This, |
OUT UINT8 * | DeviceStatus | ||
) |
Definition at line 160 of file VirtioPciFunctions.c.
EFI_STATUS EFIAPI VirtioPciGetQueueSize | ( | IN VIRTIO_DEVICE_PROTOCOL * | This, |
OUT UINT16 * | QueueNumMax | ||
) |
Definition at line 136 of file VirtioPciFunctions.c.
EFI_STATUS EFIAPI VirtioPciMapSharedBuffer | ( | IN VIRTIO_DEVICE_PROTOCOL * | This, |
IN VIRTIO_MAP_OPERATION | Operation, | ||
IN VOID * | HostAddress, | ||
IN OUT UINTN * | NumberOfBytes, | ||
OUT EFI_PHYSICAL_ADDRESS * | DeviceAddress, | ||
OUT VOID ** | Mapping | ||
) |
Definition at line 350 of file VirtioPciFunctions.c.
EFI_STATUS EFIAPI VirtioPciSetDeviceStatus | ( | IN VIRTIO_DEVICE_PROTOCOL * | This, |
IN UINT8 | DeviceStatus | ||
) |
Definition at line 301 of file VirtioPciFunctions.c.
EFI_STATUS EFIAPI VirtioPciSetGuestFeatures | ( | IN VIRTIO_DEVICE_PROTOCOL * | This, |
IN UINT64 | Features | ||
) |
Definition at line 184 of file VirtioPciFunctions.c.
EFI_STATUS EFIAPI VirtioPciSetPageSize | ( | IN VIRTIO_DEVICE_PROTOCOL * | This, |
IN UINT32 | PageSize | ||
) |
Definition at line 258 of file VirtioPciFunctions.c.
EFI_STATUS EFIAPI VirtioPciSetQueueAddress | ( | IN VIRTIO_DEVICE_PROTOCOL * | This, |
IN VRING * | Ring, | ||
IN UINT64 | RingBaseShift | ||
) |
Definition at line 207 of file VirtioPciFunctions.c.
EFI_STATUS EFIAPI VirtioPciSetQueueAlignment | ( | IN VIRTIO_DEVICE_PROTOCOL * | This, |
IN UINT32 | Alignment | ||
) |
Definition at line 248 of file VirtioPciFunctions.c.
EFI_STATUS EFIAPI VirtioPciSetQueueNotify | ( | IN VIRTIO_DEVICE_PROTOCOL * | This, |
IN UINT16 | Index | ||
) |
Definition at line 268 of file VirtioPciFunctions.c.
EFI_STATUS EFIAPI VirtioPciSetQueueSel | ( | IN VIRTIO_DEVICE_PROTOCOL * | This, |
IN UINT16 | Sel | ||
) |
Definition at line 229 of file VirtioPciFunctions.c.
EFI_STATUS EFIAPI VirtioPciSetQueueSize | ( | IN VIRTIO_DEVICE_PROTOCOL * | This, |
IN UINT16 | Size | ||
) |
Definition at line 287 of file VirtioPciFunctions.c.
EFI_STATUS EFIAPI VirtioPciUnmapSharedBuffer | ( | IN VIRTIO_DEVICE_PROTOCOL * | This, |
IN VOID * | Mapping | ||
) |
Definition at line 367 of file VirtioPciFunctions.c.