From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 7F61E94138F for ; Mon, 13 May 2024 06:00:15 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=ZIyhplKnyzqaszxXYYUhX/szZqmS4kkFMDkd7RIlb88=; c=relaxed/simple; d=groups.io; h=From:To:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type; s=20240206; t=1715580013; v=1; b=2/Bu+SIRi2mJ94Lu6XPWv1c5IPZQnZSiSs5S5zDAkr5Iw6SNeBjj490TD41VMFcfVd5qdzcz oRjFD4/J9I2IvPJ3eJqKv/KOGWOVTF3mqL8IZabacpbKxgLZDo+dfgecg2zq9B9CBgmWhm4ZtBj 31VsIxypONwSIF71/KV7euYdnBlak1dc37aNuBr0sQmbJRrBc9WA1xvh8Is+swjowquZ0kjkT8q wfEKXTs7vnCBhG41ma18sjXhitiug6Y2aitC6bHQE9PwnyMu79zrZDgEFJo6YjmF6rWY7bvByfP Ef0D3mO6S5JRsrMWwGER47qagMHQmuZ+6l+Qr/MffD/Cw== X-Received: by 127.0.0.2 with SMTP id ocDuYY7687511xr81KfRjZJT; Sun, 12 May 2024 23:00:13 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mx.groups.io with SMTP id smtpd.web11.53747.1715580007946389487 for ; Sun, 12 May 2024 23:00:08 -0700 X-CSE-ConnectionGUID: g+tDt/1JQRiTCxPJtLWgVg== X-CSE-MsgGUID: 50CYPbnwRDmw5wRNSXLU1Q== X-IronPort-AV: E=McAfee;i="6600,9927,11071"; a="28986617" X-IronPort-AV: E=Sophos;i="6.08,157,1712646000"; d="scan'208,217";a="28986617" X-Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2024 23:00:08 -0700 X-CSE-ConnectionGUID: JaDkj7I9Q9uWYOljEr3ZbQ== X-CSE-MsgGUID: Vx9YJ0xnQf2NCElz9xcIwA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,157,1712646000"; d="scan'208,217";a="34915281" X-Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orviesa003.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 12 May 2024 23:00:07 -0700 X-Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sun, 12 May 2024 23:00:07 -0700 X-Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Sun, 12 May 2024 23:00:07 -0700 X-Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.100) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Sun, 12 May 2024 23:00:06 -0700 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by SA0PR11MB4558.namprd11.prod.outlook.com (2603:10b6:806:9e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.55; Mon, 13 May 2024 06:00:04 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::41a4:c775:32e6:76a8]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::41a4:c775:32e6:76a8%4]) with mapi id 15.20.7544.052; Mon, 13 May 2024 06:00:04 +0000 From: "Ni, Ray" To: "Tan, Dun" , "Wu, Jiaxin" , "devel@edk2.groups.io" Subject: Re: [edk2-devel] [PATCH 00/19] Remove some S3 related code in CpuS3.c of smm cpu driver Thread-Topic: [edk2-devel] [PATCH 00/19] Remove some S3 related code in CpuS3.c of smm cpu driver Thread-Index: AQHaosIZ/huRHnOkoUCliHgkiApCBrGUeqkAgAANpACAACeKrg== Date: Mon, 13 May 2024 06:00:04 +0000 Message-ID: References: <20240510100827.1903-1-dun.tan@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|SA0PR11MB4558:EE_ x-ms-office365-filtering-correlation-id: 8b8f73e4-5a36-450c-9627-08dc7311ef36 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: =?iso-8859-1?Q?n2sYK2nh7ZcCshxozc6aW5yksNa2DgkgfuVnGWnX5ieFiys4zzHmW+AcEv?= =?iso-8859-1?Q?U28iRzuRlyopu5rsYLfFvJnW42BSZGtFggxc9scOkUfSFxFR7TPFttjRHm?= =?iso-8859-1?Q?Mq8yvF+SG6q1muPd6oM0MQOFrL06uHif48MBQm/W6G7ZpNskxGhiqLFwO3?= =?iso-8859-1?Q?bLdAC3Pd9A5rWL2A1MUB/pQdpwGDy17Og/E78RNbbLQk+LUrxNMzoFUA5L?= =?iso-8859-1?Q?z+HHVqQioadhyEt2Vkl6HgF2359wRTThm+CO4Cs3tnHgDaLGt/nY391vsX?= =?iso-8859-1?Q?zniFRyhxjLx23p+IRhO4PMfRmnAcBdK0h8o7OsRKiZOS8kWdezE+LRRKhP?= =?iso-8859-1?Q?AoVPrJOJujUF+FDDpzEoHvw++hOLP5cCkpoBoouy9wzYS6ojJnUG20Aw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UcHYlWxWlm+RmdYJ7fZHSu5sV?= =?iso-8859-1?Q?nsNxpbHil+qcBMki41Hk8Rl8vlBo2NmUY0VWZsZfLWBLLPY=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?92pyG8Kjeibp+UVDQ/mLUu0sZLXUcUwBSVK9+gUjqLPmQHiIhmvX1/uBoZ?= =?iso-8859-1?Q?iQdz7pg5bpP6m8SMurP17yY1TaaUrATN5DKAZNrMMIxUavD9OHvoDBJkFj?= =?iso-8859-1?Q?n8//s4O7QSSzw/1SyeupECi1njbjyaI5zWN1h2D+gYt7TbYKDij3HUns1K?= =?iso-8859-1?Q?CaEAtw4Lwz8hjODByZMbBql9SqIJMR3E39uBZbFyNEXYG9lZAFrKUEeRnf?= =?iso-8859-1?Q?x2+1K4oIU+6dembdEhQ/yWBGBOlAAZA4+0z4oosL/irBpaiF7iJ9Cw3gIm?= =?iso-8859-1?Q?DoTY+2K09TTp5qZmbjv0WsMbBtaoffh0zJsophwq2ZCWtOQ+Gh49E/2O9x?= =?iso-8859-1?Q?G/xzlqMyzcQwcglSZHynVnLs3821Dq7XBwgkygkuz/D+UZGVKKVD6CMlsD?= =?iso-8859-1?Q?ENTmQozGCWvPQiiS0ggH0UHazs4/k9CSQZgzZomClpjmo5LVcLJFAlr/ZK?= =?iso-8859-1?Q?61UvOfIcaBIqA+96oqj2ynw5ApcDUkawTzF5OVm2e7XNy43yTHVr+8+lgK?= =?iso-8859-1?Q?QJ6gcmqhg9y70IbKQ+OFTcDSE6XDp7O90uI7UHE26qsCD+hz6yWux8l33i?= =?iso-8859-1?Q?Z+ZprHNEK3rid2ESlvfZcANXuKEiJZ20dJZ0DsI1D/qxvNk1r5diyzW1Cu?= =?iso-8859-1?Q?YEtDPjHuDpKbTW2bPvDDltot48xpi58l+kc1VJgCvbu9tRI6Rq7/g0vfP7?= =?iso-8859-1?Q?d3x5lfHMS+7BJnzXUSfVzO39se0nLE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= =?iso-8859-1?Q?3hALxS1hbnrf8=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8b8f73e4-5a36-450c-9627-08dc7311ef36 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2024 06:00:04.4377 (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: 6+RvgV0jtM8DGbk46YTfdiX6jZ2Z4+XTDEvGZgpr94Q5T0ADQ65Vaa5HbAW5hQUqz2ycxawhuVe9qxblxRsmEg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4558 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Sun, 12 May 2024 23:00:08 -0700 Resent-From: ray.ni@intel.com Reply-To: devel@edk2.groups.io,ray.ni@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 9fKbGa1Gpjsc6PBFVxE35zgkx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN6PR11MB82441AEFDF60F16C987D4B178CE22MN6PR11MB8244namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b="2/Bu+SIR"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io --_000_MN6PR11MB82441AEFDF60F16C987D4B178CE22MN6PR11MB8244namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Good suggestions, Jiaxin! Thanks, Ray ________________________________ From: Tan, Dun Sent: Monday, May 13, 2024 11:37 To: Wu, Jiaxin ; devel@edk2.groups.io ; Ni, Ray Subject: RE: [edk2-devel] [PATCH 00/19] Remove some S3 related code in CpuS= 3.c of smm cpu driver Thanks for the comments. Agree that the order adjustment can make the patch= set clearer. Will modify the commits in next version patch set. Thanks, Dun -----Original Message----- From: Wu, Jiaxin Sent: Monday, May 13, 2024 10:49 AM To: devel@edk2.groups.io; Tan, Dun ; Ni, Ray Subject: RE: [edk2-devel] [PATCH 00/19] Remove some S3 related code in CpuS= 3.c of smm cpu driver My comments as below: 1. I stronger recommend re-ordering the patches as below so as to combine a= ll related sub-patches together, then we can more easy understand what we a= re target to resolving: 1) S3 MTRRs operation 2) AP page table unavailiable= issue fix. 3) S3 ApHltLoopCode Operation 3) Register table cleanup 1) S3 MTRRs operation: > MdeModulePkg: Add gEdkiiS3MtrrSettingGuid > OvmfPkg: Save MTRR by lockbox in CpuS3DataDxe > UefiCpuPkg: Add locbox lib instance in DSC > UefiCpuPkg: Save MTRR by lockbox in CpuS3DataDxe > UefiCpuPkg: LoadMtrrData for all cpu in S3Resume > UefiCpuPkg: Remove code to load mtrr setting 2) AP page table unavailiable issue fix: > UefiCpuPkg: Disable PG in IA32 ApLoopCode 3) S3 ApHltLoopCode Operation: > UefiCpuPkg:Abstract some DxeMpLib code to function > UefiCpuPkg:Move some code in DxeMpLib to common place > UefiCpuPkg: Install gEdkiiEndOfS3ResumeGuid in S3Resume > UefiCpuPkg:Relocate AP to new safe buffer in PeiMpLib > UefiCpuPkg:Remove code to handle APIC setting and Interrupt > UefiCpuPkg:Rremove code to wakeup AP and relocate ap > UefiCpuPkg: Remove the duplicated mpservice locate > MdeModulePkg: remove MpService2Ppi field in SMM_S3_RESUME_STATE 4) Register table cleanup: > UefiCpuPkg:Set PcdCpuFeaturesInitOnS3Resume to TRUE > UefiCpuPkg: Remove code to set register table > UefiCpuPkg: Remove GetAcpiCpuData() in CpuS3.c 2. Update all intel copyright year. 3. Add all reviewer in the 00 patch. 4. Add PR in the 00 patch (if have). Thanks, Jiaxin > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of duntan > Sent: Friday, May 10, 2024 6:08 PM > To: devel@edk2.groups.io > Subject: [edk2-devel] [PATCH 00/19] Remove some S3 related code in > CpuS3.c of smm cpu driver > > This patch set is to remove some S3 related code in CpuS3.c of smm cpu > driver. It contain commits to: > 1.Save MTRR setting by lockbox in PEI phase 2.Load MTRR in S3Resume.c > before transferring to CpuS3.c in smm cpu driver. > 3.Add callback of gEdkiiEndOfS3ResumeGuid in PeiMpLib to relocate Ap > to new safe buffer. > 4.Install gEdkiiEndOfS3ResumeGuid in S3Resume.c before booting OS to > relocate APs 4.Change PcdCpuFeaturesInitOnS3Resume to TRUE to set > register table in CpuFeaturesPei 5.Remove code to set register > table/load mtrr/wakeup AP and relocate ap in CpuS3.c. > > With this patch set, CpuS3.c in smm CPU driver can be simplified. > > Dun Tan (18): > MdeModulePkg: Add gEdkiiS3MtrrSettingGuid > OvmfPkg: Save MTRR by lockbox in CpuS3DataDxe > UefiCpuPkg: Add locbox lib instance in DSC > UefiCpuPkg: Save MTRR by lockbox in CpuS3DataDxe > UefiCpuPkg: LoadMtrrData for all cpu in S3Resume > UefiCpuPkg: Remove the duplicated mpservice locate > UefiCpuPkg: Install gEdkiiEndOfS3ResumeGuid in S3Resume > UefiCpuPkg:Abstract some DxeMpLib code to function > UefiCpuPkg:Move some code in DxeMpLib to common place > UefiCpuPkg:Relocate AP to new safe buffer in PeiMpLib > UefiCpuPkg: Disable PG in IA32 ApLoopCode > UefiCpuPkg: Remove code to load mtrr setting > UefiCpuPkg:Set PcdCpuFeaturesInitOnS3Resume to TRUE > UefiCpuPkg: Remove code to set register table > UefiCpuPkg:Remove code to handle APIC setting and Interrupt > UefiCpuPkg:Rremove code to wakeup AP and relocate ap > UefiCpuPkg: Remove GetAcpiCpuData() in CpuS3.c > MdeModulePkg: remove MpService2Ppi field in SMM_S3_RESUME_STATE > > Ray Ni (1): > MdePkg: Add MmUnblockMemoryLib to MdeLibs.dsc > > MdeModulePkg/Include/Guid/AcpiS3Context.h | 1 - > MdeModulePkg/MdeModulePkg.dec | 3 +++ > MdePkg/MdeLibs.dsc.inc | 3 ++- > OvmfPkg/CpuS3DataDxe/CpuS3Data.c | 11 ++++++++++= + > OvmfPkg/CpuS3DataDxe/CpuS3DataDxe.inf | 2 ++ > UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c | 11 ++++++++++= + > UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf | 2 ++ > UefiCpuPkg/Library/MpInitLib/DxeMpLib.c | 181 > +++++++++++++++++++++++++++++++++++++++++++++++------------------- > ---------------------------------------------------------------------- > ------------------------ > ----------- > UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm | 4 ++++ > UefiCpuPkg/Library/MpInitLib/MpLib.c | 142 > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > ++++++++++++++++++ > UefiCpuPkg/Library/MpInitLib/MpLib.h | 54 > ++++++++++++++++++++++++++++++++++++++++++++++++++- > UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf | 4 ++++ > UefiCpuPkg/Library/MpInitLib/PeiMpLib.c | 152 > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > ++++++++++++++++++++++++++++ > UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c | 991 ++++++++--= ------- > ---------------------------------------------------------------------- > ------------------------ > ---------------------------------------------------------------------- > ------------------------ > -- > UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/MpFuncs.nasm | 153 ----------= -- > ---------------------------------------------------------------------- > ------------------------ > --------------------------------------- > UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c | 27 ----------= -- > -------------- > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 6 ++---- > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 24 ----------= - > ------------ > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf | 3 --- > UefiCpuPkg/PiSmmCpuDxeSmm/X64/MpFuncs.nasm | 189 ----------= -- > ---------------------------------------------------------------------- > ------------------------ > ------------------------------------------------------------------------- > UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c | 28 ----------= -- > --------------- > UefiCpuPkg/UefiCpuPkg.dec | 2 +- > UefiCpuPkg/UefiCpuPkg.dsc | 1 + > UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c | 76 > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- > ------------- > UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf | 2 ++ > 25 files changed, 511 insertions(+), 1561 deletions(-) delete mode > 100644 UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/MpFuncs.nasm > delete mode 100644 UefiCpuPkg/PiSmmCpuDxeSmm/X64/MpFuncs.nasm > > -- > 2.31.1.windows.1 > > > >=20 > -=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 (#118856): https://edk2.groups.io/g/devel/message/118856 Mute This Topic: https://groups.io/mt/106018119/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --_000_MN6PR11MB82441AEFDF60F16C987D4B178CE22MN6PR11MB8244namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Good suggestions, Jiaxin!


