From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: citrix.com, ip: 216.71.155.144, mailfrom: anthony.perard@citrix.com) Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by groups.io with SMTP; Thu, 04 Jul 2019 07:57:39 -0700 Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa4.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ~all" Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: 7cNuWE1mrSMpjxZmKBccnWNbESsHjvak7ZW/khFwbqA4XFy8TMNFBZk3X8CNCmC2hs6KYhGeLe HNCxxLlKpwFVgPMqBrGdn25/ymiyE2RnBW7yFmEjCrQYFz3MwSuTRPtnC3hnJop4H4VYaAA9Ox 0DkaPh3LUTLTcs4Na4MIDSWAOJ/a4XwwGFyXZ+hWS8U+/j2PskqeSzab0OoqVeexOQz7MGANdA DYPKB4h+ZmLI8C8KwT52jGLBCNOZsR0+o5RvKhQ/Qee3yMj0F8gzxPwQ+i8DRzIe/A5hUCs9OY F18= X-SBRS: 2.7 X-MesageID: 2650915 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.63,451,1557201600"; d="scan'208";a="2650915" From: "Anthony PERARD" To: CC: , Ard Biesheuvel , Jordan Justen , Laszlo Ersek , Julien Grall , Anthony PERARD Subject: [PATCH v3 14/35] OvmfPkg/AcpiPlatformDxe: Use XenPlatformLib Date: Thu, 4 Jul 2019 15:42:12 +0100 Message-ID: <20190704144233.27968-15-anthony.perard@citrix.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190704144233.27968-1-anthony.perard@citrix.com> References: <20190704144233.27968-1-anthony.perard@citrix.com> MIME-Version: 1.0 Return-Path: anthony.perard@citrix.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain This patch replace the XenDetected() function by the one in XenPlatformLib. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1689 Signed-off-by: Anthony PERARD --- Notes: v3: - new patch, splited from the next patch (which was OvmfPkg/AcpiPlatformDxe: Use PVH RSDP if exist) OvmfPkg/OvmfPkgIa32.dsc | 1 + OvmfPkg/OvmfPkgIa32X64.dsc | 1 + OvmfPkg/OvmfPkgX64.dsc | 1 + OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf | 2 +- OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h | 6 +----- OvmfPkg/AcpiPlatformDxe/Xen.c | 24 --------------------- 6 files changed, 5 insertions(+), 30 deletions(-) diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index d60bcd5e54..1b116fe3b3 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -202,6 +202,7 @@ [LibraryClasses] SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf=0D OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib= /BaseOrderedCollectionRedBlackTreeLib.inf=0D XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf=0D + XenPlatformLib|OvmfPkg/Library/XenPlatformLib/XenPlatformLib.inf=0D =0D !if $(TPM2_ENABLE) =3D=3D TRUE=0D Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf=0D diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index ded3e8a464..bd8625a075 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -207,6 +207,7 @@ [LibraryClasses] SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf=0D OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib= /BaseOrderedCollectionRedBlackTreeLib.inf=0D XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf=0D + XenPlatformLib|OvmfPkg/Library/XenPlatformLib/XenPlatformLib.inf=0D =0D !if $(TPM2_ENABLE) =3D=3D TRUE=0D Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf=0D diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index 131f2b0b47..db9ba7cc15 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -207,6 +207,7 @@ [LibraryClasses] SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf=0D OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib= /BaseOrderedCollectionRedBlackTreeLib.inf=0D XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf=0D + XenPlatformLib|OvmfPkg/Library/XenPlatformLib/XenPlatformLib.inf=0D =0D !if $(TPM2_ENABLE) =3D=3D TRUE=0D Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf=0D diff --git a/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf b/OvmfPkg/AcpiPlat= formDxe/AcpiPlatformDxe.inf index 24634eeae2..eadace366d 100644 --- a/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf +++ b/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf @@ -44,13 +44,13 @@ [LibraryClasses] DebugLib=0D UefiBootServicesTableLib=0D UefiDriverEntryPoint=0D - HobLib=0D QemuFwCfgLib=0D QemuFwCfgS3Lib=0D MemoryAllocationLib=0D BaseLib=0D DxeServicesTableLib=0D OrderedCollectionLib=0D + XenPlatformLib=0D =0D [Protocols]=0D gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUMED= =0D diff --git a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h b/OvmfPkg/AcpiPlatformD= xe/AcpiPlatform.h index 3037afcf18..9597e028e4 100644 --- a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h +++ b/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h @@ -19,6 +19,7 @@ #include =0D #include =0D #include =0D +#include =0D =0D #include =0D =0D @@ -52,11 +53,6 @@ QemuInstallAcpiTable ( OUT UINTN *TableKey=0D );=0D =0D -BOOLEAN=0D -XenDetected (=0D - VOID=0D - );=0D -=0D EFI_STATUS=0D EFIAPI=0D InstallXenTables (=0D 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 @@ **/ =0D =0D #include "AcpiPlatform.h"=0D -#include =0D -#include =0D #include =0D =0D #define XEN_ACPI_PHYSICAL_ADDRESS 0x000EA020=0D @@ -18,28 +16,6 @@ =0D EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER *XenAcpiRsdpStructurePtr =3D= NULL;=0D =0D -/**=0D - This function detects if OVMF is running on Xen.=0D -=0D -**/=0D -BOOLEAN=0D -XenDetected (=0D - VOID=0D - )=0D -{=0D - EFI_HOB_GUID_TYPE *GuidHob;=0D -=0D - //=0D - // See if a XenInfo HOB is available=0D - //=0D - GuidHob =3D GetFirstGuidHob (&gEfiXenInfoGuid);=0D - if (GuidHob =3D=3D NULL) {=0D - return FALSE;=0D - }=0D -=0D - return TRUE;=0D -}=0D -=0D /**=0D Get the address of Xen ACPI Root System Description Pointer (RSDP)=0D structure.=0D --=20 Anthony PERARD