]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: drop redundant VendorID check in VirtioMmioDeviceLib
authorLeif Lindholm <leif@nuviainc.com>
Sat, 12 Sep 2020 16:19:57 +0000 (17:19 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 17 Sep 2020 12:01:11 +0000 (12:01 +0000)
There is a DEBUG warning printout in VirtioMmioDeviceLib if the current
device's VendorID does not match the traditional 16-bit Red Hat PCIe
vendor ID used with virtio-pci. The virtio-mmio vendor ID is 32-bit and
has no connection to the PCIe registry.

Most specifically, this causes a bunch of noise when booting an AArch64
QEMU platform, since QEMU's virtio-mmio implementation used 'QEMU' as
the vendor ID:
VirtioMmioInit: Warning:
  The VendorId (0x554D4551) does not match the VirtIo VendorId (0x1AF4).

Drop the warning message.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Signed-off-by: Leif Lindholm <leif@nuviainc.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c

index 2f20272c1445be542359e8654f088f1e90d25d9e..6dbbba008c75fa3d1d5d407867c58ad6266ca6fd 100644 (file)
@@ -58,7 +58,6 @@ VirtioMmioInit (
   )\r
 {\r
   UINT32     MagicValue;\r
-  UINT32     VendorId;\r
   UINT32     Version;\r
 \r
   //\r
@@ -84,20 +83,6 @@ VirtioMmioInit (
     return EFI_UNSUPPORTED;\r
   }\r
 \r
-  //\r
-  // Double-check MMIO-specific values\r
-  //\r
-  VendorId = VIRTIO_CFG_READ (Device, VIRTIO_MMIO_OFFSET_VENDOR_ID);\r
-  if (VendorId != VIRTIO_VENDOR_ID) {\r
-    //\r
-    // The ARM Base and Foundation Models do not report a valid VirtIo VendorId.\r
-    // They return a value of 0x0 for the VendorId.\r
-    //\r
-    DEBUG((DEBUG_WARN, "VirtioMmioInit: Warning: The VendorId (0x%X) does not "\r
-                       "match the VirtIo VendorId (0x%X).\n",\r
-                       VendorId, VIRTIO_VENDOR_ID));\r
-  }\r
-\r
   return EFI_SUCCESS;\r
 }\r
 \r