From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web11.27850.1649672047375397921 for ; Mon, 11 Apr 2022 03:14:11 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=bCygNSpo; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: gang.c.chen@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649672050; x=1681208050; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RGFDXbF+XCC2DKcOTZsq1RkoawL3Y/jUOHsreiBCaUY=; b=bCygNSpo1WNm7kmewWp/4YrRaAQONT4PjAK0pcAZMRgtoLgtua5lGcSx osDAD+A0+1Nit1RP/inlHcLqUsdCqYYi8nWrIP48U3oH0UTMnaTpox6BU XSoVDhA5jRun+OItsvGfq2l09gE8QippXhZd61/x0YBPUAC0EOclA01lp phjdACS5e1xbcPQofc1JNA4L9VL4dOiVszRFpEs5dZDowvqrWChQ1LuI6 62baDWlNXps2iE9oi/jIuqc38A1CMCa31lry2nSc47NXTuZmiiR7aK7AZ WOYRN2qKIlYihBkVbFtfF8q2OREvH5qeYeq2NdOvacvIgPOwzJcnszOAn w==; X-IronPort-AV: E=McAfee;i="6400,9594,10313"; a="259677117" X-IronPort-AV: E=Sophos;i="5.90,251,1643702400"; d="scan'208";a="259677117" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2022 03:14:10 -0700 X-IronPort-AV: E=Sophos;i="5.90,251,1643702400"; d="scan'208";a="572060737" Received: from gchen29.sh.intel.com ([10.239.154.135]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2022 03:14:08 -0700 From: "Chen, Gang C" To: devel@edk2.groups.io Cc: guomin.jiang@intel.com, dandan.bi@intel.com, di.zhang@intel.com, Eric Dong , Ray Ni , Rahul Kumar Subject: [PATCH 2/2] UefiCpuPkg/CpuExceptionHandlerLib: remove duplicated pcd check Date: Mon, 11 Apr 2022 18:13:50 +0800 Message-Id: <20220411101350.697997-3-gang.c.chen@intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411101350.697997-1-gang.c.chen@intel.com> References: <20220411101350.697997-1-gang.c.chen@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Remove the duplicated PcdCpuStackGuard check for it has been checked at the entry of InitializeMpExceptionStackSwitchHandlers, which will invoke the current function. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3897 Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: devel@edk2.groups.io Signed-off-by: Gang Chen --- UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuException.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuException.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuException.c index 687fc4177f..bcd4175ffa 100644 --- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuException.c +++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuException.c @@ -254,7 +254,7 @@ InitializeCpuExceptionHandlersEx ( // // Initializing stack switch is only necessary for Stack Guard functionality. // - if (PcdGetBool (PcdCpuStackGuard) && (InitData != NULL)) { + if (InitData != NULL) { Status = ArchSetupExceptionStack (InitData); } } -- 2.35.1