Thanks,
Ray


From: Tan, D= un <dun.tan@intel.com>
Sent: Monday, May 13, 2024 11:37
To: Wu, Jiaxin <jiaxin.wu@intel.com>; devel@edk2.groups.i= o <devel@edk2.groups.io>; Ni, Ray <ray.ni@intel.com>
Subject: RE: [edk2-devel] [PATCH 00/19] Remove some S3 related = code in CpuS3.c of smm cpu driver
 
Thanks for the comments. Agree that the ord= er adjustment can make the patch set clearer. Will modify the commits in ne= xt version patch set.

Thanks,
Dun

-----Original Message-----
From: Wu, Jiaxin <jiaxin.wu@intel.com>
Sent: Monday, May 13, 2024 10:49 AM
To: devel@edk2.groups.io; Tan, Dun <dun.tan@intel.com>; Ni, Ray <r= ay.ni@intel.com>
Subject: RE: [edk2-devel] [PATCH 00/19] Remove some S3 related code in CpuS= 3.c of smm cpu driver

My comments as below:
1. I stronger recommend re-ordering the patches as below so as to combine a= ll related sub-patches together, then we can more easy understand what we a= re target to resolving: 1) S3 MTRRs operation 2) AP page table unavailiable= issue fix. 3)  S3 ApHltLoopCode Operation 3) Register table cleanup

