]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.h
OvmfPkg/VirtioMmioDeviceLib: implement IOMMU-like member functions
[mirror_edk2.git] / OvmfPkg / Library / VirtioMmioDeviceLib / VirtioMmioDevice.h
index bedd635e1a861f489e6a1486912192ad11a981ab..e5881d537f09349bf8f0518ee761d88c5151f26a 100644 (file)
@@ -3,6 +3,7 @@
   Internal definitions for the VirtIo MMIO Device driver\r
 \r
   Copyright (C) 2013, ARM Ltd\r
   Internal definitions for the VirtIo MMIO Device driver\r
 \r
   Copyright (C) 2013, ARM Ltd\r
+  Copyright (C) 2017, AMD Inc. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
@@ -25,6 +26,7 @@
 #include <Library/IoLib.h>\r
 #include <Library/UefiLib.h>\r
 #include <Library/VirtioMmioDeviceLib.h>\r
 #include <Library/IoLib.h>\r
 #include <Library/UefiLib.h>\r
 #include <Library/VirtioMmioDeviceLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
 \r
 #define VIRTIO_MMIO_DEVICE_SIGNATURE  SIGNATURE_32 ('V', 'M', 'I', 'O')\r
 \r
 \r
 #define VIRTIO_MMIO_DEVICE_SIGNATURE  SIGNATURE_32 ('V', 'M', 'I', 'O')\r
 \r
@@ -137,4 +139,38 @@ VirtioMmioSetGuestFeatures (
   IN UINT64                  Features\r
   );\r
 \r
   IN UINT64                  Features\r
   );\r
 \r
+EFI_STATUS\r
+EFIAPI\r
+VirtioMmioAllocateSharedPages (\r
+  IN  VIRTIO_DEVICE_PROTOCOL        *This,\r
+  IN  UINTN                         NumPages,\r
+  OUT VOID                          **HostAddress\r
+  );\r
+\r
+VOID\r
+EFIAPI\r
+VirtioMmioFreeSharedPages (\r
+  IN  VIRTIO_DEVICE_PROTOCOL        *This,\r
+  IN  UINTN                         NumPages,\r
+  IN  VOID                          *HostAddress\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+VirtioMmioMapSharedBuffer (\r
+  IN      VIRTIO_DEVICE_PROTOCOL        *This,\r
+  IN      VIRTIO_MAP_OPERATION          Operation,\r
+  IN      VOID                          *HostAddress,\r
+  IN OUT  UINTN                         *NumberOfBytes,\r
+  OUT     EFI_PHYSICAL_ADDRESS          *DeviceAddress,\r
+  OUT     VOID                          **Mapping\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+VirtioMmioUnmapSharedBuffer (\r
+  IN  VIRTIO_DEVICE_PROTOCOL        *This,\r
+  IN  VOID                          *Mapping\r
+  );\r
+\r
 #endif // _VIRTIO_MMIO_DEVICE_INTERNAL_H_\r
 #endif // _VIRTIO_MMIO_DEVICE_INTERNAL_H_\r