From bc5df19872031503a78dac91bb0e415ba71c7996 Mon Sep 17 00:00:00 2001 From: Anthony PERARD Date: Tue, 13 Aug 2019 12:31:11 +0100 Subject: OvmfPkg/PlatformBootManagerLib: Use XenDetected from XenPlatformLib Replace the XenDetected() implementation by the one from XenPlatformLib. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 Signed-off-by: Anthony PERARD Reviewed-by: Laszlo Ersek Message-Id: <20190813113119.14804-28-anthony.perard@citrix.com> --- .../Library/PlatformBootManagerLib/BdsPlatform.c | 34 +--------------------- .../PlatformBootManagerLib.inf | 2 +- 2 files changed, 2 insertions(+), 34 deletions(-) (limited to 'OvmfPkg') diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c index 797731a41c..d5d5d20fd8 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c @@ -7,11 +7,11 @@ **/ #include "BdsPlatform.h" -#include #include #include #include #include +#include // @@ -1225,38 +1225,6 @@ PciAcpiInitialization ( IoOr16 ((PciRead32 (Pmba) & ~BIT0) + 4, BIT0); } -/** - This function detects if OVMF is running on Xen. - -**/ -STATIC -BOOLEAN -XenDetected ( - VOID - ) -{ - EFI_HOB_GUID_TYPE *GuidHob; - STATIC INTN FoundHob = -1; - - if (FoundHob == 0) { - return FALSE; - } else if (FoundHob == 1) { - return TRUE; - } - - // - // See if a XenInfo HOB is available - // - GuidHob = GetFirstGuidHob (&gEfiXenInfoGuid); - if (GuidHob == NULL) { - FoundHob = 0; - return FALSE; - } - - FoundHob = 1; - return TRUE; -} - EFI_STATUS EFIAPI ConnectRecursivelyIfPciMassStorage ( diff --git a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf index 060a3ab4c5..04d614cd49 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf +++ b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf @@ -54,6 +54,7 @@ UefiLib PlatformBmPrintScLib Tcg2PhysicalPresenceLib + XenPlatformLib [Pcd] gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent @@ -73,7 +74,6 @@ gEfiFirmwareVolume2ProtocolGuid # PROTOCOL SOMETIMES_CONSUMED [Guids] - gEfiXenInfoGuid gEfiEndOfDxeEventGroupGuid gRootBridgesConnectedEventGroupGuid gUefiShellFileGuid -- cgit v1.2.3