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 46743780091 for ; Mon, 13 May 2024 03:38:05 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=iej9dtpk1f/V4OO0xsYJT2+KaPINEdLMHbvpOj6dzb8=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language: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:Content-Transfer-Encoding; s=20240206; t=1715571483; v=1; b=F7ssyNGmky+0DpidM9LcFZB/E9Et7C6GAgBW5LsAsDSgFyBIRIIuoJ9KKw5mJMELKlWAmeZp owwBJNBcod/cgW8lmaBnIAYRvHfPDV6Q2ueQgG0WOLSfLzAO5fzdbP6Uayf3+qssC9q8RZxNhSU yvvGz/Nql3yeU3DotOSVyJ/6+GRva3iB34/5c31cibFeC6z/rxHpLLSFeAz00NnF525Y2wKuoCU OYHuRLEf0jwm2nYIVYGDaNQ/xmYcjBZ9UhvqMowBIOwNoC0I/beFmeZaHBzefyI68gU3p4MvwVp d2Zvjwryzfq/Y2ht+DgjKS6dZyVSjW/Swhh/3qFjZEZkg== X-Received: by 127.0.0.2 with SMTP id dgFFYY7687511xa6DuPxabsN; Sun, 12 May 2024 20:38:03 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mx.groups.io with SMTP id smtpd.web11.52159.1715571483135272517 for ; Sun, 12 May 2024 20:38:03 -0700 X-CSE-ConnectionGUID: ZXiEfNfUSHy+1hQCvFK9yA== X-CSE-MsgGUID: tvolYOBrRaaIOr9PH49YDQ== X-IronPort-AV: E=McAfee;i="6600,9927,11071"; a="29002703" X-IronPort-AV: E=Sophos;i="6.08,157,1712646000"; d="scan'208";a="29002703" X-Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2024 20:38:02 -0700 X-CSE-ConnectionGUID: mFTiWpiwR5K0BaDbbgTvMw== X-CSE-MsgGUID: t7bhKrWRQi2WKUIuhY+sZA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,157,1712646000"; d="scan'208";a="30318155" X-Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orviesa009.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 12 May 2024 20:38:02 -0700 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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.2507.35; Sun, 12 May 2024 20:38:02 -0700 X-Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) 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.2507.35 via Frontend Transport; Sun, 12 May 2024 20:38:02 -0700 X-Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) 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.2507.35; Sun, 12 May 2024 20:38:01 -0700 X-Received: from BN9PR11MB5483.namprd11.prod.outlook.com (2603:10b6:408:104::10) by IA0PR11MB8377.namprd11.prod.outlook.com (2603:10b6:208:487::5) 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 03:37:55 +0000 X-Received: from BN9PR11MB5483.namprd11.prod.outlook.com ([fe80::3baa:3852:4315:38f7]) by BN9PR11MB5483.namprd11.prod.outlook.com ([fe80::3baa:3852:4315:38f7%7]) with mapi id 15.20.7544.052; Mon, 13 May 2024 03:37:55 +0000 From: "duntan" To: "Wu, Jiaxin" , "devel@edk2.groups.io" CC: "Ni, Ray" , "Kumar, Rahul R" , Gerd Hoffmann Subject: Re: [edk2-devel] [PATCH 04/18] UefiCpuPkg: Save MTRR by lockbox in CpuS3DataDxe Thread-Topic: [PATCH 04/18] UefiCpuPkg: Save MTRR by lockbox in CpuS3DataDxe Thread-Index: AQHapOI1M+RKQQEREkWyB92+fzMFT7GUgLJg Date: Mon, 13 May 2024 03:37:54 +0000 Message-ID: References: <20240510100827.1903-1-dun.tan@intel.com> <20240510100827.1903-5-dun.tan@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BN9PR11MB5483:EE_|IA0PR11MB8377:EE_ x-ms-office365-filtering-correlation-id: 354d3419-7f4c-46df-7207-08dc72fe1342 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: =?us-ascii?Q?IUuLl9z6UcbupnIytDcBIiT6JhOUNjUN4wSg0dFL3o6hgXWbTYpeSqE3m1ja?= =?us-ascii?Q?aaGqNFV2yEgNNxmuSM2P8rYMcBnEAxR9Jy1gbSEtRmKFFn1Lme0GQHOJZfL3?= =?us-ascii?Q?0nsOw46hOjKjaVNp7ca+7BFSFW9abPDlQSYwjrKytzTI8qyJkpOzbNiI2+b6?= =?us-ascii?Q?LJ+ta0vx29sp1zSgdEvBlHV+ALI3geu9cT4AkQ1Juh+PLbhKlu4ZbVc/UpjP?= =?us-ascii?Q?q+KDfYAtFdCJq/gDzFVEkQ9foCWLwu1LmamktEBZJNT0ZkssDkiR9migP0Cu?= =?us-ascii?Q?MBL+D/QlnlioypjXefmjA3SiUqgZpbnZeTasnF/aSfWceNAzfoz9szLB/KdD?= =?us-ascii?Q?azK1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vaAny9+y5K90?= =?us-ascii?Q?hOk4X8+QhoEiWbGaTNDpBbjmdHGK3vd16PFboCekjJ7qBk5etfpsp3UC89jT?= =?us-ascii?Q?ugUBGJl2cgxuyMVT4Qkz4qhMPqfT/vWyWZ5pkz1pxJehqA=3D=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?hyn0ldcT8f94DGDejq9Mpv+aZUvy0Ds+MrOixUiAfjZlU/VpFSaSpOJ8holx?= =?us-ascii?Q?qThMUunIga7qnrHxntDM7eL7OXoZVbeZTtU0IMDWnIAKjrtHMJDwH+Ukpafb?= =?us-ascii?Q?RfQn037DeZiNF75WSp9+rgdA0qZfO3BgHYHa7GwRMMTDjOc8xLfKMW0inGam?= =?us-ascii?Q?9MIOZrCCBtmQWc/QM/ayOl+GLBINIZ82xEMNM5pc9N0Ff8vKYQRuuuTmdF9+?= =?us-ascii?Q?AQtGhVsshcHcJqmTx3lm+gkdPB/VJba2ZCu2nZ2cCOc2152vVmliu+dYWOT0?= =?us-ascii?Q?Ibkb/T2ogkWKSdTF1nDY67VC9WOhq+qQwfJw5yuVUQzlzvbeMQ/qMHhse73U?= =?us-ascii?Q?zzlAMA/c0A6nBrkiHBldJmDCM7geaT0SHkRzWJNjQnvLZOIbAEWTcRuxwX1U?= =?us-ascii?Q?7vQms2vjPteLLnY/kHrpN5euTeSpo8BwRPlDMMzmA1CppkQENU4MUuN0xUxS?= =?us-ascii?Q?3Z7IRJuder8cAj3zAxLR4IdSEweY9rshTuO4QN44o8JNw6TThqhvETmHatgm?= =?us-ascii?Q?MjQ6AchFgtwc+40CnvjYl19mTWiSlWD4xMIYs+RQUuV7lAx7g2xes75dgofN?= =?us-ascii?Q?1bUqFADmpTfHHmF+ErIWWvf5fE1deVIBFuh9AwyyTzzWGYpai0L5lBaAo+ko?= =?us-ascii?Q?+EJaAFUhEizahJaHF5OijUpoL5kGxGIu4rYFPdIclQqhUYp4esw8OHLCmq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So=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR11MB5483.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 354d3419-7f4c-46df-7207-08dc72fe1342 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2024 03:37:54.9946 (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: L0xrRJUocZDBV0cSg2z8fg7lA0y3LU4zK9YQkfwFCDPSc5YgPZWbSd6lEkNatLPmV+r8xwRyNFFDjfYKAiADkg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR11MB8377 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 20:38:03 -0700 Resent-From: dun.tan@intel.com Reply-To: devel@edk2.groups.io,dun.tan@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 9MqYGrSyCWlS4hu9eYvx9xbNx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=F7ssyNGm; 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 Yes, let's do the cleanup for PcdCpuS3DataAddress in another new patch set. Thanks, Dun -----Original Message----- From: Wu, Jiaxin =20 Sent: Monday, May 13, 2024 11:04 AM To: Tan, Dun ; devel@edk2.groups.io Cc: Ni, Ray ; Kumar, Rahul R ; G= erd Hoffmann Subject: RE: [PATCH 04/18] UefiCpuPkg: Save MTRR by lockbox in CpuS3DataDxe I think the MtrrTable is not needed in the AcpiCpuDataEx (which is from the= PcdCpuS3DataAddress). That mean: we can cleanup unused definition in the PcdCpuS3DataAddress. May= be in the future patches set, not this one. Thanks, Jiaxin=20 > -----Original Message----- > From: Tan, Dun > Sent: Friday, May 10, 2024 6:08 PM > To: devel@edk2.groups.io > Cc: Ni, Ray ; Kumar, Rahul R=20 > ; Gerd Hoffmann ; Wu,=20 > Jiaxin > Subject: [PATCH 04/18] UefiCpuPkg: Save MTRR by lockbox in=20 > CpuS3DataDxe >=20 > Save MTRR by lockbox in CpuS3DataDxe. In S3 boot, The MTRR setting=20 > will be restored in S3Resume.c in following patches. Then S3Resume.c=20 > will wakeup all APs to load the MTRR setting. This can avoid waking up=20 > APs in CpuS3.c. >=20 > Signed-off-by: Dun Tan > Cc: Ray Ni > Cc: Rahul Kumar > Cc: Gerd Hoffmann > Cc: Jiaxin Wu > --- > UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c | 11 +++++++++++ > UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf | 2 ++ > 2 files changed, 13 insertions(+) >=20 > diff --git a/UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c > b/UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c > index 86ce5303ca..825bb00b74 100644 > --- a/UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c > +++ b/UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c > @@ -26,6 +26,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 > #include #include #include=20 > > +#include >=20 > #include > #include > @@ -130,6 +131,16 @@ CpuS3DataOnEndOfDxe ( > DEBUG ((DEBUG_VERBOSE, "%a\n", __func__)); > MtrrGetAllMtrrs (&AcpiCpuDataEx->MtrrTable); >=20 > + // > + // Save MTRR in lockbox > + // > + Status =3D SaveLockBox ( > + &gEdkiiS3MtrrSettingGuid, > + &AcpiCpuDataEx->MtrrTable, > + sizeof (MTRR_SETTINGS) > + ); > + ASSERT_EFI_ERROR (Status); > + > // > // Close event, so it will not be invoked again. > // > diff --git a/UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf > b/UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf > index 510133a614..a09254746b 100644 > --- a/UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf > +++ b/UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf > @@ -46,9 +46,11 @@ > BaseLib > MtrrLib > MemoryAllocationLib > + LockBoxLib >=20 > [Guids] > gEfiEndOfDxeEventGroupGuid ## CONSUMES ## Event > + gEdkiiS3MtrrSettingGuid >=20 > [Protocols] > gEfiMpServiceProtocolGuid ## CONSUMES > -- > 2.31.1.windows.1 -=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 (#118853): https://edk2.groups.io/g/devel/message/118853 Mute This Topic: https://groups.io/mt/106018124/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-