1) S3 MTRRs operation:
>   MdeModulePkg: Add gEdkiiS3MtrrSettingGuid
>   OvmfPkg: Save MTRR by lockbox in CpuS3DataDxe
>   UefiCpuPkg: Add locbox lib instance in DSC
>   UefiCpuPkg: Save MTRR by lockbox in CpuS3DataDxe
>   UefiCpuPkg: LoadMtrrData for all cpu in S3Resume
>   UefiCpuPkg: Remove code to load mtrr setting

2) AP page table unavailiable issue fix:
>   UefiCpuPkg: Disable PG in IA32 ApLoopCode

3)  S3 ApHltLoopCode Operation:
>   UefiCpuPkg:Abstract some DxeMpLib code to function
>   UefiCpuPkg:Move some code in DxeMpLib to common place
>   UefiCpuPkg: Install gEdkiiEndOfS3ResumeGuid in S3Resume >   UefiCpuPkg:Relocate AP to new safe buffer in PeiMpLib
>   UefiCpuPkg:Remove code to handle APIC setting and Interrup= t
>   UefiCpuPkg:Rremove code to wakeup AP and relocate ap
>   UefiCpuPkg: Remove the duplicated mpservice locate
>   MdeModulePkg: remove MpService2Ppi field in SMM_S3_RESUME_= STATE

