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 5C00DD8094F for ; Mon, 21 Aug 2023 02:10:14 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=e7zZqPU7ISpHEWYz5UWQF03qpkhHiKsg1XkYx8cynEE=; 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=dvJNk0Q6kq2nPqSspy6wacjANk210lwqI9KO6I5lw38/NDSN+PUntQguKkBDGH4eJbnqLxmU 8m62cz9Qabk/1pi5WXqD1gOEVQoYp6sx874gHTBxxg8/65ie2fwQzexk6MyAbpDW95Zt2BIOsQ6 HmPAlRda2gl56dYUYsN08CJA= X-Received: by 127.0.0.2 with SMTP id IAISYY7687511xtJotZoI1oE; 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: vbkTyK6dV7veThUYEc3DoDJZx7686176AA= 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=dvJNk0Q6; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none) 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 = %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 (#107903): https://edk2.groups.io/g/devel/message/107903 Mute This Topic: https://groups.io/mt/100866132/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-