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.145.155, mailfrom: anthony.perard@citrix.com) Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by groups.io with SMTP; Thu, 04 Jul 2019 07:57:55 -0700 Authentication-Results: esa3.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa3.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=esa3.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: bGl2g2/LnPYxuhitUltEP5pCORMt01rSWJVaG+Iu+B14JKN+XYH2LNJpS9ZXStgv6fZWMeoOqG W2Ib+d+g89IWlnK5+8tmHnF1PhA+XTxpQk98RqnQjqsKvgnvfi8sTs6+vMiaVcGkjgf2iq0lvX UvshaRfa2HNAeaq1CnQK74Z0d0DLMYz5MkkGF3eE2oyD3O7nGB8U87LPK8BPsSxz9eQSg88Pa/ V+WYtEk3k/jkIfumEEzBnm/9r4rIqzobW0WUKLwoom+62JXW7djaQEaJObyTyQTfdt5lqiiHPt BjI= X-SBRS: 2.7 X-MesageID: 2602727 X-Ironport-Server: esa3.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="2602727" From: "Anthony PERARD" To: CC: , Ard Biesheuvel , Jordan Justen , Laszlo Ersek , Julien Grall , Anthony PERARD Subject: [PATCH v3 15/35] OvmfPkg/AcpiPlatformDxe: Use Xen PVH RSDP if it exist Date: Thu, 4 Jul 2019 15:42:13 +0100 Message-ID: <20190704144233.27968-16-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 If the firmware have been started via the Xen PVH entry point, a RSDP pointer would have been provided. Use it. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1689 Signed-off-by: Anthony PERARD --- Notes: v3: - patch splited from the previous one - Fix DEBUG format string, use %p for pointers. and use gEfiCallerBaseName to print module name OvmfPkg/AcpiPlatformDxe/Xen.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/OvmfPkg/AcpiPlatformDxe/Xen.c b/OvmfPkg/AcpiPlatformDxe/Xen.c index 82794b933e..376a6bd3cb 100644 --- a/OvmfPkg/AcpiPlatformDxe/Xen.c +++ b/OvmfPkg/AcpiPlatformDxe/Xen.c @@ -36,10 +36,27 @@ GetXenAcpiRsdp ( EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER *RsdpStructurePtr;=0D UINT8 *XenAcpiPtr;=0D UINT8 Sum;=0D + EFI_XEN_INFO *XenInfo;=0D =0D //=0D // Detect the RSDP structure=0D //=0D +=0D + //=0D + // First look for PVH one=0D + //=0D + XenInfo =3D XenGetInfoHOB ();=0D + ASSERT (XenInfo !=3D NULL);=0D + if (XenInfo->RsdpPvh !=3D NULL) {=0D + DEBUG ((DEBUG_INFO, "%a: Use ACPI RSDP table at 0x%p\n",=0D + gEfiCallerBaseName, XenInfo->RsdpPvh));=0D + *RsdpPtr =3D XenInfo->RsdpPvh;=0D + return EFI_SUCCESS;=0D + }=0D +=0D + //=0D + // Otherwise, look for the HVM one=0D + //=0D for (XenAcpiPtr =3D (UINT8*)(UINTN) XEN_ACPI_PHYSICAL_ADDRESS;=0D XenAcpiPtr < (UINT8*)(UINTN) XEN_BIOS_PHYSICAL_END;=0D XenAcpiPtr +=3D 0x10) {=0D --=20 Anthony PERARD