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 A5F7774003D for ; Mon, 13 May 2024 03:04:09 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=5439JNxUiYvxEVQhLvMSP58Sm7/78L5T6wLPq7n+8tg=; 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=1715569448; v=1; b=oPaSfyU2Rv1wFfLEzUia7m4N/MAe7vR0fpPYEFtuF5XusxiMsv6NPPQ4YbN/IFZGTMu4gGIA 7asvynyBRLtyisl5KOi+NjcaX2QqtYGWEU5F6avyk7Gg0l16Z+vf6hIR9LDBlU6YGiC90CQe8wL yE9GsakZdvTfqrF41Qr1FYZrjnScs7vN3FPMl4psXaVrrKZffz9+ywxK2aqXZJLb/CGc4ndMEnQ WjtV0AjPqSpb4sZNwnaxhLokj884NnZoxNk8e9F6NuV5mv9AdWnOCOdm9r74sBQ3kraOaAEOy2p +bGYmvXmUfsJ17O75pSUzyeAKZ8o9GSywL5XtbMsseATA== X-Received: by 127.0.0.2 with SMTP id SeHPYY7687511xvyEXsV1dpp; Sun, 12 May 2024 20:04:08 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by mx.groups.io with SMTP id smtpd.web11.51816.1715569447049247969 for ; Sun, 12 May 2024 20:04:07 -0700 X-CSE-ConnectionGUID: 69x3Q8sOSt6HuevkB+rD+A== X-CSE-MsgGUID: 3gi8VolmQ/+F6H5JIJvPug== X-IronPort-AV: E=McAfee;i="6600,9927,11071"; a="11310972" X-IronPort-AV: E=Sophos;i="6.08,157,1712646000"; d="scan'208";a="11310972" X-Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2024 20:04:07 -0700 X-CSE-ConnectionGUID: Dk0S4AlERvWZrorOg2bzdw== X-CSE-MsgGUID: oGevLH95QzWBsbmhYBFEVQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,157,1712646000"; d="scan'208";a="30759034" X-Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orviesa008.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 12 May 2024 20:04:07 -0700 X-Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) 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:04:05 -0700 X-Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx611.amr.corp.intel.com (10.18.126.91) 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:04:05 -0700 X-Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) 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:04:05 -0700 X-Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.40) 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:04:05 -0700 X-Received: from MN0PR11MB6158.namprd11.prod.outlook.com (2603:10b6:208:3ca::18) by DM3PR11MB8715.namprd11.prod.outlook.com (2603:10b6:0:1e::9) 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:04:03 +0000 X-Received: from MN0PR11MB6158.namprd11.prod.outlook.com ([fe80::13cf:47a8:4737:84e9]) by MN0PR11MB6158.namprd11.prod.outlook.com ([fe80::13cf:47a8:4737:84e9%3]) with mapi id 15.20.7544.039; Mon, 13 May 2024 03:04:03 +0000 From: "Wu, Jiaxin" To: "Tan, Dun" , "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: AQHaosIZssGIL4CtjEmZPPZtsdkPi7GUfkuA Date: Mon, 13 May 2024 03:04:03 +0000 Message-ID: References: <20240510100827.1903-1-dun.tan@intel.com> <20240510100827.1903-5-dun.tan@intel.com> In-Reply-To: <20240510100827.1903-5-dun.tan@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN0PR11MB6158:EE_|DM3PR11MB8715:EE_ x-ms-office365-filtering-correlation-id: c27b7cfb-2252-43b2-6bf1-08dc72f9587e x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: =?us-ascii?Q?o27953MEtEaWaZ40f8QTzV7e//eFrHFcbpQgiLUSFDsXrfbGDatuCPYlw7bc?= =?us-ascii?Q?zO/qaxxNT52etKdfzdRtvvDUSaUuDCBaq9OGWPV0jy8AcbYPHxG29ZHsz9B6?= =?us-ascii?Q?/F5LoaK3pPFmmwqDjC4WsccU3GN9W7oqYV2vwluBfF9juViY8NmMlIwZCZjX?= =?us-ascii?Q?hC92rsImP+LAq8KE748K0PXzUl13YcbW/aZsFyn6bt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F4CfLOL9tyyIc9GVPjTFgMbZnrYWzMqPoow?= =?us-ascii?Q?EDpIgw6pHEeUUgD6EzVVh6isbDxFrQeM4r8jD74qMebZzoigMwm9OcKqlWSS?= =?us-ascii?Q?uuC2EhPbFkrgDsySNkzQpfPt+qlNQP2RvkNiHd6+S7M/1w0VMOCY1ThT9x1h?= =?us-ascii?Q?eWjwPbU+0kLENCdqhO7FHjcvjmrCT47zCkKR1pyAZeanWZzLdcwHNy/6F+/Y?= =?us-ascii?Q?zjclAVZy+7wlHKhov2X3byoL/o3USzGesYL1ZIr4emMomQ=3D=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?PQGhIugPWICHehj0MLYatFxfIGZjPJ38MMpJnkw1MFgXyibfhbCCTwtP05Sg?= =?us-ascii?Q?VWRNtNkAPuO9k2k2RUT3y/snQakXvNiqZ1yrfIAIipdW9VB1/iiUgtCNsQLN?= =?us-ascii?Q?UMMjjapQAxpF4a4dWDOdZ/voT2VP/Hy5MemVx10O3MpiS82NsF68Ca6suMcv?= =?us-ascii?Q?xEmtOi1U4IKpcLaVe8rBUcDb+FYn+PFSiWPUP156zsEX72eGsu+IB9Cy/jN1?= =?us-ascii?Q?09kUPOR+GUcMhJkNsrKwx77V3hZWxxh6QZjDJb+zZ3MRKdzj6fYPKbkrenEH?= =?us-ascii?Q?uSD0tmk0m/KN+Q1YhRwRnIjkTX4ZYAoO5LKAcjP4WTP3H4DtNUlSA5SeqZG/?= =?us-ascii?Q?K/qyYJApYE0vRYeRRe4vfGEB5ZoBofRHbqew8f/sfbELV0GmcYhQydTwg5Re?= =?us-ascii?Q?vrVQI8DS+mhLMm9XsAMvPB6fdtMnbEehkBbLOAyrSDy9xLaEHvx7+vSqP5UW?= =?us-ascii?Q?yvTd1KU01Aly4Iahl76u+YxdYoWWTMDFzSmxC4J+MgHInfdxfc+9G7Klm162?= =?us-ascii?Q?gfmBQsuqQ0wiThGBjblT71+JAx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ascii?Q?Ciw6Ro4G38UuCNIAgQ4PeMNmv95DW6WLlGWMfFHDeLtI0LGxC4pPhx9wJ5h7?= =?us-ascii?Q?/KmjTJiw5Rh+S0TY3WGwY2IE3MANJgagNDQOGDPjGQbg3+W9QDahJ/PW58CQ?= =?us-ascii?Q?EhIvz/4zbC/ND7uGUgzIDph31EVU3V1LpfPzcm+p?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN0PR11MB6158.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c27b7cfb-2252-43b2-6bf1-08dc72f9587e X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2024 03:04:03.6760 (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: c2Tl2D+AZalJcWyLJJhxwUnuL6ahaZXYAC7uWrTZWuGPYA7RA/YwRdkTRY16Z7kWffOQ3F0AvEHbH/znOCujWA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR11MB8715 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:04:07 -0700 Resent-From: jiaxin.wu@intel.com Reply-To: devel@edk2.groups.io,jiaxin.wu@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: qjC0cuoBc1M6kQfwSKgkFEmqx7686176AA= 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=oPaSfyU2; 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 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 ; > Gerd Hoffmann ; Wu, Jiaxin > Subject: [PATCH 04/18] UefiCpuPkg: Save MTRR by lockbox in CpuS3DataDxe >=20 > Save MTRR by lockbox in CpuS3DataDxe. In S3 boot, > The MTRR setting will be restored in S3Resume.c > in following patches. Then S3Resume.c will wakeup > all APs to load the MTRR setting. This can avoid > waking up 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 > #include > #include > #include > +#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 (#118851): https://edk2.groups.io/g/devel/message/118851 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-