]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/PlatformBootManagerLib: Use XenDetected from XenPlatformLib
authorAnthony PERARD <anthony.perard@citrix.com>
Tue, 13 Aug 2019 11:31:11 +0000 (12:31 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 21 Aug 2019 16:03:49 +0000 (18:03 +0200)
Replace the XenDetected() implementation by the one from
XenPlatformLib.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20190813113119.14804-28-anthony.perard@citrix.com>

OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf

index 797731a41c29eb08f172e376b9da59540dbc9b31..d5d5d20fd8569a2e8a3fb015be9fe58159e12574 100644 (file)
@@ -7,11 +7,11 @@
 **/\r
 \r
 #include "BdsPlatform.h"\r
-#include <Guid/XenInfo.h>\r
 #include <Guid/RootBridgesConnectedEventGroup.h>\r
 #include <Protocol/FirmwareVolume2.h>\r
 #include <Library/PlatformBmPrintScLib.h>\r
 #include <Library/Tcg2PhysicalPresenceLib.h>\r
+#include <Library/XenPlatformLib.h>\r
 \r
 \r
 //\r
@@ -1225,38 +1225,6 @@ PciAcpiInitialization (
   IoOr16 ((PciRead32 (Pmba) & ~BIT0) + 4, BIT0);\r
 }\r
 \r
-/**\r
-  This function detects if OVMF is running on Xen.\r
-\r
-**/\r
-STATIC\r
-BOOLEAN\r
-XenDetected (\r
-  VOID\r
-  )\r
-{\r
-  EFI_HOB_GUID_TYPE         *GuidHob;\r
-  STATIC INTN               FoundHob = -1;\r
-\r
-  if (FoundHob == 0) {\r
-    return FALSE;\r
-  } else if (FoundHob == 1) {\r
-    return TRUE;\r
-  }\r
-\r
-  //\r
-  // See if a XenInfo HOB is available\r
-  //\r
-  GuidHob = GetFirstGuidHob (&gEfiXenInfoGuid);\r
-  if (GuidHob == NULL) {\r
-    FoundHob = 0;\r
-    return FALSE;\r
-  }\r
-\r
-  FoundHob = 1;\r
-  return TRUE;\r
-}\r
-\r
 EFI_STATUS\r
 EFIAPI\r
 ConnectRecursivelyIfPciMassStorage (\r
index 060a3ab4c50ed96f38d783b541ac626cee3292d6..04d614cd493870a57764ef6e2d8505143101b081 100644 (file)
@@ -54,6 +54,7 @@
   UefiLib\r
   PlatformBmPrintScLib\r
   Tcg2PhysicalPresenceLib\r
+  XenPlatformLib\r
 \r
 [Pcd]\r
   gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent\r
@@ -73,7 +74,6 @@
   gEfiFirmwareVolume2ProtocolGuid               # PROTOCOL SOMETIMES_CONSUMED\r
 \r
 [Guids]\r
-  gEfiXenInfoGuid\r
   gEfiEndOfDxeEventGroupGuid\r
   gRootBridgesConnectedEventGroupGuid\r
   gUefiShellFileGuid\r