From nobody Sun Feb 8 17:48:05 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+107903+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+107903+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1692583813; cv=none; d=zohomail.com; s=zohoarc; b=VEoawsxMZS6AMWaN8KB/oL44ydbqPHF0mT0U0eXN5o9RjxYNoft+wlBSVoidpRHiQRDme4b9FPTHPmcLTVLb7JSIR+oTSgXpiqlRn0tvy8DuOHDUbnG2pIEYgw+IyIEpAANTYpRN3pcv+1vTf4dCLbkLCoEbWBT2XEIqooacGKo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1692583813; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=0J4SLyhkdx9qmdu1td84rJlKQKvz9l4wFcVzkBxSp70=; b=EGgN/4yTl/t1XB1B75v/+WcJOtJYR8VlwmV3Mt3PrKIt4Wn3LjFvtSzs3ez/F1csSgbXhuaEsH5+WWIf52+znIN6fcJdo4QGZ42mVbO5VgtY3JzChCb7ZrMs+NX1XjKMsu5PdZUj7L6PdwuGbo5wBljc6D6lIE74Lt/t04hzBy0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+107903+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 169258381325679.67115594807638; Sun, 20 Aug 2023 19:10:13 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=saonGnMXdU8riCyMrW6C86Ptz6UAgt4jyR4+vW5jw20=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1692583812; v=1; b=f8HujhKkvsoax7+8/g58sH9FKXsUABvhrbp2+ScniJ2xHnBmdHxbnuzGhvDtka4wT9oZB/NU fsMt04vvZCd0iRD5S0MRmOUCavQp71fqgTqA908UOs+dCxnMNpUrqtKILkusjaugGPqaHSe7wEh 6gSb+qDxS4ZIzatZF89xpQKw= X-Received: by 127.0.0.2 with SMTP id RKigYY1788612xzn7cPFS9xM; Sun, 20 Aug 2023 19:10:12 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web10.2394.1692583803192993573 for ; Sun, 20 Aug 2023 19:10:12 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10808"; a="377212506" X-IronPort-AV: E=Sophos;i="6.01,189,1684825200"; d="scan'208";a="377212506" X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Aug 2023 19:10:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10808"; a="909521908" X-IronPort-AV: E=Sophos;i="6.01,189,1684825200"; d="scan'208";a="909521908" X-Received: from shwdeppedeas070.ccr.corp.intel.com (HELO shwdeopenlab702.ccr.corp.intel.com) ([10.239.55.158]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Aug 2023 19:10:10 -0700 From: "duntan" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Rahul Kumar Subject: [edk2-devel] [Patch V2 3/5] UefiCpuPkg/S3Resume2Pei: assert for invalid excution mode combo Date: Mon, 21 Aug 2023 10:09:45 +0800 Message-Id: <20230821020947.346-4-dun.tan@intel.com> In-Reply-To: <20230821020947.346-1-dun.tan@intel.com> References: <20230821020947.346-1-dun.tan@intel.com> MIME-Version: 1.0 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,dun.tan@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 0Y0xfQTv8z1TgNwOchnoor2hx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1692583814094100005 Content-Type: text/plain; charset="utf-8" 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)); =20 + // + // 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. // --=20 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 (#107903): https://edk2.groups.io/g/devel/message/107903 Mute This Topic: https://groups.io/mt/100866132/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-