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 77DE6940D35 for ; Thu, 27 Jul 2023 02:21:05 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=xQhbOohQYbG8gS7W2RZ7yG+kk2NbAZUOUBcE1dOu7cM=; c=relaxed/simple; d=groups.io; h=X-Received:X-Received:X-IronPort-AV:X-IronPort-AV:X-Received:X-ExtLoop1:X-IronPort-AV:X-IronPort-AV:X-Received: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:X-Gm-Message-State:Content-Transfer-Encoding; s=20140610; t=1690424464; v=1; b=mBW1TjLL37X5IU0rm5+AqzKZn/l2yFO5QYNmp8atoELb4TggNDOYqKkv6plM/pY4hFDK8m2/ t9veRELXNFyu+vE9LKba16TzYpptikD2bDxZV8N5xlQYFdov4gbSb3x3Pe5ItVq7iOjtYNPDjkP +pbgp6rq8DMCsc0Pjoofw7VQ= X-Received: by 127.0.0.2 with SMTP id RldiYY7687511xn8UAY6OENu; Wed, 26 Jul 2023 19:21:04 -0700 X-Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web11.4235.1690424456424173367 for ; Wed, 26 Jul 2023 19:21:03 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10783"; a="399122617" X-IronPort-AV: E=Sophos;i="6.01,233,1684825200"; d="scan'208";a="399122617" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2023 19:21:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10783"; a="756460968" X-IronPort-AV: E=Sophos;i="6.01,233,1684825200"; d="scan'208";a="756460968" X-Received: from shwdeopenlab702.ccr.corp.intel.com ([10.239.55.158]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2023 19:21:01 -0700 From: "duntan" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Rahul Kumar Subject: [edk2-devel] [PATCH 3/5] UefiCpuPkg/S3Resume2Pei: assert for invalid excution mode combo Date: Thu, 27 Jul 2023 10:20:38 +0800 Message-Id: <20230727022040.1910-4-dun.tan@intel.com> In-Reply-To: <20230727022040.1910-1-dun.tan@intel.com> References: <20230727022040.1910-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: fRT03FAPC0yLoDL70HKX3RIsx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=mBW1TjLL; 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 Add assert for invalid excution mode combination of 64bit PEI + 32bit DXE. Signed-off-by: Dun Tan Cc: Eric Dong Cc: 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 6574849939..34aa901f93 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 = %x\n", SmmS3ResumeState->ReturnStackPointer)); DEBUG ((DEBUG_INFO, "SMM S3 Smst = %x\n", SmmS3ResumeState->Smst)); + // + // 64bit PEI and 32bit DXE is not a supported combination. + // + if (SmmS3ResumeState->Signature == SMM_S3_RESUME_SMM_32) { + ASSERT (sizeof (UINTN) == sizeof (UINT32)); + } + // // Directly do the switch stack when PEI and SMM env run in the same execution mode. // -- 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107281): https://edk2.groups.io/g/devel/message/107281 Mute This Topic: https://groups.io/mt/100383961/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-