From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 44254780091 for ; Wed, 6 Sep 2023 03:12:03 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=9PHEKuTfL14K8mQ8VV4tCBPFmxUqVRO07eUQa44+bT4=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC: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:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type; s=20140610; t=1693969921; v=1; b=qtYvO7h+dYMg8PHobMUG5ePbZrCvf1RYXmubkGxBnh4kyg9XU4dwJO9Z7gCpnsGfQZ1czcbk awEMpp4RTLg1Rtg4jk+naNG3Z1OLPBPTd6Ze4nj6hyxVChrCZ7oFXV1gvdBDYJAasFS++ayCeug WWLf7ICFJKNFy1kWw6GdYlZU= X-Received: by 127.0.0.2 with SMTP id HUy7YY7687511xT62uH5VcY0; Tue, 05 Sep 2023 20:12:01 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web11.677.1693969921116602701 for ; Tue, 05 Sep 2023 20:12:01 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10824"; a="443350679" X-IronPort-AV: E=Sophos;i="6.02,230,1688454000"; d="scan'208,217";a="443350679" X-Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2023 20:11:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10824"; a="691148697" X-IronPort-AV: E=Sophos;i="6.02,230,1688454000"; d="scan'208,217";a="691148697" X-Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga003.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 05 Sep 2023 20:11:36 -0700 X-Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 5 Sep 2023 20:11:36 -0700 X-Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) 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.27; Tue, 5 Sep 2023 20:11:35 -0700 X-Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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.27 via Frontend Transport; Tue, 5 Sep 2023 20:11:35 -0700 X-Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.44) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Tue, 5 Sep 2023 20:11:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bs7YN+fX9KsOZQuv9MwwVSeNblnl2/PBtEvBnWvl0C5qXgw1guLX2+NV0p2Fj2pIy1+1Mxrod1pgyT9F3iJsRkvwsqDX1SIi8bHh3v2kI9z/zW3XaDtciHImgXcqqs61kuYbtmrtKpWYS2S/nfLPjIvXeq7p3hBXtGG06n1zg7EP49HPXuDuFFD0ucRqjLt2Usr0WRPEDe2V67OOZRxPxSdcw52CcsgxYzJd/1iUlZPAfvILoqwVTMt6XhCbw5gV3j7Eca+1vSlYon5T86/98IyJmheOnTli6/bwUOX4X5VL9uMNCpl+vKYJs2ZbaAGV0LRZ4CN+tkodl4I3xDb2KA== 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=a1CF6DZND6GyKdjbuHAxJeAwEhfQvOHMVS1iO1Nscxg=; b=AcHzk3Qyjg4GjIFXtOlfKBmwdIz4K2dE0yvMqbFg9987zyAhISCc4mKFI9kKrHxQMjx2dR0SljISzCT8mL8mvrAtrkYSNpbrIHtEnrTV067d3SI4iln8pkXvWi9F+Nv4E2xUrobIi+1EsiRgz+iUPQqg4+rZgAma+2NGS1jmcf1geW38czq99MINLPmhZvfxvZsln5IcTu5ggc19RfSnw7kdOd1BITGEhwmqeBKbIl6V/F0+hyKIFWtQJOMnPcg/eeDnwhvo7a1WGA0QoMWyDpksc62cwwG94H5irczC16Rhf3aiiewQwq7Q6L8Mr74L26mKVeM9de1ztPaw1jQxtQ== 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 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by CYYPR11MB8388.namprd11.prod.outlook.com (2603:10b6:930:c2::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.33; Wed, 6 Sep 2023 03:11:33 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::bf9a:54ca:d270:59b]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::bf9a:54ca:d270:59b%5]) with mapi id 15.20.6745.030; Wed, 6 Sep 2023 03:11:33 +0000 From: "Ni, Ray" To: "Tan, Dun" , "devel@edk2.groups.io" CC: "Dong, Eric" , "Kumar, Rahul R" Subject: Re: [edk2-devel] [Patch V2 3/5] UefiCpuPkg/S3Resume2Pei: assert for invalid excution mode combo Thread-Topic: [Patch V2 3/5] UefiCpuPkg/S3Resume2Pei: assert for invalid excution mode combo Thread-Index: AQHZ09SkxTajVoGrFkCnJYPE01xctrANN+8D Date: Wed, 6 Sep 2023 03:11:33 +0000 Message-ID: References: <20230821020947.346-1-dun.tan@intel.com> <20230821020947.346-4-dun.tan@intel.com> In-Reply-To: <20230821020947.346-4-dun.tan@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|CYYPR11MB8388:EE_ x-ms-office365-filtering-correlation-id: 73f599b5-a816-4a7f-a2f6-08dbae86f969 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: N9FpbtwaAu0ARWURvWZS3ICOyTgkLCxcFJCSSgr4Af5Igw0olAEQ/tbO3JbXSTpqGc447ikd0anCDK4zxYok04z0Vz+nNDf4/bG04tr9RLMAiqyW2CzQhp3Bc+1IPNPAuW0JgIAwutAQSVN0fU7zUYsID0c1VynDktDJeQ9an66prsvuutqlSVI5VCocgure11acaXRcSeID/A8Oj2zTa7YaZQztM2UCo6E/I6IIKNop3J7jvWLXvnzcO8ef+t68T8LdKgEvCrbNu/8uZVtF2IZg1/coKKLrNGXqQwNk2WJ4NBwfXRLaej2GLiVZicckodsZ+U+tTzT7aFHOF1YWFUjsu229njfZCum84LyvtUvrq2PMG6cni/7jAE0GELnyA0s7X6nI06PYViarSqxFUrgMNoRjuJE8b9cmQhk0RSzbSPJ5ZkUN/dkEyHai9aiwJTS7/gA6EKzFDsD7hOdb+5Q2d9SPsTEQOAcUVJbwgB5+vHARyzVHI6+/z+DUOwCmwG7wAiLprRZ4oFG+GA7DzkuWZrslAMTs/JqjAE07xBqUGuqdaK8diQDOncmahtBi4zQwCF7UQRsqYBsN7EPy+ha4/rV8BSDd+g2FGGGC8Hn1Jv4uSjBwC4a3QPCxANKW x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ZDy+3lZ1M6tfS3oLEU4qu1OJI7IXX4jMVOX1mwN9hzXr4jgRwE83TjtTUMUw?= =?us-ascii?Q?BCU5mtv3Alg8gKMDqs2aWeneERYZiMc4RO3xJiok8hAsMalqs+hedcQnJCLV?= =?us-ascii?Q?8sLJ0tkOYcbJQPDO0zCnG4JyBDZoY1l0jIVLgu7K3D3SMlx6aeSDuxuKFlWU?= =?us-ascii?Q?0Rz7cIDFz4HAUn1hoPKXvz6j54MUSRFo8p5Du8P+Nyzy9NKrgRw/2i8axBY7?= =?us-ascii?Q?f2O3wdd/ygJxMtb+RHa/KbJ7kqL76M/4XV4I3WwQ3ZzGJP+CESFWENeI4c9L?= =?us-ascii?Q?wj8/RHjCo2INuA18WQGTQeWRWETTpYn79/kODJVH9ithiSUDWDGAg9l9/vG/?= =?us-ascii?Q?4k78CRefr7RTMM+JJMEguI9uJRldKLJ5gfci3jl88JESn3zeAlmiPB+twjLw?= =?us-ascii?Q?inlaRF71oRiI7aDZ/MAUrfRrdjwzq5nOkM68VY8zSBJbLCJ4yWOmIwz1zSP0?= =?us-ascii?Q?5mv3y8b4UcjePcoWNkVUTsjF/yfYERnpJntIXKnArWPStJylrHzl5Shi0q4d?= =?us-ascii?Q?uUKTHMlAF9VKcPYB7W7vslwHIe44uxt+kksp0Zsd3byejqP7ZL3SuUZOmJNo?= =?us-ascii?Q?5/hGEO4r8vQByj+aJnZPlLWbWGU6gQYXdnO9PRz3ngFWNyH47cbKC7iKZ+AC?= =?us-ascii?Q?zWSzvzMmyaG4daHoQWs49M7GgkTlxVFN/gLQm8sAkmgWwv5QKeCmEEpwLFet?= =?us-ascii?Q?EJsFHfV7D8nhStdOBO6Q+mLUpXeFDsYuSr2n8gxHgG7KlL1PQP5I/Q9/mfJh?= =?us-ascii?Q?WbmQIKo+Uh5EoMo0piTte0vB4A8mrtGp1sDhviuAZLLsXrX4I0BT4YREvZ+X?= =?us-ascii?Q?v/TBxRyNNwzRhZHqhAXgvm+VNN0asWggD0qSB9BLhkfnm0LrZ10yNrd+uYoI?= =?us-ascii?Q?ktXRyS/z4ePsCADnmL4iEMDOD0eOkJP4bYkD16VLTYd9OpIHjphrP58yCqmz?= =?us-ascii?Q?IQaHZ73TvYCFxhVqUDVawEV04W4DjmZVRksIU3hpD26CAQJQG5vySO9VxS8h?= =?us-ascii?Q?YVABG8Q5BmVrjrmKyRvDoFOvCq8ARC93KvWp17ENBa9XMQ6JJpmWB6x+99z8?= =?us-ascii?Q?mcPujFz7O6buAOmFlPGUQuHqG6m55CILXySdL4oMyLYyNHx01Fuq+msa5CGW?= =?us-ascii?Q?JPvMFoR0RnkmhwelJuSUnuk+c15QDB3cozUFHY1Lma6gZ8uVotv8q1iZBgnx?= =?us-ascii?Q?6895wOSxhih55iNUA1kfDfZ8kM6vYRENKgK29iygQBr5Nss3riYqcNuhwhTF?= =?us-ascii?Q?5M99I1JTLcmfGaunKCXdHxBHu58YGLzrXgFS6rOs0Ci1iiZjCVDl6op+m4H7?= =?us-ascii?Q?H/IQEKK0FPWG7Ml/9mgMY/FLcdhSFbd0JRI73MB+h3O90x4wQWF1rLgPUcqN?= =?us-ascii?Q?iEV9HJ5OKad0SVX6nFTsh9MMHKGVKPCuKIutrprDFXGWVJi52ALuodITdBA8?= =?us-ascii?Q?xNChUNIko+yCmZW90H3JBzjA29LcxmKGsBfNCbXN90j4zGK3oKlCUAezpaD/?= =?us-ascii?Q?yQIz0NKn7G9xCmlTe2XR/1pykjBdsvElznlK7mefy7oRxLP32nD3B4HaXaK1?= =?us-ascii?Q?SpkosgvyntzE8pAZDQ0=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: 73f599b5-a816-4a7f-a2f6-08dbae86f969 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Sep 2023 03:11:33.6180 (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: DBrAOhZ5qsSGAjwjoxQzaj79zKQAQVLq3X2herFWVidMtVfZ6RNdrIAtXdkJeyCdgrKxrlhyIc4rqetp2r2etA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR11MB8388 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 Reply-To: devel@edk2.groups.io,ray.ni@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: dgDGcLB1iNkyh6APiGFHPuLVx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN6PR11MB82447CC9E82AEE25ABC89DA08CEFAMN6PR11MB8244namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=qtYvO7h+; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); 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 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io --_000_MN6PR11MB82447CC9E82AEE25ABC89DA08CEFAMN6PR11MB8244namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni Thanks, Ray ________________________________ From: Tan, Dun Sent: Monday, August 21, 2023 10:09 AM To: devel@edk2.groups.io Cc: Dong, Eric ; Ni, Ray ; Kumar, Ra= hul R Subject: [Patch V2 3/5] UefiCpuPkg/S3Resume2Pei: assert for invalid excutio= n mode combo Add assert for invalid excution mode combination of 64bit PEI + 32bit DXE. Signed-off-by: Dun Tan Cc: Eric Dong Reviewed-by: Ray Ni Cc: Rahul Kumar --- UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c b/UefiCpuPkg= /Universal/Acpi/S3Resume2Pei/S3Resume.c index 1fd5670c7f..4cf676fb3e 100644 --- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c +++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c @@ -1106,6 +1106,13 @@ S3RestoreConfig2 ( DEBUG ((DEBUG_INFO, "SMM S3 Return Stack Pointer =3D %x\n", SmmS3R= esumeState->ReturnStackPointer)); DEBUG ((DEBUG_INFO, "SMM S3 Smst =3D %x\n", SmmS3R= esumeState->Smst)); + // + // 64bit PEI and 32bit DXE is not a supported combination. + // + if (SmmS3ResumeState->Signature =3D=3D SMM_S3_RESUME_SMM_32) { + ASSERT (sizeof (UINTN) =3D=3D sizeof (UINT32)); + } + // // Directly do the switch stack when PEI and SMM env run in the same e= xecution mode. // -- 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 (#108301): https://edk2.groups.io/g/devel/message/108301 Mute This Topic: https://groups.io/mt/100866132/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --_000_MN6PR11MB82447CC9E82AEE25ABC89DA08CEFAMN6PR11MB8244namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Reviewed= -by: Ray Ni <ray.ni@intel.com>



