From a25cb9f604507a96c537eea6eb9c5a743b3c1b02 Mon Sep 17 00:00:00 2001 From: vanjeff Date: Thu, 1 Nov 2012 23:51:22 +0000 Subject: Fixed one bug: gSmmCorePrivate->InSmm is not set to FALSE correctly before exiting signed-off-by: Jeff Fan reviewed-by: Michael.D.Kinney git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13912 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Core/PiSmmCore/PiSmmCore.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'MdeModulePkg') diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c index 3c9d863346..c1b3563d01 100644 --- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c @@ -245,6 +245,7 @@ SmmEntryPoint ( { EFI_STATUS Status; EFI_SMM_COMMUNICATE_HEADER *CommunicateHeader; + BOOLEAN InLegacyBoot; PERF_START (NULL, "SMM", NULL, 0) ; @@ -261,7 +262,8 @@ SmmEntryPoint ( // // If a legacy boot has occured, then make sure gSmmCorePrivate is not accessed // - if (!mInLegacyBoot) { + InLegacyBoot = mInLegacyBoot; + if (!InLegacyBoot) { // // Mark the InSmm flag as TRUE, it will be used by SmmBase2 protocol // @@ -307,7 +309,7 @@ SmmEntryPoint ( // // If a legacy boot has occured, then make sure gSmmCorePrivate is not accessed // - if (!mInLegacyBoot) { + if (!InLegacyBoot) { // // Clear the InSmm flag as we are going to leave SMM // -- cgit v1.2.3