]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c
OvmfPkg/PlatformDxe: list "Platform.h" in the INF file
[mirror_edk2.git] / OvmfPkg / VirtioPciDeviceDxe / VirtioPciDevice.c
index 2647bd39189bad481cce92cb9782e287cb84c2b1..d4b4ec21c34d75d8b389538c3b97d417ae6b6eb9 100644 (file)
@@ -3,8 +3,9 @@
   This driver produces Virtio Device Protocol instances for Virtio PCI devices.\r
 \r
   Copyright (C) 2012, Red Hat, Inc.\r
-  Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.<BR>\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
@@ -30,7 +31,6 @@ STATIC VIRTIO_DEVICE_PROTOCOL mDeviceProtocolTemplate = {
   0,                                    // SubSystemDeviceId\r
   VirtioPciGetDeviceFeatures,           // GetDeviceFeatures\r
   VirtioPciSetGuestFeatures,            // SetGuestFeatures\r
-  VirtioPciGetQueueAddress,             // GetQueueAddress\r
   VirtioPciSetQueueAddress,             // SetQueueAddress\r
   VirtioPciSetQueueSel,                 // SetQueueSel\r
   VirtioPciSetQueueNotify,              // SetQueueNotify\r
@@ -41,7 +41,11 @@ STATIC VIRTIO_DEVICE_PROTOCOL mDeviceProtocolTemplate = {
   VirtioPciGetDeviceStatus,             // GetDeviceStatus\r
   VirtioPciSetDeviceStatus,             // SetDeviceStatus\r
   VirtioPciDeviceWrite,                 // WriteDevice\r
-  VirtioPciDeviceRead                   // ReadDevice\r
+  VirtioPciDeviceRead,                  // ReadDevice\r
+  VirtioPciAllocateSharedPages,         // AllocateSharedPages\r
+  VirtioPciFreeSharedPages,             // FreeSharedPages\r
+  VirtioPciMapSharedBuffer,             // MapSharedBuffer\r
+  VirtioPciUnmapSharedBuffer,           // UnmapSharedBuffer\r
 };\r
 \r
 /**\r
@@ -394,7 +398,7 @@ VirtioPciUninit (
 \r
   After we've pronounced support for a specific device in\r
   DriverBindingSupported(), we start managing said device (passed in by the\r
-  Driver Exeuction Environment) with the following service.\r
+  Driver Execution Environment) with the following service.\r
 \r
   See DriverBindingSupported() for specification references.\r
 \r
@@ -459,9 +463,13 @@ VirtioPciDeviceBindingStart (
     goto ClosePciIo;\r
   }\r
 \r
-  Status = Device->PciIo->Attributes (Device->PciIo,\r
-                         EfiPciIoAttributeOperationEnable,\r
-                         EFI_PCI_IO_ATTRIBUTE_IO, NULL);\r
+  Status = Device->PciIo->Attributes (\r
+                            Device->PciIo,\r
+                            EfiPciIoAttributeOperationEnable,\r
+                            (EFI_PCI_IO_ATTRIBUTE_IO |\r
+                             EFI_PCI_IO_ATTRIBUTE_BUS_MASTER),\r
+                            NULL\r
+                            );\r
   if (EFI_ERROR (Status)) {\r
     goto ClosePciIo;\r
   }\r