[edk2-devel] [PATCH 2/2] UefiCpuPkg/CpuExceptionHandlerLib: remove duplicated pcd check

Chen, Gang C posted 2 patches 3 years, 10 months ago
[edk2-devel] [PATCH 2/2] UefiCpuPkg/CpuExceptionHandlerLib: remove duplicated pcd check
Posted by Chen, Gang C 3 years, 10 months ago
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 <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: devel@edk2.groups.io

Signed-off-by: Gang Chen <gang.c.chen@intel.com>
---
 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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#88693): https://edk2.groups.io/g/devel/message/88693
Mute This Topic: https://groups.io/mt/90391666/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-