From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web08.954.1642442704976216246 for ; Mon, 17 Jan 2022 10:05:05 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=NqStkxsD; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: guo.dong@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642442704; x=1673978704; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=C23tcklBAOpsZvh7lf278q5OCv3VC+ehUs3dzJp8/m0=; b=NqStkxsDkGdMTdzYbBpMn5UoXVYNAGC0Jy0csQD2UgT5S2ZDyafJi/7/ BB51kX9RzZV0k6gzDZRuK3SSyiJg8cyvIwlCQ9iyPzM+MFJMoori4YT6y n9S3/C6S6lN8oqYehjKSzzr0yaqN94Kw96OqEwW8LcDEkSbYgdQvO33+W sO1B89IiUUM0VbrHwyj8aKfsjvvGoZs983LXT1z5LmWtHAVsgUMg50VJ0 gRHxGzL8jOp+lxdItHDqMyqGwaAhLGkFU9qWXTbO4D2xJpLtJSqmIKf1L QQxqCLzkzYeEu13tSC/Md6HOwfy3PNHmFDPtOzMYdRmmDSbdjcd7XZKP4 g==; X-IronPort-AV: E=McAfee;i="6200,9189,10229"; a="242230534" X-IronPort-AV: E=Sophos;i="5.88,296,1635231600"; d="scan'208";a="242230534" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2022 10:05:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,296,1635231600"; d="scan'208";a="560431531" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga001.jf.intel.com with ESMTP; 17 Jan 2022 10:05:04 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 17 Jan 2022 10:05:03 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 17 Jan 2022 10:05:03 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Mon, 17 Jan 2022 10:05:03 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.48) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Mon, 17 Jan 2022 10:05:03 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c+GfPEGT0pOrlO+sunlKxyhcv56XJysrJTHcC+N6Lri1jGiqiVBXid3w4A7Sor2Uhi1eoWWdQoxiKoGQ+dRWxeftpBJolGPiyd3k5lfaMb36Dg5hse3uVsEBey5iOQwN7eAIDh6yVnyZA+MUFROtk9r+N9tWGUGt4QMAfdkcnycCJ2Wgsyq2K07juXEsApkjdNeVBmj2ERQmE42ivmg1GtN6oEYiIFDlWsP9CqV+reFlHhy9nSBwy7B8hUMHIifzIUoBo5bGiKJ9aDKSHWdtdWj/uSG5Fr8xnVzUduCfCy/MaEVTjkXAO5UehpepdVcIlcCZz8Bi70NB18ag/kxJZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oR/vQB9+EaQma62+1Q/PO0qIm9WQusdx4+6qv0NIY24=; b=Z7FhIoY46mhxMkELEFofDvdThsOYdzJV69Kz3OKk3vvitpS8uOWPrrKDVhtF0MMXsbwH/TIO1ceXHvfPY2sJ8Eic9MafhT8i3SXZhxqQWiJ+lpFRf2HB3um3nEhnrpLfsDFI9s8Iy4vE9YkcgCNGp/PazEtIo2G3hLMcKfIb9hm/Aa53nsoiYFFQqqdnQTPtF2o5nlUu6gYzML4Xpa9at0Ptlv+9JrQvVbRStyKWZYmO1TEakb1mSSFJraeBRiWCo19f00vny1/kUcO9aj67RO2BcaRoZ8Fy0wF/48IrnbTtAgz5AdRHe0kzfgOOR2O+lqr02HOVCmDQfXWDYA2ZIQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BYAPR11MB3622.namprd11.prod.outlook.com (2603:10b6:a03:fe::30) by MN2PR11MB4062.namprd11.prod.outlook.com (2603:10b6:208:150::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.12; Mon, 17 Jan 2022 18:05:01 +0000 Received: from BYAPR11MB3622.namprd11.prod.outlook.com ([fe80::95e3:2138:f78d:9cd1]) by BYAPR11MB3622.namprd11.prod.outlook.com ([fe80::95e3:2138:f78d:9cd1%6]) with mapi id 15.20.4888.014; Mon, 17 Jan 2022 18:05:01 +0000 From: "Guo Dong" To: "Liu, Zhiguang" , "devel@edk2.groups.io" CC: "Ni, Ray" , "Ma, Maurice" , "You, Benjamin" Subject: Re: [PATCH] UefiPayloadPkg: Not use BaseCpuTimerLib by default. Thread-Topic: [PATCH] UefiPayloadPkg: Not use BaseCpuTimerLib by default. Thread-Index: AQHYCQ4y+wXWne2zg0KlK95mK1wzh6xnh1rA Date: Mon, 17 Jan 2022 18:05:01 +0000 Message-ID: References: <20220114061518.503-1-zhiguang.liu@intel.com> In-Reply-To: <20220114061518.503-1-zhiguang.liu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1f9df43e-280d-46a3-1cf8-08d9d9e3e1a3 x-ms-traffictypediagnostic: MN2PR11MB4062:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1824; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: rmNu44IGvD7xqeMRJGFcK6fWRMnFY40QP25rh4c/nVQk5D1BiY7RFRuHuNvS63W5T7XsyduJL4iofrhvcKPQLXUezsV3Ze8smf7/M1L8w2HA6DWJOdyHT36it9P5M2lUDKsgnR83zjnbJ6PGDZ64Hks488aP85bBmuNn+kvsVUFCuXxa+dzCYPco9U9aIyNPH2fv4h0teK58sY2sgHVb4YgZfsOPtlDHC93yHaivPGNJL44cOblcnGMPuD5zm8j1ZF/l+d2P+T3fJqGIlLDBX9xoKLDeaQsInwTpDx0a33VBv52ewYy+4wNr4x8vbdD6q7y+Us2MyNLH9lw1i0rTmuvz0KZ5sgeB2xRcyS2MWg5nxCL5gsnfNySHwrot3wRXDJQhnkx9rrXOT+0zDVeqf24xdSSh1NpJSERFJVEmU8D2dZSE5c55sKUGWmCdzXun3x7BPfG9ZnQsrsKCwUtQVGx6p2uJNtNPP11vrW/4SKFg85OC/QqX8jSVWcdmchAVElUKaKy3QHL0xGcQ8iMnN3HQ7hTKfZ1YKT7L2BvF9OFo5nlS4U0PQIlohas79yT4+SGvMYcgJxzFN/Vnc7EJ2ZPQsRu4rs5r1VkwkprWBaQGu7AFy2z49iz/G0d0zWCjraSKZif0u9QV9VbFul7d0qvorDdrLbCNxCA2F7hPF7jZOcVjCvgVzKSDGZUY7+qF6CsSy7mR8WCyHk6qeaMcIw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR11MB3622.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(66476007)(9686003)(5660300002)(66556008)(8936002)(66446008)(64756008)(107886003)(2906002)(6506007)(33656002)(8676002)(53546011)(122000001)(66946007)(38100700002)(508600001)(71200400001)(7696005)(83380400001)(186003)(316002)(76116006)(82960400001)(26005)(54906003)(4326008)(38070700005)(86362001)(110136005)(52536014)(55016003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?MI2UUWTfa6r5i20v6pdOkV2lampjuy+U4KVLL+TA+0IWl5JD58rK83/O9y53?= =?us-ascii?Q?vVQxV/skpnU1V7dTNKcvb9OIMZ2oKIxcj22xLE82Pn8tLsKKikDl6Eae514p?= =?us-ascii?Q?Bh9zgdWuiKxS/IbYuTkWb04r5UrpwvduttZ2DTOF+JUJJ7OIn1ZwzRHtN1+e?= =?us-ascii?Q?mbGubABX4uzxLSg6OBkr1ETTdMjCOqLpD5fpvYF+llFBNWYDlawS9bGLA5yJ?= =?us-ascii?Q?oP/PSYZrm5ZHkNXSeVajuB6d/fOKd+kHDZHGVXjEd0K7SLlgY7TatnaFvqWS?= =?us-ascii?Q?NALAOLK5QJsMUV4NH0OhZ6Iu+Et1urpkY2j67IW4ynOukaWlCOXsePhEfdcP?= =?us-ascii?Q?lNbxT0TVwU0iQXSesYC3KF+j78yacNDSLiwEdNa6XM+hgaf77QNl1zRlLpSh?= =?us-ascii?Q?tJJXjYFJZUc2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DJuu7N9MbpLygXw?= =?us-ascii?Q?4V3T4R2iGGTrsrTvc8cPXtHUUTukWF5FVs7lIeNx3UCoXZbxv2q3DeRXN/CA?= =?us-ascii?Q?dassC/h2UnCke/0twEphkpfeYA3LPBCnvsDM4Qjjw3C4kr9IIsOrxDgkaDjt?= =?us-ascii?Q?JwkTwDq6jqKnekAS8TXx5dGE7sRGlXm8Weyp8qMCudI+WuU2MmBiSMTPb5Fy?= =?us-ascii?Q?1jODins0xfAdg9+RzUr9FlHxGaS7KLXjYEitvNiNE+3jjL3X4rsREmIshyO/?= =?us-ascii?Q?ffh91MbpB7lKjYB0nIUTfImhusG3vTSViXCxszhpzy6y+1GmdiU7ekw+Md6i?= =?us-ascii?Q?TQ=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3622.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1f9df43e-280d-46a3-1cf8-08d9d9e3e1a3 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jan 2022 18:05:01.5065 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: tqBHt7gsVxDFsyoGWJetbIO4lLAFNgozpxE3pqFIfP4qD7m1hACB7/UESzWgRBTjYQSNRq7hecaHN45kF2FrAg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4062 Return-Path: guo.dong@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Guo Dong -----Original Message----- From: Liu, Zhiguang =20 Sent: Thursday, January 13, 2022 11:15 PM To: devel@edk2.groups.io Cc: Dong, Guo ; Ni, Ray ; Ma, Maurice= ; You, Benjamin Subject: [PATCH] UefiPayloadPkg: Not use BaseCpuTimerLib by default. For recent X86 CPU, 0x15 CPUID instruction will return Time Stamp Counter. = This is recommended way to get the time, and also how BaseCpuTimerLib works= However, some CPU doesn't support this feature, so disable it by default. Cc: Guo Dong Cc: Ray Ni Cc: Maurice Ma Cc: Benjamin You Signed-off-by: Zhiguang Liu --- UefiPayloadPkg/UefiPayloadPkg.dsc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayload= Pkg.dsc index 3d08edfe31..65c1bd610e 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.dsc +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc @@ -111,6 +111,11 @@ DEFINE SERIAL_DRIVER_ENABLE =3D TRUE DEFINE PERFORMANCE_MEASUREMENT_EN= ABLE =3D FALSE + # For recent X86 CPU, 0x15 CPUID instruction will return= Time Stamp Counter.+ # This is recommended way to get the time, and also = how BaseCpuTimerLib works.+ # However, some CPU doesn't support this featu= re, so disable it by default.+ DEFINE CPU_TIMER_LIB_ENABLE =3D FALSE+ [Bu= ildOptions] *_*_*_CC_FLAGS =3D -D DISABLE_NEW_DEPRECATED_= INTERFACES GCC:*_UNIXGCC_*_CC_FLAGS =3D -DMDEPKG_NDEBUG@@ -217,7 +2= 22,7 @@ # # Platform #-!if $(UNIVERSAL_PAYLOAD) =3D=3D TRUE+!if $(CPU_TIMER_= LIB_ENABLE) =3D=3D TRUE TimerLib|UefiCpuPkg/Library/CpuTimerLib/BaseCpuTi= merLib.inf !else TimerLib|UefiPayloadPkg/Library/AcpiTimerLib/AcpiTimerLi= b.inf--=20 2.32.0.windows.2