]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/AcpiPlatformDxe: Use XenPlatformLib
authorAnthony PERARD <anthony.perard@citrix.com>
Tue, 13 Aug 2019 11:30:58 +0000 (12:30 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 21 Aug 2019 16:03:49 +0000 (18:03 +0200)
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>

OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h
OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf
OvmfPkg/AcpiPlatformDxe/Xen.c
OvmfPkg/OvmfPkgIa32.dsc
OvmfPkg/OvmfPkgIa32X64.dsc
OvmfPkg/OvmfPkgX64.dsc

index 3037afcf18fdf53c9a4ff0a68859a082bda42c6a..9597e028e4a7e2a6836edb0d3962fa1379e355b4 100644 (file)
@@ -19,6 +19,7 @@
 #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
@@ -52,11 +53,6 @@ QemuInstallAcpiTable (
   OUT  UINTN                         *TableKey\r
   );\r
 \r
-BOOLEAN\r
-XenDetected (\r
-  VOID\r
-  );\r
-\r
 EFI_STATUS\r
 EFIAPI\r
 InstallXenTables (\r
index 24634eeae21abdfa8537db559bfd9abab3582966..e486b8afa56da521647a92687754b26a08249b77 100644 (file)
   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
@@ -58,7 +58,6 @@
   gEfiPciIoProtocolGuid                         # PROTOCOL SOMETIMES_CONSUMED\r
 \r
 [Guids]\r
-  gEfiXenInfoGuid\r
   gRootBridgesConnectedEventGroupGuid\r
 \r
 [Pcd]\r
index e4e47bf0e8626f9844d39fa8a4b197eb764c237e..82794b933e4bc7a24f5a390651860d89987b7592 100644 (file)
@@ -9,8 +9,6 @@
 **/ \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
index 6ab7300186944233a2b2ca667d6166281c2a5951..66e944436a691f581042c087565363056cc2b297 100644 (file)
   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
index f163aa26713274d4159180c3e7430b3295aa0a78..51c2bfb44f1421f2bff82732fdbb937807f20007 100644 (file)
   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
index fa98f16a3fb368c7a5ebda189088e275eb460233..ba7a75884490e90f2655459a918c227f978f97cc 100644 (file)
   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