diff options
author | Anthony PERARD <anthony.perard@citrix.com> | 2019-08-13 12:30:58 +0100 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2019-08-21 18:03:49 +0200 |
commit | 3afa2ed53fe0878ae205d62bba962a0463d41260 (patch) | |
tree | 4a16a9a295014839d0359490d878fe9654e80bf7 /OvmfPkg | |
parent | f496443eb3d5e58fa8468a96ac10975d52c30071 (diff) | |
download | edk2-3afa2ed53fe0878ae205d62bba962a0463d41260.tar.gz edk2-3afa2ed53fe0878ae205d62bba962a0463d41260.tar.bz2 edk2-3afa2ed53fe0878ae205d62bba962a0463d41260.zip |
OvmfPkg/AcpiPlatformDxe: Use XenPlatformLib
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>
Diffstat (limited to 'OvmfPkg')
-rw-r--r-- | OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h | 6 | ||||
-rw-r--r-- | OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf | 3 | ||||
-rw-r--r-- | OvmfPkg/AcpiPlatformDxe/Xen.c | 24 | ||||
-rw-r--r-- | OvmfPkg/OvmfPkgIa32.dsc | 1 | ||||
-rw-r--r-- | OvmfPkg/OvmfPkgIa32X64.dsc | 1 | ||||
-rw-r--r-- | OvmfPkg/OvmfPkgX64.dsc | 1 |
6 files changed, 5 insertions, 31 deletions
diff --git a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h b/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h index 3037afcf18..9597e028e4 100644 --- a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h +++ b/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h @@ -19,6 +19,7 @@ #include <Library/UefiBootServicesTableLib.h>
#include <Library/DebugLib.h>
#include <Library/PcdLib.h>
+#include <Library/XenPlatformLib.h>
#include <IndustryStandard/Acpi.h>
@@ -52,11 +53,6 @@ QemuInstallAcpiTable ( OUT UINTN *TableKey
);
-BOOLEAN
-XenDetected (
- VOID
- );
-
EFI_STATUS
EFIAPI
InstallXenTables (
diff --git a/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf b/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf index 24634eeae2..e486b8afa5 100644 --- a/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf +++ b/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf @@ -44,13 +44,13 @@ DebugLib
UefiBootServicesTableLib
UefiDriverEntryPoint
- HobLib
QemuFwCfgLib
QemuFwCfgS3Lib
MemoryAllocationLib
BaseLib
DxeServicesTableLib
OrderedCollectionLib
+ XenPlatformLib
[Protocols]
gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUMED
@@ -58,7 +58,6 @@ gEfiPciIoProtocolGuid # PROTOCOL SOMETIMES_CONSUMED
[Guids]
- gEfiXenInfoGuid
gRootBridgesConnectedEventGroupGuid
[Pcd]
diff --git a/OvmfPkg/AcpiPlatformDxe/Xen.c b/OvmfPkg/AcpiPlatformDxe/Xen.c index e4e47bf0e8..82794b933e 100644 --- a/OvmfPkg/AcpiPlatformDxe/Xen.c +++ b/OvmfPkg/AcpiPlatformDxe/Xen.c @@ -9,8 +9,6 @@ **/
#include "AcpiPlatform.h"
-#include <Library/HobLib.h>
-#include <Guid/XenInfo.h>
#include <Library/BaseLib.h>
#define XEN_ACPI_PHYSICAL_ADDRESS 0x000EA020
@@ -19,28 +17,6 @@ EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER *XenAcpiRsdpStructurePtr = NULL;
/**
- This function detects if OVMF is running on Xen.
-
-**/
-BOOLEAN
-XenDetected (
- VOID
- )
-{
- EFI_HOB_GUID_TYPE *GuidHob;
-
- //
- // See if a XenInfo HOB is available
- //
- GuidHob = GetFirstGuidHob (&gEfiXenInfoGuid);
- if (GuidHob == NULL) {
- return FALSE;
- }
-
- return TRUE;
-}
-
-/**
Get the address of Xen ACPI Root System Description Pointer (RSDP)
structure.
diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index 6ab7300186..66e944436a 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -200,6 +200,7 @@ SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf
+ XenPlatformLib|OvmfPkg/Library/XenPlatformLib/XenPlatformLib.inf
!if $(TPM2_ENABLE) == TRUE
Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index f163aa2671..51c2bfb44f 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -205,6 +205,7 @@ SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf
+ XenPlatformLib|OvmfPkg/Library/XenPlatformLib/XenPlatformLib.inf
!if $(TPM2_ENABLE) == TRUE
Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index fa98f16a3f..ba7a758844 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -205,6 +205,7 @@ SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf
+ XenPlatformLib|OvmfPkg/Library/XenPlatformLib/XenPlatformLib.inf
!if $(TPM2_ENABLE) == TRUE
Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf
|