summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c')
-rw-r--r--MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
index 21cd87c315..532d4f2f6f 100644
--- a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
+++ b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
@@ -454,9 +454,9 @@ SmmCommunicationCommunicate (
}
//
- // Don't allow call SmiManage() directly when SMRAM is closed or locked.
+ // If we are not in SMM, don't allow call SmiManage() directly when SMRAM is closed or locked.
//
- if (!mSmmAccess->OpenState || mSmmAccess->LockState) {
+ if ((!gSmmCorePrivate->InSmm) && (!mSmmAccess->OpenState || mSmmAccess->LockState)) {
return EFI_INVALID_PARAMETER;
}