From nobody Mon May 6 05:51:23 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+53519+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=citrix.com Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 158029995986959.25644949906143; Wed, 29 Jan 2020 04:12:39 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id fHd2YY1788612xjKr4n65g7N; Wed, 29 Jan 2020 04:12:38 -0800 X-Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by mx.groups.io with SMTP id smtpd.web12.3549.1580299958349481989 for ; Wed, 29 Jan 2020 04:12:38 -0800 Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+53519+1787277+3901457@groups.io; helo=web01.groups.io; 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 ip4:168.245.78.127 ~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: FOmBeKztIZ10kCjGV8zrjiwChUk6FOYkd8pxYolMEiyoSyYsRNc/c5gO8dKS8miZPFWiA7wYZO 1mFKrwXfyivbplbJFq7FnV9k2uI9BUSSdzAU5Y7xrzjCujdDIMpFgk/sTW+tZsKI+a6H0zr8Ih ji1Vn+S8E5QCrbyKfrQDGFThbNrIyQ25cXK7QQi/59iDNb/kSxXij0fITF5jI+NezqEinrJHrc OiLRDTM+B0b774vm26ZgdxZMUXgH//UPaTGmxn30JWoH2j64eSDIqkOHZ9l3645TcA92qwZjFb ypY= X-SBRS: 2.7 X-MesageID: 11606515 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.70,377,1574139600"; d="scan'208";a="11606515" From: "Anthony PERARD" To: CC: Michael D Kinney , Ard Biesheuvel , Anthony Perard , , Laszlo Ersek , "Liming Gao" , Jordan Justen , "Julien Grall" Subject: [edk2-devel] [PATCH 1/5] OvmfPkg/XenResetVector: Silent a warning from nasm Date: Wed, 29 Jan 2020 12:12:31 +0000 Message-ID: <20200129121235.1814563-2-anthony.perard@citrix.com> In-Reply-To: <20200129121235.1814563-1-anthony.perard@citrix.com> References: <20200129121235.1814563-1-anthony.perard@citrix.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,anthony.perard@citrix.com X-Gm-Message-State: nNB7yJ5XumSYMIDsQW2bGssvx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1580299958; bh=1fgSdrceBw5iPZYDKMzuuyUW4F22PHICAagSk/JIQf4=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=SH0cyF136zpTWzdlneLoPj6z/B6ld6o1OzfFDVoeCmg2B3B5BSmfmr8zPJEXWn7zZdH f9D2fy1Hf7LB5Pi7xUTF2PYDTE/YjmASznC20VEDsIlo2D9QhrXmNDItvaKu05SgaH9G/ 3uRXOAio66aDT9ui4nnfRANKpS62UECpDRI= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" To avoid nasm generating a warning, replace the macro by the value expected to be stored in eax. Ia32/XenPVHMain.asm:76: warning: dword data exceeds bounds Reported-by: Laszlo Ersek Signed-off-by: Anthony PERARD Reviewed-by: Laszlo Ersek --- OvmfPkg/XenResetVector/Ia32/XenPVHMain.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OvmfPkg/XenResetVector/Ia32/XenPVHMain.asm b/OvmfPkg/XenResetV= ector/Ia32/XenPVHMain.asm index 2df0f12e18cb..c761e9d30729 100644 --- a/OvmfPkg/XenResetVector/Ia32/XenPVHMain.asm +++ b/OvmfPkg/XenResetVector/Ia32/XenPVHMain.asm @@ -73,7 +73,7 @@ xenPVHMain: ; ; parameter for Flat32SearchForBfvBase ; - mov eax, ADDR_OF(fourGigabytes) + mov eax, 0 ; ADDR_OF(fourGigabytes) add eax, edx ; add delta =20 ; --=20 Anthony PERARD -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#53519): https://edk2.groups.io/g/devel/message/53519 Mute This Topic: https://groups.io/mt/70239978/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon May 6 05:51:23 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1580299994979813.153230758794; Wed, 29 Jan 2020 04:13:14 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iwmDC-0007po-IY; Wed, 29 Jan 2020 12:12:50 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iwmDB-0007pX-OR for xen-devel@lists.xenproject.org; Wed, 29 Jan 2020 12:12:49 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a4e93456-4290-11ea-8396-bc764e2007e4; Wed, 29 Jan 2020 12:12:40 +0000 (UTC) X-Inumbo-ID: a4e93456-4290-11ea-8396-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1580299961; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Oi+cHxgzi+PRqZzIj79s83RFuw3z+sUy9q8sfMqAjwk=; b=hkMeypcAc9EPTzmI1+iqtsKEEkZOn8JrsGg2wT7QAa+GKGgUmAy4QnKk OxVwluqUeV+qydrsKmislZf0LU4+URgI0oo1s+Yq5R7wVB0gjP3e6LfYb LOgGkFcJ1PgtRArwBWlu29vGt+hMHtjsqiPGhzLd7c078JZnDAHb2Ktei w=; 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 (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; 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 ip4:168.245.78.127 ~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: 6jNr9SSSuM1D6vlqD/rgQgOzyrJEiP4S/+iGYfURrVy4cTAnpvdA+T1H8NYbTDQbSGsXl4Xc2X 3YfkD1NfCo0gvkvcW1iacSUHJX3iUMIyiLlckkmriJzzONWsUkc8FauzFHqZEyx1axFSA06mCd +Tz6/d8+6dK4WuW334Qf+MYkANCcwoE7MZ5mf3cTZjgXvIo1japyyUBcmERRpdpPvmVQboG4ET EceSnB8y4p2NT5uADo+cjDlAVMmbfSJLtkryB9pP/NZUQWP1znVL3p+8gKKTvv8lJSC0GFLzPF uR0= X-SBRS: 2.7 X-MesageID: 11606517 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.70,377,1574139600"; d="scan'208";a="11606517" From: Anthony PERARD To: Date: Wed, 29 Jan 2020 12:12:32 +0000 Message-ID: <20200129121235.1814563-3-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200129121235.1814563-1-anthony.perard@citrix.com> References: <20200129121235.1814563-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 2/5] MdePkg: Allow PcdFSBClock to by Dynamic X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Bob Feng , Julien Grall , Ard Biesheuvel , Jordan Justen , Liming Gao , Anthony Perard , Michael D Kinney , xen-devel@lists.xenproject.org, Laszlo Ersek Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We are going to want to change the value of PcdFSBClock at run time in OvmfXen, so move it to the PcdsDynamic section. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2490 Signed-off-by: Anthony PERARD Reviewed-by: Laszlo Ersek --- CC: Bob Feng CC: Liming Gao --- MdePkg/MdePkg.dec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index d022cc5e3ef2..8f5a48346e50 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -2194,10 +2194,6 @@ [PcdsFixedAtBuild,PcdsPatchableInModule] # @ValidList 0x80000001 | 8, 16, 32 gEfiMdePkgTokenSpaceGuid.PcdPort80DataWidth|8|UINT8|0x0000002d =20 - ## This value is used to configure X86 Processor FSB clock. - # @Prompt FSB Clock. - gEfiMdePkgTokenSpaceGuid.PcdFSBClock|200000000|UINT32|0x0000000c - ## The maximum printable number of characters. UefLib functions: AsciiPr= int(), AsciiErrorPrint(), # PrintXY(), AsciiPrintXY(), Print(), ErrorPrint() base on this PCD val= ue to print characters. # @Prompt Maximum Printable Number of Characters. @@ -2297,5 +2293,9 @@ [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic= , PcdsDynamicEx] # @Prompt Boot Timeout (s) gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0xffff|UINT16|0x0000002c =20 + ## This value is used to configure X86 Processor FSB clock. + # @Prompt FSB Clock. + gEfiMdePkgTokenSpaceGuid.PcdFSBClock|200000000|UINT32|0x0000000c + [UserExtensions.TianoCore."ExtraFiles"] MdePkgExtra.uni --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Mon May 6 05:51:23 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+53521+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=citrix.com Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1580299960469678.197191521972; Wed, 29 Jan 2020 04:12:40 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id X3m2YY1788612xNOQu2kiInx; Wed, 29 Jan 2020 04:12:39 -0800 X-Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com []) by mx.groups.io with SMTP id smtpd.web12.3549.1580299958349481989 for ; Wed, 29 Jan 2020 04:12:39 -0800 Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+53521+1787277+3901457@groups.io; helo=web01.groups.io; 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 ip4:168.245.78.127 ~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: Eo5GR9ZukIp/K4oOrV7OAGbhC5PEFly7uPsUFJl6UzEPJrUvppafFkkayQsy6rQmPifbI+QpyW hkR4q/g4sSxZecFqIxKnHLnPi5KMFn5rJS8mgSlW/oJu2o4mVkpxBDGK3FCuYaEMAk55d3plZe 492T8bkp6UVrqsqm0amR7DmB09QT99gLEeTdIh6qhC9ff14dqWooiJgmSkakbQwnvBqZeoJsAj OQ70He0zf19HBMrF5Mqu+Hr6BSHUz0lIwHJTMvbvv9679y09G8Cu09N7/YxqfnmKFkSpEzKQMJ V0A= X-SBRS: 2.7 X-MesageID: 11606516 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.70,377,1574139600"; d="scan'208";a="11606516" From: "Anthony PERARD" To: CC: Michael D Kinney , Ard Biesheuvel , Anthony Perard , , Laszlo Ersek , "Liming Gao" , Jordan Justen , "Julien Grall" Subject: [edk2-devel] [PATCH 3/5] OvmfPkg/IndustryStandard/Xen: Apply EDK2 coding style to XEN_VCPU_TIME_INFO Date: Wed, 29 Jan 2020 12:12:33 +0000 Message-ID: <20200129121235.1814563-4-anthony.perard@citrix.com> In-Reply-To: <20200129121235.1814563-1-anthony.perard@citrix.com> References: <20200129121235.1814563-1-anthony.perard@citrix.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,anthony.perard@citrix.com X-Gm-Message-State: 4YYDptgBcmNZZliwCdWsbGfMx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1580299959; bh=1Rb9O3PAjn3BqEz3DozDuWzxZF8OgGAuo723550BJQw=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=OcBh7mD2+vQNbkgPNUxhhabvH6UzXY9MuSLs/6ehyIwge+KXyGjmkNtS3+6sciz9qY5 FbREUlCRans9p3yQSwaOGy7D/UiI5LRHeP4w2jl/t4SbLED6YDopp4/MjphBD3h3FWUcN SX1RHba9stvhJXaH10UcsCz4QUEZqx31SCU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" We are going to use new fields from the Xen headers. Apply the EDK2 coding style so that the code that is going to use it doesn't look out of place. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2490 Signed-off-by: Anthony PERARD Reviewed-by: Laszlo Ersek --- OvmfPkg/Include/IndustryStandard/Xen/xen.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/OvmfPkg/Include/IndustryStandard/Xen/xen.h b/OvmfPkg/Include/I= ndustryStandard/Xen/xen.h index e55d93263285..ac9155089902 100644 --- a/OvmfPkg/Include/IndustryStandard/Xen/xen.h +++ b/OvmfPkg/Include/IndustryStandard/Xen/xen.h @@ -183,10 +183,10 @@ struct vcpu_time_info { * The correct way to interact with the version number is similar to * Linux's seqlock: see the implementations of read_seqbegin/read_seqr= etry. */ - UINT32 version; + UINT32 Version; UINT32 pad0; - UINT64 tsc_timestamp; /* TSC at last update of time vals. */ - UINT64 system_time; /* Time, in nanosecs, since boot. */ + UINT64 TSCTimestamp; /* TSC at last update of time vals. */ + UINT64 SystemTime; /* Time, in nanosecs, since boot. */ /* * Current system time: * system_time + @@ -194,11 +194,11 @@ struct vcpu_time_info { * CPU frequency (Hz): * ((10^9 << 32) / tsc_to_system_mul) >> tsc_shift */ - UINT32 tsc_to_system_mul; - INT8 tsc_shift; + UINT32 TSCToSystemMultiplier; + INT8 TSCShift; INT8 pad1[3]; }; /* 32 bytes */ -typedef struct vcpu_time_info vcpu_time_info_t; +typedef struct vcpu_time_info XEN_VCPU_TIME_INFO; =20 struct vcpu_info { /* @@ -234,7 +234,7 @@ struct vcpu_info { #endif /* XEN_HAVE_PV_UPCALL_MASK */ xen_ulong_t evtchn_pending_sel; struct arch_vcpu_info arch; - struct vcpu_time_info time; + struct vcpu_time_info Time; }; /* 64 bytes (x86) */ #ifndef __XEN__ typedef struct vcpu_info vcpu_info_t; @@ -250,7 +250,7 @@ typedef struct vcpu_info vcpu_info_t; * of this structure remaining constant. */ struct shared_info { - struct vcpu_info vcpu_info[XEN_LEGACY_MAX_VCPUS]; + struct vcpu_info VcpuInfo[XEN_LEGACY_MAX_VCPUS]; =20 /* * A domain can create "event channels" on which it can send and recei= ve @@ -299,6 +299,7 @@ struct shared_info { }; #ifndef __XEN__ typedef struct shared_info shared_info_t; +typedef struct shared_info XEN_SHARED_INFO; #endif =20 /* Turn a plain number into a C UINTN constant. */ --=20 Anthony PERARD -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#53521): https://edk2.groups.io/g/devel/message/53521 Mute This Topic: https://groups.io/mt/70239980/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon May 6 05:51:23 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1580300003210299.7432306635758; Wed, 29 Jan 2020 04:13:23 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iwmDM-0007vV-IF; Wed, 29 Jan 2020 12:13:00 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iwmDL-0007uz-PK for xen-devel@lists.xenproject.org; Wed, 29 Jan 2020 12:12:59 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a5df111e-4290-11ea-ad98-bc764e2007e4; Wed, 29 Jan 2020 12:12:41 +0000 (UTC) X-Inumbo-ID: a5df111e-4290-11ea-ad98-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1580299963; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ko7mPFESyttG6Cuo2jpDQQtOn5TR6/Qfkew50O7TNrQ=; b=Iy4dGhtyoUZfhph+0O+x5qsbupPBaPn/SeETd85s2MaTPXKg3GV5tPRM CD9wxrM9lNH1TRPqpxQl+wVZWsLFlmh9nq7mtVz9ly8pxTeD6Dbrf3ASE MqKV9wGJMjAas0VOvU6kQG4gTGroPkf8REUUymS8EXyrumzyi6tpSVr+X U=; 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 (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; 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 ip4:168.245.78.127 ~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: DZAls7KjEEPgtD69CE24aJpVJ4rWeEnQNyNqRqMNlSKdfNm1Tx4T9anLwckAfhYAdFemmYexW3 PGdASXZsOpxGgSRlHUBoKKqDzXxqTvTdVnPxP1dAMH/zNVryQmgJEDVCPl35XmRFpTKeBG4CWJ h2U/lVBqB2zZm+g1S5XxY1d/LoH4K42d//MZhEGhEQXV8q+OYQs9BYBAsi5eRy1oTRDjdlGikT Klo2TDvp6fUeU/EYbnptMX43WG3cTWSBjw1vLBbF3HWllP4b0/OPQnmJPSvT5Qg0v/bi9WnSlN WoU= X-SBRS: 2.7 X-MesageID: 11606521 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.70,377,1574139600"; d="scan'208";a="11606521" From: Anthony PERARD To: Date: Wed, 29 Jan 2020 12:12:34 +0000 Message-ID: <20200129121235.1814563-5-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200129121235.1814563-1-anthony.perard@citrix.com> References: <20200129121235.1814563-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 4/5] OvmfPkg/XenPlatformPei: Calibrate APIC timer frequency X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , Ard Biesheuvel , Jordan Justen , Liming Gao , Anthony Perard , Michael D Kinney , xen-devel@lists.xenproject.org, Laszlo Ersek , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Calculate the frequency of the APIC timer that Xen provides. Even though the frequency is currently hard-coded, it isn't part of the public ABI that Xen provides and thus may change at any time. OVMF needs to determine the frequency by an other mean. Fortunately, Xen provides a way to determines the frequency of the TSC, so we can use TSC to calibrate the frequency of the APIC timer. That information is found in the shared_info page which we map and unmap once done (XenBusDxe is going to map the page somewhere else). The calculated frequency is only logged in this patch, it will be used in a following patch. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2490 Signed-off-by: Anthony PERARD --- CC: Roger Pau Monn=C3=A9 --- OvmfPkg/XenPlatformPei/XenPlatformPei.inf | 1 + OvmfPkg/XenPlatformPei/Platform.h | 5 + OvmfPkg/XenPlatformPei/Platform.c | 1 + OvmfPkg/XenPlatformPei/Xen.c | 123 ++++++++++++++++++++++ 4 files changed, 130 insertions(+) diff --git a/OvmfPkg/XenPlatformPei/XenPlatformPei.inf b/OvmfPkg/XenPlatfor= mPei/XenPlatformPei.inf index 0ef77db92c03..335a442538c2 100644 --- a/OvmfPkg/XenPlatformPei/XenPlatformPei.inf +++ b/OvmfPkg/XenPlatformPei/XenPlatformPei.inf @@ -52,6 +52,7 @@ [LibraryClasses] DebugLib HobLib IoLib + LocalApicLib PciLib ResourcePublicationLib PeiServicesLib diff --git a/OvmfPkg/XenPlatformPei/Platform.h b/OvmfPkg/XenPlatformPei/Pla= tform.h index 7661f4a8de0a..97e482a065f0 100644 --- a/OvmfPkg/XenPlatformPei/Platform.h +++ b/OvmfPkg/XenPlatformPei/Platform.h @@ -127,6 +127,11 @@ XenGetE820Map ( UINT32 *Count ); =20 +VOID +CalibrateLapicTimer ( + VOID + ); + extern EFI_BOOT_MODE mBootMode; =20 extern UINT8 mPhysMemAddressWidth; diff --git a/OvmfPkg/XenPlatformPei/Platform.c b/OvmfPkg/XenPlatformPei/Pla= tform.c index 717fd0ab1a45..e9511eb40c62 100644 --- a/OvmfPkg/XenPlatformPei/Platform.c +++ b/OvmfPkg/XenPlatformPei/Platform.c @@ -448,6 +448,7 @@ InitializeXenPlatform ( InitializeRamRegions (); =20 InitializeXen (); + CalibrateLapicTimer (); =20 if (mBootMode !=3D BOOT_ON_S3_RESUME) { ReserveEmuVariableNvStore (); diff --git a/OvmfPkg/XenPlatformPei/Xen.c b/OvmfPkg/XenPlatformPei/Xen.c index c41fecdc486e..d6cdc9a8e31c 100644 --- a/OvmfPkg/XenPlatformPei/Xen.c +++ b/OvmfPkg/XenPlatformPei/Xen.c @@ -19,6 +19,7 @@ // #include #include +#include #include #include #include @@ -386,3 +387,125 @@ InitializeXen ( =20 return EFI_SUCCESS; } + + +EFI_STATUS +MapSharedInfoPage ( + IN VOID *PagePtr + ) +{ + xen_add_to_physmap_t Parameters; + INTN ReturnCode; + + Parameters.domid =3D DOMID_SELF; + Parameters.space =3D XENMAPSPACE_shared_info; + Parameters.idx =3D 0; + Parameters.gpfn =3D (UINTN) PagePtr >> EFI_PAGE_SHIFT; + ReturnCode =3D XenHypercallMemoryOp (XENMEM_add_to_physmap, &Parameters); + if (ReturnCode !=3D 0) { + return EFI_NO_MAPPING; + } + return EFI_SUCCESS; +} + +VOID +UnmapXenPage ( + IN VOID *PagePtr + ) +{ + xen_remove_from_physmap_t Parameters; + INTN ReturnCode; + + Parameters.domid =3D DOMID_SELF; + Parameters.gpfn =3D (UINTN) PagePtr >> EFI_PAGE_SHIFT; + ReturnCode =3D XenHypercallMemoryOp (XENMEM_remove_from_physmap, &Parame= ters); + ASSERT (ReturnCode =3D=3D 0); +} + + +STATIC +UINT64 +GetCPUFreq ( + IN XEN_VCPU_TIME_INFO *VcpuTime + ) +{ + UINT32 Version; + UINT32 TSCToSystemMultiplier; + INT8 TSCShift; + UINT64 CPUFreq; + + do { + Version =3D VcpuTime->Version; + MemoryFence (); + TSCToSystemMultiplier =3D VcpuTime->TSCToSystemMultiplier; + TSCShift =3D VcpuTime->TSCShift; + MemoryFence (); + } while (((Version & 1) !=3D 0) && (Version !=3D VcpuTime->Version)); + + CPUFreq =3D (1000000000ULL << 32) / TSCToSystemMultiplier; + if (TSCShift >=3D 0) { + CPUFreq >>=3D VcpuTime->TSCShift; + } else { + CPUFreq <<=3D -VcpuTime->TSCShift; + } + return CPUFreq; +} + +VOID +XenDelay ( + IN XEN_VCPU_TIME_INFO *VcpuTimeInfo, + IN UINT64 DelayNs + ) +{ + UINT64 Tick; + + Tick =3D AsmReadTsc (); + Tick +=3D (DelayNs * GetCPUFreq (VcpuTimeInfo)) / 1000000000ULL; + while (AsmReadTsc() <=3D Tick) { + CpuPause(); + } +} + + +/** + Calculate the frequency of the Local Apic Timer +**/ +VOID +CalibrateLapicTimer ( + VOID + ) +{ + XEN_SHARED_INFO *SharedInfo; + XEN_VCPU_TIME_INFO *VcpuTimeInfo; + UINT32 TimerTick, TimerTick2; + UINT64 TscTick, TscTick2; + UINT64 Freq; + EFI_STATUS Status; + + SharedInfo =3D AllocatePages (1); + Status =3D MapSharedInfoPage (SharedInfo); + ASSERT_EFI_ERROR (Status); + if (EFI_ERROR (Status)) { + goto Exit; + } + + VcpuTimeInfo =3D &SharedInfo->VcpuInfo[0].Time; + + InitializeApicTimer (1, MAX_UINT32, TRUE, 0); + DisableApicTimerInterrupt (); + + TimerTick =3D GetApicTimerCurrentCount (); + TscTick =3D AsmReadTsc (); + XenDelay (VcpuTimeInfo, 1000000ULL); + TimerTick2 =3D GetApicTimerCurrentCount (); + TscTick2 =3D AsmReadTsc (); + + Freq =3D (GetCPUFreq (VcpuTimeInfo) * (TimerTick - TimerTick2)) + / (TscTick2 - TscTick); + DEBUG ((DEBUG_INFO, "APIC Freq % 8lu Hz\n", Freq)); + + UnmapXenPage (SharedInfo); + +Exit: + FreePages (SharedInfo, 1); +} --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Mon May 6 05:51:24 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1580299998247499.7340737072997; Wed, 29 Jan 2020 04:13:18 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iwmDH-0007sP-TH; Wed, 29 Jan 2020 12:12:55 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iwmDG-0007rk-Oj for xen-devel@lists.xenproject.org; Wed, 29 Jan 2020 12:12:54 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a557d9d8-4290-11ea-a933-bc764e2007e4; Wed, 29 Jan 2020 12:12:40 +0000 (UTC) X-Inumbo-ID: a557d9d8-4290-11ea-a933-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1580299961; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ujC3ICVEDUCWxFYw0I7YeEtcxnzuC7N7nVFvDxyOyhc=; b=AkwISS+yLRzY6ceLY6yK8xlasFE+d5XJZfhg8wayaFIY8PXq6fJ4Uql5 ZU09NQHpvSYvYuLpr//9YPXXGLYgmpcaOavo33wQZDgLJaInjOztDLQTn uw9TowFYXH5+XR5twGS2BiV6WrH9a8t8Xuvi60ReiRN0RC9Oi6fzrDinR A=; 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 (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; 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 ip4:168.245.78.127 ~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: vgtfSAJBwy7rEkZUIwzoIsaNr+D70QHQf5r0c43xP9WbIfeEK2iJ8SBxljyyKuVk1OwqUcu4hF jtKpqFcOwYKKLpOy8PeulVU+aDc246BIhFYLBPqlte5fiU97e/tknWWBvXKQ3lCwoGE26yljVI scuQI0g4Sb3BJzmF+i99JlC7DG0y0ABxftgIp1VujW89bc4VXJ1BWLOMN++5XP0MlIAT0Gb8sI RWMl7NNx2vRCDNiqyetX0h9niOhWJ0CNRDt69Uvof+hTRHXxhnErcE7yIDRhPY6TXMYF25nBug bYk= X-SBRS: 2.7 X-MesageID: 11606519 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.70,377,1574139600"; d="scan'208";a="11606519" From: Anthony PERARD To: Date: Wed, 29 Jan 2020 12:12:35 +0000 Message-ID: <20200129121235.1814563-6-anthony.perard@citrix.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200129121235.1814563-1-anthony.perard@citrix.com> References: <20200129121235.1814563-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 5/5] OvmfPkg/OvmfXen: Set PcdFSBClock X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , Ard Biesheuvel , Jordan Justen , Liming Gao , Anthony Perard , Michael D Kinney , xen-devel@lists.xenproject.org, Laszlo Ersek Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Update gEfiMdePkgTokenSpaceGuid.PcdFSBClock so it can have the correct value when SecPeiDxeTimerLibCpu start to use it for the APIC timer. Currently, nothing appear to use the value in PcdFSBClock before XenPlatformPei had a chance to set it even though TimerLib is included in modules runned before XenPlatformPei. XenPlatformPei doesn't use any of the functions that would use that value. No other modules in the PEI phase seems to use the TimerLib before PcdFSBClock is set. There are currently two other modules in the PEI phase that needs the TimerLib: - S3Resume2Pei, but only because LocalApicLib needs it, but nothing is using the value from PcdFSBClock. - CpuMpPei, but I believe it only runs after XenPlatformPei Before the PEI phase, there's the SEC phase, and SecMain needs TimerLib because of LocalApicLib. And it initialise the APIC timers for the debug agent. But I don't think any of the DebugLib that OvmfXen could use are actually using the *Delay functions in TimerLib, and so would not use the value from PcdFSBClock which would be uninitialised. A simple runtime test showed that TimerLib doesn't use PcdFSBClock value before it is set. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2490 Signed-off-by: Anthony PERARD Reviewed-by: Laszlo Ersek --- OvmfPkg/OvmfXen.dsc | 4 +--- OvmfPkg/XenPlatformPei/XenPlatformPei.inf | 1 + OvmfPkg/XenPlatformPei/Xen.c | 4 ++++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc index 8c11efe9b709..190d7400c148 100644 --- a/OvmfPkg/OvmfXen.dsc +++ b/OvmfPkg/OvmfXen.dsc @@ -442,9 +442,6 @@ [PcdsFixedAtBuild] # Point to the MdeModulePkg/Application/UiApp/UiApp.inf gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c= , 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0= x31 } =20 - ## Xen vlapic's frequence is 100 MHz - gEfiMdePkgTokenSpaceGuid.PcdFSBClock|100000000 - ##########################################################################= ###### # # Pcd Dynamic Section - list of all EDK II PCD Entries defined by this Pla= tform @@ -468,6 +465,7 @@ [PcdsDynamicDefault] gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Base|0x0 gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size|0x800000000 =20 + gEfiMdePkgTokenSpaceGuid.PcdFSBClock gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0 =20 # Set video resolution for text setup. diff --git a/OvmfPkg/XenPlatformPei/XenPlatformPei.inf b/OvmfPkg/XenPlatfor= mPei/XenPlatformPei.inf index 335a442538c2..177200f3b7e5 100644 --- a/OvmfPkg/XenPlatformPei/XenPlatformPei.inf +++ b/OvmfPkg/XenPlatformPei/XenPlatformPei.inf @@ -83,6 +83,7 @@ [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable gEfiMdeModulePkgTokenSpaceGuid.PcdPteMemoryEncryptionAddressOrMask + gEfiMdePkgTokenSpaceGuid.PcdFSBClock gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy gUefiCpuPkgTokenSpaceGuid.PcdCpuLocalApicBaseAddress =20 diff --git a/OvmfPkg/XenPlatformPei/Xen.c b/OvmfPkg/XenPlatformPei/Xen.c index d6cdc9a8e31c..fc990462dccc 100644 --- a/OvmfPkg/XenPlatformPei/Xen.c +++ b/OvmfPkg/XenPlatformPei/Xen.c @@ -504,6 +504,10 @@ CalibrateLapicTimer ( / (TscTick2 - TscTick); DEBUG ((DEBUG_INFO, "APIC Freq % 8lu Hz\n", Freq)); =20 + ASSERT (Freq <=3D MAX_UINT32); + Status =3D PcdSet32S (PcdFSBClock, Freq); + ASSERT_RETURN_ERROR (Status); + UnmapXenPage (SharedInfo); =20 Exit: --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel