summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
diff options
context:
space:
mode:
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2010-12-09 08:02:34 +0000
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2010-12-09 08:02:34 +0000
commit96756716c04c4a17296568d027abc123dfab5fa7 (patch)
tree282bf51afb1337cd35ecd09e6beb5fc31c3a0865 /MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
parent969ebd263bb9a46943dbac8c6a5fb650b21af28e (diff)
downloadedk2-96756716c04c4a17296568d027abc123dfab5fa7.tar.gz
edk2-96756716c04c4a17296568d027abc123dfab5fa7.tar.bz2
edk2-96756716c04c4a17296568d027abc123dfab5fa7.zip
when SMM Communication Protocol.Communicate() is called from within SMM, SMRAM is accessible so it is not necessary to check the SMRAM open/lock state via SMM ACCESS Protocol.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11142 6f19259b-4bc3-4df7-8a09-765794883524
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;
}