Thanks,
Ray

From: Tan, Dun <dun.tan@= intel.com>
Sent: Monday, August 21, 2023 10:09 AM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Dong, Eric <eric.dong@intel.com>; Ni, Ray <ray.ni@intel= .com>; Kumar, Rahul R <rahul.r.kumar@intel.com>
Subject: [Patch V2 3/5] UefiCpuPkg/S3Resume2Pei: assert for invalid = excution mode combo
 
Add assert for invalid excution mode combination o= f 64bit PEI +
32bit DXE.

Signed-off-by: Dun Tan <dun.tan@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
---
 UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c b/UefiCpuPkg= /Universal/Acpi/S3Resume2Pei/S3Resume.c
index 1fd5670c7f..4cf676fb3e 100644
--- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
+++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
@@ -1106,6 +1106,13 @@ S3RestoreConfig2 (
     DEBUG ((DEBUG_INFO, "SMM S3 Return Stack Poin= ter     =3D %x\n", SmmS3ResumeState->ReturnStac= kPointer));
     DEBUG ((DEBUG_INFO, "SMM S3 Smst  &= nbsp;           &nbs= p;      =3D %x\n", SmmS3ResumeState->Smst)= );
 
+    //
+    // 64bit PEI and 32bit DXE is not a supported combinati= on.
+    //
+    if (SmmS3ResumeState->Signature =3D=3D SMM_S3_RESUME= _SMM_32) {
+      ASSERT (sizeof (UINTN) =3D=3D sizeof (UINT3= 2));
+    }
+
     //
     // Directly do the switch stack when PEI and SMM e= nv run in the same execution mode.
     //
--
2.31.1.windows.1

_._,_._,_

Groups.io Links:

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

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

_._,_._,_
--_000_MN6PR11MB82447CC9E82AEE25ABC89DA08CEFAMN6PR11MB8244namp_--