From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web10.3675.1643089835739308206 for ; Mon, 24 Jan 2022 21:50:36 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=OCTFJpqA; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643089835; x=1674625835; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=WD3xL59AwNJYa4GEuwCwQ20J6fn0XxTEVi/YFpbhDbM=; b=OCTFJpqAtyPUnDpXlQ32wqU5wiz2uM7zjnMuFUFpliy8b5Ar9UYH+akW NWFv2cnugSBDhzIbK+wUBc3O25JvKLW4+M0Ou8dJ9RzCzMg409SUkn6Xg eo04FktXbH4mOp7ELpxAmgJn3E63yZPalAnzGnRv8JxSGb3lD4Mw3c7sm KBM5KhoBg1WC2JJygh61bM+gEYKejUWV4ek5jNTcoJIq6++OabTKGVtU2 YrVhcJeJ5xJ8XXbfN3uADRpLlYKMuH5I80Hqn4mpVKzaDU9w9cUw0Fbu1 o+61uRfKTKHyObRydGIGQsr+n3yMjx5Bul+Fx/w55/WVKnT7AQqMQZX1z g==; X-IronPort-AV: E=McAfee;i="6200,9189,10237"; a="309545370" X-IronPort-AV: E=Sophos;i="5.88,314,1635231600"; d="scan'208";a="309545370" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jan 2022 21:50:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,314,1635231600"; d="scan'208";a="627783233" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga004.jf.intel.com with ESMTP; 24 Jan 2022 21:50:34 -0800 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 24 Jan 2022 21:50:34 -0800 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 24 Jan 2022 21:50:33 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx606.amr.corp.intel.com (10.18.126.86) 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, 24 Jan 2022 21:50:33 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.46) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Mon, 24 Jan 2022 21:50:33 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NZlkQ+Mr/8Vyu6OEo8NVFIN5nXNHCb3lf+IIkBvro/BXiN/v+n6iJzMXC807OABEFMeAAX36i1W86Ef0RTLIQ4jeQ+WDCN6zVj8UV3C7KjWCUGO3c1mPMti/4svECRBVXFtF8CQxDIr28efu7RhOBr77IDdjRaiugc3hEPFMK8e0/APrsqvAbBVbGoPb+fwXVwz3LG37/Lho/Y+sBER8LpfVNbRk4XacTzNCKM2VFoI6N1FIq+um7WXphvVnTOxeF6m2ikmdgsEPZmDLXT8V7a8i7huHfQ0Eijsm1X42mD/XMuZsZ2qbVQZkcKKhZJbSVNsM+kLamzHlYxXxZ165/A== 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=XYcq+15DshyhJ57x57+tWTVRVRevwRUsGTYOl55F02I=; b=DqWr+pzr6ZH4CkeYQFlS+1hTb03RmxVSwVlnYeR7Gg+xfCsjkTmZjSTT7s1xce7fHlDmPmuUFMP3rbDenanAY0btN7yklXmQ3Y2K4xHPDIgooWmFVlTa7oS5xW+iMW6zM83DOK1xSfnObksyXBRZoXaAcdE2eXYkvWZ/1epL+Cj4opG/WEEGTSi5W2scpU1keH47RxkqJUvJx/i+XeN897wF3IcYIc8r8ePYym7LZkbRyIKRKr492kv+1wRNOKhpjxywCJ68DMRJII4vrmI/Prb1hIm/QxDDcBCXd+HVIcGIFQ3W3MzTbj8ttE9NM2kpq3z7KS8JmGbrhDb7QN7PMA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from MWHPR11MB1631.namprd11.prod.outlook.com (2603:10b6:301:10::10) by BN6PR11MB0019.namprd11.prod.outlook.com (2603:10b6:405:69::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.12; Tue, 25 Jan 2022 05:50:31 +0000 Received: from MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::e0fb:ec1d:4e67:375f]) by MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::e0fb:ec1d:4e67:375f%8]) with mapi id 15.20.4909.017; Tue, 25 Jan 2022 05:50:31 +0000 From: "Ni, Ray" To: "Liu, Zhiguang" , "devel@edk2.groups.io" CC: "Dong, Guo" , "Ma, Maurice" , "You, Benjamin" Subject: Re: [PATCH] UefiPayloadPkg: Use BaseCpuTimerLib for Universal Payload by default Thread-Topic: [PATCH] UefiPayloadPkg: Use BaseCpuTimerLib for Universal Payload by default Thread-Index: AQHYDRVS6tkM0AJqLkWEDljP0T0kxKxzRLSQ Date: Tue, 25 Jan 2022 05:50:31 +0000 Message-ID: References: <20220119091646.130-1-zhiguang.liu@intel.com> In-Reply-To: <20220119091646.130-1-zhiguang.liu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.200.16 dlp-reaction: no-action dlp-product: dlpe-windows 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: 0523930c-6257-4137-2be7-08d9dfc69938 x-ms-traffictypediagnostic: BN6PR11MB0019:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4125; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 7t9iY0Mk2UADO6uEJpx4Jg/rDKBpwYQq0n5SNC+6G/2VvhhVdWf08UMpP3OMShlkWB1GOZ8doHJmrCfW/W9pIZaPOxLIZUU4Qix7TMNTX+zSl7eh/JgKgPTgU9z2slzkWjfRf6QTbAC3GBBgF65gcicYI4qZXcSUBGrh+awv2u1gsZt1BP5JhH5OXrQb5QooZfpxLOd+RVjuSLbf/NmER3uOJIy5cEC0mrRdyyZDMGk5cn8hHJYdNwv5wiCDbHaeYMvydnkDlkmkmNQJE33VSQu3AkurJpz4X/iRIDPS04o3W1slz51ahdgmnzn97fhsbGgmkii0KxcshnENF+gW1/0b8ZsThfPaN+aVpk+d1lKKLmxPeZdBfEU48Mkr6XDynLdA++/sqZRFQtnXpeftGs2ECHk7qKV6eqsBwvpYqTnNMWTgWKjmrZAwXy9gq8TZybs3JL2f2iDaTfM+dilKz6r2Tu3vBaY2x/AhAAis6sEONYupg+BzPHwGbJKehEYybq+Jx/AdtO8w80J4dLbZIgDGz6xUM0WL6VjToiZzokTsuv245FrbpwE8jr5lJXrubgebr6UxbN3qJuLjf751mic45VxUJ66+SVwY0dotFg+WIrt8NcAaXiiL6+BnA2mKxUrpwkGVDXYZMIAqcdlA/zR1RiSfcUnWSzn/dQXaD8ETKBtJY8L590osWldK0PkCN0KUTKJFzSQFtduU/LPARg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR11MB1631.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(33656002)(110136005)(71200400001)(5660300002)(107886003)(8676002)(54906003)(4326008)(82960400001)(8936002)(38070700005)(66476007)(66556008)(9686003)(6506007)(53546011)(508600001)(2906002)(316002)(7696005)(52536014)(66946007)(38100700002)(55016003)(122000001)(86362001)(64756008)(83380400001)(66446008)(76116006)(186003)(26005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?wGn29mHyF5X5xDDvlDdYElTCa6aU4pQqwNaEct0uXHAgpWSluDUtxkzXkH9e?= =?us-ascii?Q?Yl/qVUaFZ9/WMk18QDkh3Y+k5+v6H0lPMsFcYsp8GPzwwLFwm/2GmB9R7GcO?= =?us-ascii?Q?axr7Qs1qo7x6PRxNlwAnoMa6tnVfvffXX261aunArWgPyHjMxMo8f3r/8NqH?= =?us-ascii?Q?YQ1iDn4qPhmA/Ny2BU7ZqLRi+B2M1jXYMXihplyU62vlgo0x/HrAJcGl1uDM?= =?us-ascii?Q?xwzFqHC4TKgtBBxVj9ClZqLmaacHgf7wYr3XiVzrYPLT2GNl8xkhj5SHW2Ag?= =?us-ascii?Q?LbIhAjPkMn9zMuSeCkMyHXD2CIpx5Vo6o78Xhrf01DCH+2mckRxEI1YaCQkJ?= =?us-ascii?Q?RWmhhx206YXo5TA42+rE3gYw9pFSQU1x19sfHRyTcbqS04jaMmfcNv88OCI8?= =?us-ascii?Q?w8l5ItM3Ct3jtOWi7x/LX5XoR+u4Du3tg0L8QWEUb4hk6yOb6jF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Pr6cdEmhxvTeEwUhJOPYWq9f6ejBayDLKv?= =?us-ascii?Q?JAcflFnrlSOtjmcxRY4K2VVFcyiMX4pxzCU2LX7ka6xgD0byWvFQrtGZgEQF?= =?us-ascii?Q?vD6uI6umaE5Z48iU7oermkrjW28epocKE8SU4lbIGuZK4eKZso+2++/pllAY?= =?us-ascii?Q?t3P41hzrHjiP3jEqwWYF1g08DIGILFA+ncyCD9uWVLAMLgBEYY/M2OjD2pI6?= =?us-ascii?Q?8ank7DJGnb2awzKSWv/4WhvyAQ9lvjwEpdezCQl1mmNvCOltVKFGpyfy9JgI?= =?us-ascii?Q?gQsCTWmxnQjE9oEvq1kE0hs=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1631.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0523930c-6257-4137-2be7-08d9dfc69938 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jan 2022 05:50:31.3937 (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: 2nX8V+3B5YtyJaGLmbvOu9e6NODE1e3dF1PoPzqptf5HpxRsKR9aVt0bJf6iE+LEpXtJPyd5Xdf3z4yEA11lzw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB0019 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni -----Original Message----- From: Liu, Zhiguang =20 Sent: Wednesday, January 19, 2022 5:17 PM To: devel@edk2.groups.io Cc: Dong, Guo ; Ni, Ray ; Ma, Maurice= ; You, Benjamin Subject: [PATCH] UefiPayloadPkg: Use BaseCpuTimerLib for Universal Payload = by default Current, a macro CPU_TIMER_LIB_ENABLE is added to determine which timerlib is used. BaseCpuTimerLib.inf is a better way and only fit for recent CPU. Meanwhile, Universal Payload are only aimed to work with recent CPU. Therefore, for Universal Payload, use the BaseCpuTimerLib by default Cc: Guo Dong Cc: Ray Ni Cc: Maurice Ma Cc: Benjamin You Signed-off-by: Zhiguang Liu --- UefiPayloadPkg/UefiPayloadPkg.dsc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayload= Pkg.dsc index 65c1bd610e..1ce96a51c1 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.dsc +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc @@ -111,10 +111,10 @@ DEFINE SERIAL_DRIVER_ENABLE =3D TRUE DEFINE PERFORMANCE_MEASUREMENT_ENABLE =3D FALSE =20 - # For recent X86 CPU, 0x15 CPUID instruction will return Time Stamp Coun= ter. - # 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 defau= lt. - DEFINE CPU_TIMER_LIB_ENABLE =3D FALSE + # For recent X86 CPU, 0x15 CPUID instruction will return Time Stamp Coun= ter Frequence. + # This is how BaseCpuTimerLib works, and a recommended way to get Freque= nce, so set the default value as TRUE. + # Note: for emulation platform such as QEMU, this may not work and shoul= d set it as FALSE + DEFINE CPU_TIMER_LIB_ENABLE =3D TRUE =20 [BuildOptions] *_*_*_CC_FLAGS =3D -D DISABLE_NEW_DEPRECATED_INTERFACES @@ -222,7 +222,7 @@ # # Platform # -!if $(CPU_TIMER_LIB_ENABLE) =3D=3D TRUE +!if $(CPU_TIMER_LIB_ENABLE) =3D=3D TRUE && $(UNIVERSAL_PAYLOAD) =3D=3D TRU= E TimerLib|UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf !else TimerLib|UefiPayloadPkg/Library/AcpiTimerLib/AcpiTimerLib.inf --=20 2.32.0.windows.2