From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web10.30075.1615167912559268456 for ; Sun, 07 Mar 2021 17:45:12 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=pjOyv0it; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: eric.dong@intel.com) IronPort-SDR: YkJaVtgFdNgKLx6BbWaUffgAuofVBUk8SzGkrh16TxF4gdX7p4cpuZPlBBniHAP76ZOLFMqjuK I9A/X7jN3g4Q== X-IronPort-AV: E=McAfee;i="6000,8403,9916"; a="175059500" X-IronPort-AV: E=Sophos;i="5.81,231,1610438400"; d="scan'208";a="175059500" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2021 17:45:10 -0800 IronPort-SDR: R6WxCLYue1/GKoAA0Q8d3wWt9cdtBNQHtE8RQo4CWVUCpBKkzKBL6ENIVYlYpLJP8NimKvKD9M hgtGAjxkT76w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,231,1610438400"; d="scan'208";a="508760872" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga001.fm.intel.com with ESMTP; 07 Mar 2021 17:45:10 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Sun, 7 Mar 2021 17:45:09 -0800 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Sun, 7 Mar 2021 17:45:09 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Sun, 7 Mar 2021 17:45:09 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.100) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Sun, 7 Mar 2021 17:45:04 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mz81ZamKHKePNs2z8OhIXN0Z/4eKq/ABWjKRCqgr6OzYOb6vMo9UuWoVwFEGaydG5FjFjhONQ2Wc3kCkoKj+6FWD+CbFKUPzg6x0nRTHvuGbTICTeAENr5tZMKgfcuwYhWon7UAKVtFLByIg7csSqcEF5HVdk/XMWodLxF7oiKwGwaSkJ5RyZs3itel60U4wAyTGn9+1oZR1Jdrig5/q0kU7PuGsg3lWU1dwr6UYhhnRaCEAi7GUr7JFJwIGVPFUnZWt7/8d81vIniG7ndWL0G3a7rEYJikVijyH+in9sZLb/W3iFqz/fz7hEpIvL8azxZLHlfiO4+h+s7wMIZzAtQ== 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-SenderADCheck; bh=J+RfDxTtpR7k36wArDJdWe7+7VAVucyFAv3vHhwZDVM=; b=HhKnxk0/Rr4c9ZgCOky8WVtoZoXI3xrOVaizQouxsH+dVnWjfI5PxW5jk1l3oqCE1RaKHg83R/DayWdUFvzLz9w0TmJeD+gKrrJn2aRb0Z62ZfP6oBG0oB4pKNbEdWwqrlGs9Y9nl+0UIPxvJBdYTujFqW18QxtR+wWPZrDKeD00GYICGC6wrPrbtxPp51z/c/KviL6FDpcEV+4rf9CU76HmDAWmasRz0ApmigfeiHVMQd6klI8n9vkjNbDl7dTca0UN+vrx4mUve7oQEaz8+UY/+GdZJ8IZKgULdM0BUM0MEyQtuag9KZZhgjGwSYZq4Yv5UgZn2DK1fCVB8f/f/Q== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=J+RfDxTtpR7k36wArDJdWe7+7VAVucyFAv3vHhwZDVM=; b=pjOyv0itmpP5XoHmevjrKuCJXyL0Hxq28IlKWO0s0YOWFE3SGgOFkKJXcMhEqd22DXej50yZ42k/LMPx4fn7Kh3WLxdnUnx3FQh1BMudXK1RiVOZ/qUOnG18ypv9ckz2qy2YDkGPiIpK3B7y7Smro/t827iLn2dYCK7XTrC7Yz4= Received: from CY4PR11MB1272.namprd11.prod.outlook.com (2603:10b6:903:29::9) by CY4PR1101MB2248.namprd11.prod.outlook.com (2603:10b6:910:1a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.20; Mon, 8 Mar 2021 01:45:02 +0000 Received: from CY4PR11MB1272.namprd11.prod.outlook.com ([fe80::918c:7df3:f688:d5e9]) by CY4PR11MB1272.namprd11.prod.outlook.com ([fe80::918c:7df3:f688:d5e9%5]) with mapi id 15.20.3890.037; Mon, 8 Mar 2021 01:45:02 +0000 From: "Dong, Eric" To: "devel@edk2.groups.io" , "mikuback@linux.microsoft.com" CC: "Ni, Ray" , Laszlo Ersek , "Kumar, Rahul1" Subject: Re: [edk2-devel] [PATCH v3 0/5] UefiCpuPkg/StandaloneMmCpuFeaturesLib: Add Standalone MM support Thread-Topic: [edk2-devel] [PATCH v3 0/5] UefiCpuPkg/StandaloneMmCpuFeaturesLib: Add Standalone MM support Thread-Index: AQHXBXSDwHLVee4tQUSW+HpM2UTwjap5bjJA Date: Mon, 8 Mar 2021 01:45:02 +0000 Message-ID: References: <20210217213227.1277-1-mikuback@linux.microsoft.com> In-Reply-To: <20210217213227.1277-1-mikuback@linux.microsoft.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.37] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7bb70a01-2bc2-4e7d-e5f3-08d8e1d3caa2 x-ms-traffictypediagnostic: CY4PR1101MB2248: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:935; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jH9NIHdApni68etMuhn7PkVTOgedoJz+FGAqmvul+Bmx02bbSHCw5u27wE/FgTIkHaJz/nntXPxxrMwVm1G9lyW9RklUDFXMBOTZ/GybIVZDnMNPZbV3vGw7X1NRC+Yg+dhMvZuMvFqAQnUQMNX5P1gDeQyK6E2C2k2h/y1OSv/UxVIVR0d3bBRwfYA8PmgqeOA8Ql4gZ1qydFpO9eX3MwIlpmD2jMZJVa+ZONE9DV6MnA4NFZP5BGux1rZBaafDYTbeWY8O2aksXv1K+C87pd6uQqStKLBWc99lOkQAvLufWfZuy8Glzf9/L40PRJvJZy02G81OfLnpGAzDcVrxqo7Kt0Ei+P0n3DmhawlBJNxo51TEDWffT4syjvPkHXkf69aWEKe3s6xKQLlH3hrciH9gVxjAvBQhMxMs6P2hNwcDRi4ZuANApDYxyfZLAg1C1Qpr9/5yiwsTIqjF/liH0ww+K3EqC2GzK9boBw7ctqquYHecDZKGwaFmiggE9NcTi9/tkHH4d08sSDzxf8Hk1S+0QS0b6QCepGfLoKhEAJF3bzEGhptTw6wNC3VBAKFqdUeJFrqhOZM/zrrHzu9CCWVSqfFggNd0b7rVhNdu1Pg= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR11MB1272.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(6029001)(39860400002)(376002)(136003)(396003)(366004)(346002)(4326008)(71200400001)(8676002)(66476007)(9686003)(66446008)(66556008)(66946007)(64756008)(55016002)(110136005)(316002)(2906002)(6506007)(966005)(53546011)(86362001)(26005)(54906003)(478600001)(8936002)(83380400001)(186003)(107886003)(52536014)(5660300002)(76116006)(7696005)(33656002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?JerhPOFfGU7KUvUhujmDI7B631Pf+G0legFjW8ATszGiFoERnr4ErrHEE85i?= =?us-ascii?Q?9KasU/Wf6+td5PeKCucCrYZDjWlBlnM2518gQThN2jeucbVOg2kOi40f7v1A?= =?us-ascii?Q?3m3QlLq+wgUGRvMI7Sg1t6hAPp8ebyKrmeLY+wv1lqGey0IIV/oqznMmSNuW?= =?us-ascii?Q?bGSHc2NArYrUDlkeDowhW9hgZhEfEQjaPgKMIFClAX18jRYCkwpMLbDx7JPC?= =?us-ascii?Q?AGgwQhvc3ra3eLi4Jb55H4m3MdBPP9lT7+VxwPnFDcM8w+mE4Z/B+e5qQrAg?= =?us-ascii?Q?xLS+zl3RqVwENc5eflRo3uqNKGphdxdVLwNZGiJg0h/Yf6eg98rllSCxGKF6?= =?us-ascii?Q?XEhtzNU1120fRqee08h5qYAyC6v4RWniD6B4Zfl/08wsT9oNaB1tT49Jpmeh?= =?us-ascii?Q?+kqT+xu36isOAnNTdYxutiFC7P7fJ7L1RqZIpDRXZpcAggz/TWL3asoFTgJg?= =?us-ascii?Q?MftsxzMDH5M5qMCK1fruPqt8vy8s5svKZN+1atkrq28s/5o/ohbFCUMcHg0f?= =?us-ascii?Q?D3YyY4vmS8JRsr3sKv07EBbRU5MpsIDFunrQKe/kKptBx/qPltoC8OJc+Tij?= =?us-ascii?Q?HMjFKLyKN4bQ3praWiZx+9JTE3oADrsS/7nqrYWwRqNtppzI97hyU39jiLk5?= =?us-ascii?Q?hM4FvOIMjXkr46jrEWd64iXoaTjRC42gB3t1HPBOzClWiELxLk0a2w8L7qR+?= =?us-ascii?Q?/2adZx1cQ5Jeou3xf9RA0BDYrcHCGloH7pOl2lHFFr8bYPL1e6YeWkJpaE3D?= =?us-ascii?Q?tWAxuQFbr2FLRhhByk+JBTLhgJ9ZF3ttTO9xxFloOzm9IfHmkWwGNCkyQMXM?= =?us-ascii?Q?mqp17jj9V2GFfQv1pqYmfu2P5MTGezCT4GgXMb93kIGmq+inx8ZP2RtEp0Wp?= =?us-ascii?Q?Q8qHDZcbOalmyd7girgi6v+cKIZuOXrteGi71RDEhiFaH9K8/b2xohZEwjww?= =?us-ascii?Q?cjUWkm5us7YSq8Trginvy24tA/VonDisH4rEKtl9bt/eUHO3SCB40Uv96Ulj?= =?us-ascii?Q?lIbI8v/YeK3Kb0byi/9BS3kXo2An9gxrR6hvZh0Bx+zoph9zInJt/2LfGEd7?= =?us-ascii?Q?EBwtDWZDieY/qNqmPqncrMNpIcOapIWtW1Ivov/5VJxaNoYURNLb57nbmlv8?= =?us-ascii?Q?CrQd3nj8eHsbHK3slKXiraZok+QKWSGnwgJCd/kAoJjprs3BcXeUWDenPmhj?= =?us-ascii?Q?2sLMvqdZktNfceP8N50YnXijAOjrEB62pjm2rUOSmJkwbR33CQgdUv0/hRuY?= =?us-ascii?Q?KKQLpUg5+O2m5Bwk6yUElxSZgdM9RUG8e4vAKsmJ2mSpF5xpA2Np4OYrfN+r?= =?us-ascii?Q?mim0O6TSwepf4yjsz5p/oLwp?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR11MB1272.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7bb70a01-2bc2-4e7d-e5f3-08d8e1d3caa2 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2021 01:45:02.5578 (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: zqgDkYq9dZOWgYk85flf4ne1cSCIGVuHR0yb3poZ25AvFEiF7iPi8BYdB8wSAY0FvcSWCjLgvQBlf76PYUORNw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2248 Return-Path: eric.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: Eric Dong for this serial. -----Original Message----- From: devel@edk2.groups.io On Behalf Of Michael Kuba= cki Sent: Thursday, February 18, 2021 5:32 AM To: devel@edk2.groups.io Cc: Dong, Eric ; Ni, Ray ; Laszlo Er= sek ; Kumar, Rahul1 Subject: [edk2-devel] [PATCH v3 0/5] UefiCpuPkg/StandaloneMmCpuFeaturesLib:= Add Standalone MM support From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3218 The present SmmCpuFeaturesLib implementation in UefiCpuPkg can be useful fo= r IA32/X64 platforms that need a library instance for a Standalone MM envir= onment. Much of the logic can be reused and a new INF can isolate the diffe= rences unique to Standalone MM. This patch series contains an initial set of changes for cleaning up pre-ex= isting design issues in the library. The final two patches contain changes = needed for Standalone MM support. Here's an overview of how the three library instances are organized that ma= y be a useful reference (provided by Laszlo): Traditional, Traditional, Standalone, no STM STM no STM Entry point type DXE DXE MM Lib inst. init. basic STM basic Processor init. basic STM basic PCD access any any fixed * Traditional no STM =3D SmmCpuFeaturesLib.inf * Traditional STM =3D SmmCpuFeaturesLibStm.inf * Standalone no STM =3D StandaloneMmCpuFeaturesLib.inf V3 changes: PATCH v3 2/5 is a new patch in the series that renames the file SmmCpuFeaturesLib.c to SmmCpuFeaturesLibCommon.c to more clearly identify implementation in the file as shared between all library instances. PATCH v3 3/5 adds a new source file SmmCpuFeaturesLib.c that contains the constructor specific to the Traditional MM no STM library instance. This was previously implemented in a file built by the Standalone MM instance and while not harmful, it was not clean. PATCH v3 4/5 updates "@retval" to "@return" in the documentation for GetCpuMaxLogicalProcessorNumber() since it is not a constant return value. =20 PATCH v3 5/5 contains a commit message update to note that all instances of "PiSmm.h" in the library source files have been updated to "PiMm.h" for consistency throughout the library. V2 changes: Due to some pre-existing design issues in the library that affected a single v1 patch that add Standalone MM support, it was suggested to first address those issues and then add the new INF StandaloneMmCpuFeaturesLib.inf. To address these concerns, the following v1 patch was converted into a v2 patch series: https://edk2.groups.io/g/devel/message/71626 The first two patches in v2 primarily addressed those concerns. PATCH v2 1/4 and PATCH v2 2/4 focused on fixing pre-existing design issues. PATCH v2 3/4 and PATCH v2 4/4 focused on the changes needed to add Standalone MM support. Cc: Eric Dong Cc: Ray Ni Cc: Laszlo Ersek Cc: Rahul Kumar Signed-off-by: Michael Kubacki Michael Kubacki (5): UefiCpuPkg/SmmCpuFeaturesLib: Move multi-instance function decl to header UefiCpuPkg/SmmCpuFeaturesLib: Rename SmmCpuFeaturesLib.c UefiCpuPkg/SmmCpuFeaturesLib: Cleanup library constructors UefiCpuPkg/SmmCpuFeaturesLib: Abstract PcdCpuMaxLogicalProcessorNumber UefiCpuPkg/SmmCpuFeaturesLib: Add Standalone MM support UefiCpuPkg/Library/SmmCpuFeaturesLib/Ia32/SmmStmSupport.c = | 2 +- UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c = | 608 +------------------- UefiCpuPkg/Library/SmmCpuFeaturesLib/{SmmCpuFeaturesLib.c =3D> SmmCpuFeatu= resLibCommon.c} | 36 +- UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibNoStm.c = | 3 +- UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.c = | 26 +- UefiCpuPkg/Library/SmmCpuFeaturesLib/StandaloneMmCpuFeaturesLib.c = | 50 ++ UefiCpuPkg/Library/SmmCpuFeaturesLib/TraditionalMmCpuFeaturesLib.c = | 28 + UefiCpuPkg/Library/SmmCpuFeaturesLib/X64/SmmStmSupport.c = | 2 +- UefiCpuPkg/Library/SmmCpuFeaturesLib/CpuFeaturesLib.h = | 48 ++ UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf = | 3 + UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibStm.inf = | 4 +- UefiCpuPkg/Library/SmmCpuFeaturesLib/{SmmCpuFeaturesLib.inf =3D> Standalon= eMmCpuFeaturesLib.inf} | 22 +- UefiCpuPkg/UefiCpuPkg.dsc = | 1 + 13 files changed, 172 insertions(+), 661 deletions(-) copy UefiCpuPkg/Lib= rary/SmmCpuFeaturesLib/{SmmCpuFeaturesLib.c =3D> SmmCpuFeaturesLibCommon.c}= (93%) create mode 100644 UefiCpuPkg/Library/SmmCpuFeaturesLib/StandaloneM= mCpuFeaturesLib.c create mode 100644 UefiCpuPkg/Library/SmmCpuFeaturesLib/TraditionalMmCpuFe= aturesLib.c create mode 100644 UefiCpuPkg/Library/SmmCpuFeaturesLib/CpuFeaturesLib.h copy UefiCpuPkg/Library/SmmCpuFeaturesLib/{SmmCpuFeaturesLib.inf =3D> Stan= daloneMmCpuFeaturesLib.inf} (53%) -- 2.28.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D Groups.io Links: You receive all messages sent to this group. View/Reply Online (#71751): https://edk2.groups.io/g/devel/message/71751 Mute This Topic: https://groups.io/mt/80715262/1768733 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [eric.dong@intel.com] -=3D-=3D-=3D-=3D-=3D-=3D