]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c
OvmfPkg: drop redundant VendorID check in VirtioMmioDeviceLib
[mirror_edk2.git] / OvmfPkg / Library / VirtioMmioDeviceLib / VirtioMmioDevice.c
index fce934e1e9532c316aaa3c33a930b6880e4e120d..6dbbba008c75fa3d1d5d407867c58ad6266ca6fd 100644 (file)
@@ -5,13 +5,7 @@
   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
-  distribution. The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
-  WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -20,7 +14,7 @@
 \r
 #include "VirtioMmioDevice.h"\r
 \r
-static VIRTIO_DEVICE_PROTOCOL mMmioDeviceProtocolTemplate = {\r
+STATIC CONST VIRTIO_DEVICE_PROTOCOL mMmioDeviceProtocolTemplate = {\r
     0,                                     // Revision\r
     0,                                     // SubSystemDeviceId\r
     VirtioMmioGetDeviceFeatures,           // GetDeviceFeatures\r
@@ -64,7 +58,6 @@ VirtioMmioInit (
   )\r
 {\r
   UINT32     MagicValue;\r
-  UINT32     VendorId;\r
   UINT32     Version;\r
 \r
   //\r
@@ -90,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((EFI_D_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