mirror of https://github.com/acidanthera/audk.git
Update PiSmmCore:
1. Update PiSmmIpl.c DoCommunicate() to prevent exception in case call SmiManage directly if SMRAM is closed or locked. That case causes exception. 2. Update PiSmmCore.c SmmEntryPoint(). It is not required to save/restore InSmm. Because SMM is non-reentrant. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10131 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
26a76fbcb2
commit
3c5963cf29
|
@ -245,7 +245,6 @@ SmmEntryPoint (
|
|||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_SMM_COMMUNICATE_HEADER *CommunicateHeader;
|
||||
BOOLEAN OldInSmm;
|
||||
|
||||
//
|
||||
// Update SMST using the context
|
||||
|
@ -264,9 +263,8 @@ SmmEntryPoint (
|
|||
}
|
||||
|
||||
//
|
||||
// Save current InSmm state and set InSmm state to TRUE, it will be used by SmmBase2 protocol
|
||||
// Mark the InSmm flag as TRUE, it will be used by SmmBase2 protocol
|
||||
//
|
||||
OldInSmm = gSmmCorePrivate->InSmm;
|
||||
gSmmCorePrivate->InSmm = TRUE;
|
||||
|
||||
//
|
||||
|
@ -301,9 +299,9 @@ SmmEntryPoint (
|
|||
}
|
||||
|
||||
//
|
||||
// Restore original InSmm state as we are going to leave SMM
|
||||
// Clear the InSmm flag as we are going to leave SMM
|
||||
//
|
||||
gSmmCorePrivate->InSmm = OldInSmm;
|
||||
gSmmCorePrivate->InSmm = FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -397,6 +397,13 @@ SmmCommunicationCommunicate (
|
|||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
//
|
||||
// Don't allow call SmiManage() directly when SMRAM is closed or locked.
|
||||
//
|
||||
if (!mSmmAccess->OpenState || mSmmAccess->LockState) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
//
|
||||
// Save current InSmm state and set InSmm state to TRUE
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue