mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 16:14:04 +02:00
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 <anthony.perard@citrix.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20190813113119.14804-28-anthony.perard@citrix.com>
This commit is contained in:
parent
054c3fe9b5
commit
bc5df19872
@ -7,11 +7,11 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
#include "BdsPlatform.h"
|
#include "BdsPlatform.h"
|
||||||
#include <Guid/XenInfo.h>
|
|
||||||
#include <Guid/RootBridgesConnectedEventGroup.h>
|
#include <Guid/RootBridgesConnectedEventGroup.h>
|
||||||
#include <Protocol/FirmwareVolume2.h>
|
#include <Protocol/FirmwareVolume2.h>
|
||||||
#include <Library/PlatformBmPrintScLib.h>
|
#include <Library/PlatformBmPrintScLib.h>
|
||||||
#include <Library/Tcg2PhysicalPresenceLib.h>
|
#include <Library/Tcg2PhysicalPresenceLib.h>
|
||||||
|
#include <Library/XenPlatformLib.h>
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -1225,38 +1225,6 @@ PciAcpiInitialization (
|
|||||||
IoOr16 ((PciRead32 (Pmba) & ~BIT0) + 4, BIT0);
|
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
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConnectRecursivelyIfPciMassStorage (
|
ConnectRecursivelyIfPciMassStorage (
|
||||||
|
@ -54,6 +54,7 @@
|
|||||||
UefiLib
|
UefiLib
|
||||||
PlatformBmPrintScLib
|
PlatformBmPrintScLib
|
||||||
Tcg2PhysicalPresenceLib
|
Tcg2PhysicalPresenceLib
|
||||||
|
XenPlatformLib
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent
|
gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent
|
||||||
@ -73,7 +74,6 @@
|
|||||||
gEfiFirmwareVolume2ProtocolGuid # PROTOCOL SOMETIMES_CONSUMED
|
gEfiFirmwareVolume2ProtocolGuid # PROTOCOL SOMETIMES_CONSUMED
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gEfiXenInfoGuid
|
|
||||||
gEfiEndOfDxeEventGroupGuid
|
gEfiEndOfDxeEventGroupGuid
|
||||||
gRootBridgesConnectedEventGroupGuid
|
gRootBridgesConnectedEventGroupGuid
|
||||||
gUefiShellFileGuid
|
gUefiShellFileGuid
|
||||||
|
Loading…
x
Reference in New Issue
Block a user