4) Register table cleanup:
>   UefiCpuPkg:Set PcdCpuFeaturesInitOnS3Resume to TRUE
>   UefiCpuPkg: Remove code to set register table
>   UefiCpuPkg: Remove GetAcpiCpuData() in CpuS3.c

2. Update all intel copyright year.
3. Add all reviewer in the 00 patch.
4. Add PR in the 00 patch (if have).

      
Thanks,
Jiaxin


> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of d= untan
> Sent: Friday, May 10, 2024 6:08 PM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PATCH 00/19] Remove some S3 related code in
> CpuS3.c of smm cpu driver
>
> This patch set is to remove some S3 related code in CpuS3.c of smm cpu=
> driver. It contain commits to:
> 1.Save MTRR setting by lockbox in PEI phase 2.Load MTRR in S3Resume.c<= br> > before transferring to CpuS3.c in smm cpu driver.
> 3.Add callback of gEdkiiEndOfS3ResumeGuid in PeiMpLib to relocate Ap > to new safe buffer.
> 4.Install gEdkiiEndOfS3ResumeGuid in S3Resume.c before booting OS to > relocate APs 4.Change PcdCpuFeaturesInitOnS3Resume to TRUE to set
> register table in CpuFeaturesPei 5.Remove code to set register
> table/load mtrr/wakeup AP and relocate ap in CpuS3.c.
>
> With this patch set, CpuS3.c in smm CPU driver can be simplified.
>
> Dun Tan (18):
>   MdeModulePkg: Add gEdkiiS3MtrrSettingGuid
>   OvmfPkg: Save MTRR by lockbox in CpuS3DataDxe
>   UefiCpuPkg: Add locbox lib instance in DSC
>   UefiCpuPkg: Save MTRR by lockbox in CpuS3DataDxe
>   UefiCpuPkg: LoadMtrrData for all cpu in S3Resume
>   UefiCpuPkg: Remove the duplicated mpservice locate
>   UefiCpuPkg: Install gEdkiiEndOfS3ResumeGuid in S3Resume >   UefiCpuPkg:Abstract some DxeMpLib code to function
>   UefiCpuPkg:Move some code in DxeMpLib to common place
>   UefiCpuPkg:Relocate AP to new safe buffer in PeiMpLib
>   UefiCpuPkg: Disable PG in IA32 ApLoopCode
>   UefiCpuPkg: Remove code to load mtrr setting
>   UefiCpuPkg:Set PcdCpuFeaturesInitOnS3Resume to TRUE
>   UefiCpuPkg: Remove code to set register table
>   UefiCpuPkg:Remove code to handle APIC setting and Interrup= t
>   UefiCpuPkg:Rremove code to wakeup AP and relocate ap
>   UefiCpuPkg: Remove GetAcpiCpuData() in CpuS3.c
>   MdeModulePkg: remove MpService2Ppi field in SMM_S3_RESUME_= STATE
>
> Ray Ni (1):
>   MdePkg: Add MmUnblockMemoryLib to MdeLibs.dsc
>
>  MdeModulePkg/Include/Guid/AcpiS3Context.h    = ;           |  = 1 -
>  MdeModulePkg/MdeModulePkg.dec      = ;            &n= bsp;        |   3 +++
>  MdePkg/MdeLibs.dsc.inc       =             &nb= sp;            =   |   3 ++-
>  OvmfPkg/CpuS3DataDxe/CpuS3Data.c     &n= bsp;            = ;      |  11 +++++++++++
>  OvmfPkg/CpuS3DataDxe/CpuS3DataDxe.inf    &nb= sp;            =   |   2 ++
>  UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c     = ;            &n= bsp;   |  11 +++++++++++
>  UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf    =             | &= nbsp; 2 ++
>  UefiCpuPkg/Library/MpInitLib/DxeMpLib.c    &= nbsp;            | 1= 81
> +++++++++++++++++++++++++++++++++++++++++++++++-------------------
> ----------------------------------------------------------------------=
> ------------------------
> -----------
>  UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm   =        |   4 ++++
>  UefiCpuPkg/Library/MpInitLib/MpLib.c    &nbs= p;            &= nbsp;  | 142
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++++++++++++
>  UefiCpuPkg/Library/MpInitLib/MpLib.h    &nbs= p;            &= nbsp;  |  54
> ++++++++++++++++++++++++++++++++++++++++++++++++++-
>  UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf   &= nbsp;       |   4 ++++
>  UefiCpuPkg/Library/MpInitLib/PeiMpLib.c    &= nbsp;            | 1= 52
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++++++++++++++++++++++
>  UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c     &= nbsp;           &nbs= p;     | 991 ++++++++---------
> ----------------------------------------------------------------------=
> ------------------------
> ----------------------------------------------------------------------=
> ------------------------
> --
>  UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/MpFuncs.nasm   &nb= sp;         | 153 ------------
> ----------------------------------------------------------------------=
> ------------------------
> ---------------------------------------
>  UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c   &= nbsp;       |  27 ------------
> --------------
>  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c   &nbs= p;          |   6 ++= ----
>  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h   &nbs= p;          |  24 -------= ----
> ------------
>  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf   &n= bsp;        |   3 ---
>  UefiCpuPkg/PiSmmCpuDxeSmm/X64/MpFuncs.nasm   &nbs= p;          | 189 ------------=
> ----------------------------------------------------------------------=
> ------------------------
> ----------------------------------------------------------------------= ---
>  UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c   &n= bsp;        |  28 ------------
> ---------------
>  UefiCpuPkg/UefiCpuPkg.dec      &nb= sp;            =             | &= nbsp; 2 +-
>  UefiCpuPkg/UefiCpuPkg.dsc      &nb= sp;            =             | &= nbsp; 1 +
>  UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c  &nb= sp;    |  76
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
> -------------
>  UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf | &= nbsp; 2 ++
>  25 files changed, 511 insertions(+), 1561 deletions(-)  del= ete mode
> 100644 UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/MpFuncs.nasm
>  delete mode 100644 UefiCpuPkg/PiSmmCpuDxeSmm/X64/MpFuncs.nasm >
> --
> 2.31.1.windows.1
>
>
>
>
>

_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#118856) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_MN6PR11MB82441AEFDF60F16C987D4B178CE22MN6PR11MB8244namp_--