This patch replace the XenDetected() function by the one in
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-15-anthony.perard@citrix.com>
#include <Library/UefiBootServicesTableLib.h>\r
#include <Library/DebugLib.h>\r
#include <Library/PcdLib.h>\r
+#include <Library/XenPlatformLib.h>\r
\r
#include <IndustryStandard/Acpi.h>\r
\r
OUT UINTN *TableKey\r
);\r
\r
-BOOLEAN\r
-XenDetected (\r
- VOID\r
- );\r
-\r
EFI_STATUS\r
EFIAPI\r
InstallXenTables (\r
DebugLib\r
UefiBootServicesTableLib\r
UefiDriverEntryPoint\r
- HobLib\r
QemuFwCfgLib\r
QemuFwCfgS3Lib\r
MemoryAllocationLib\r
BaseLib\r
DxeServicesTableLib\r
OrderedCollectionLib\r
+ XenPlatformLib\r
\r
[Protocols]\r
gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
gEfiPciIoProtocolGuid # PROTOCOL SOMETIMES_CONSUMED\r
\r
[Guids]\r
- gEfiXenInfoGuid\r
gRootBridgesConnectedEventGroupGuid\r
\r
[Pcd]\r
**/ \r
\r
#include "AcpiPlatform.h"\r
-#include <Library/HobLib.h>\r
-#include <Guid/XenInfo.h>\r
#include <Library/BaseLib.h>\r
\r
#define XEN_ACPI_PHYSICAL_ADDRESS 0x000EA020\r
\r
EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER *XenAcpiRsdpStructurePtr = NULL;\r
\r
-/**\r
- This function detects if OVMF is running on Xen.\r
-\r
-**/\r
-BOOLEAN\r
-XenDetected (\r
- VOID\r
- )\r
-{\r
- EFI_HOB_GUID_TYPE *GuidHob;\r
-\r
- //\r
- // See if a XenInfo HOB is available\r
- //\r
- GuidHob = GetFirstGuidHob (&gEfiXenInfoGuid);\r
- if (GuidHob == NULL) {\r
- return FALSE;\r
- }\r
-\r
- return TRUE;\r
-}\r
-\r
/**\r
Get the address of Xen ACPI Root System Description Pointer (RSDP)\r
structure.\r
SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf\r
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf\r
XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf\r
+ XenPlatformLib|OvmfPkg/Library/XenPlatformLib/XenPlatformLib.inf\r
\r
!if $(TPM2_ENABLE) == TRUE\r
Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf\r
SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf\r
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf\r
XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf\r
+ XenPlatformLib|OvmfPkg/Library/XenPlatformLib/XenPlatformLib.inf\r
\r
!if $(TPM2_ENABLE) == TRUE\r
Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf\r
SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf\r
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf\r
XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf\r
+ XenPlatformLib|OvmfPkg/Library/XenPlatformLib/XenPlatformLib.inf\r
\r
!if $(TPM2_ENABLE) == TRUE\r
Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf\r