TianoCore EDK2 master
|
#include <Protocol/ComponentName.h>
#include <Protocol/DriverBinding.h>
#include <Protocol/PciIo.h>
#include <Protocol/VirtioDevice.h>
#include <IndustryStandard/Virtio.h>
Go to the source code of this file.
Data Structures | |
struct | VIRTIO_PCI_DEVICE |
Macros | |
#define | VIRTIO_PCI_DEVICE_SIGNATURE SIGNATURE_32 ('V', 'P', 'C', 'I') |
#define | VIRTIO_PCI_DEVICE_FROM_VIRTIO_DEVICE(Device) CR (Device, VIRTIO_PCI_DEVICE, VirtioDevice, VIRTIO_PCI_DEVICE_SIGNATURE) |
Internal definitions for the VirtIo PCI Device driver
Copyright (C) 2013, ARM Ltd Copyright (c) 2017, AMD Inc, All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file VirtioPciDevice.h.
#define VIRTIO_PCI_DEVICE_FROM_VIRTIO_DEVICE | ( | Device | ) | CR (Device, VIRTIO_PCI_DEVICE, VirtioDevice, VIRTIO_PCI_DEVICE_SIGNATURE) |
Definition at line 32 of file VirtioPciDevice.h.
#define VIRTIO_PCI_DEVICE_SIGNATURE SIGNATURE_32 ('V', 'P', 'C', 'I') |
Definition at line 22 of file VirtioPciDevice.h.
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 VirtioPciIoRead | ( | IN VIRTIO_PCI_DEVICE * | Dev, |
IN UINTN | FieldOffset, | ||
IN UINTN | FieldSize, | ||
IN UINTN | BufferSize, | ||
OUT VOID * | Buffer | ||
) |
Read a word from Region 0 of the device specified by PciIo.
Region 0 must be an iomem region. This is an internal function for the PCI implementation of the protocol.
[in] | Dev | Virtio PCI device. |
[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 69 of file VirtioPciDevice.c.
EFI_STATUS EFIAPI VirtioPciIoWrite | ( | IN VIRTIO_PCI_DEVICE * | Dev, |
IN UINTN | FieldOffset, | ||
IN UINTN | FieldSize, | ||
IN UINT64 | Value | ||
) |
Write a word into Region 0 of the device specified by PciIo.
Region 0 must be an iomem region. This is an internal function for the PCI implementation of the protocol.
[in] | Dev | Virtio PCI device. |
[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 152 of file VirtioPciDevice.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.