mirror of https://github.com/acidanthera/audk.git
Add PeimDispatcherReenter to fix bug of PeiDispatch can not be quit correctly.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5628 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
d949491623
commit
1bd90a4c47
|
@ -335,6 +335,15 @@ PeiDispatcher (
|
||||||
// satisfied, this dipatcher should run only once.
|
// satisfied, this dipatcher should run only once.
|
||||||
//
|
//
|
||||||
do {
|
do {
|
||||||
|
//
|
||||||
|
// In case that reenter PeiCore happens, the last pass record is still available.
|
||||||
|
//
|
||||||
|
if (!Private->PeimDispatcherReenter) {
|
||||||
|
Private->PeimNeedingDispatch = FALSE;
|
||||||
|
Private->PeimDispatchOnThisPass = FALSE;
|
||||||
|
} else {
|
||||||
|
Private->PeimDispatcherReenter = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
for (FvCount = Private->CurrentPeimFvCount; FvCount < Private->FvCount; FvCount++) {
|
for (FvCount = Private->CurrentPeimFvCount; FvCount < Private->FvCount; FvCount++) {
|
||||||
Private->CurrentPeimFvCount = FvCount;
|
Private->CurrentPeimFvCount = FvCount;
|
||||||
|
@ -581,6 +590,11 @@ PeiDispatcher (
|
||||||
//
|
//
|
||||||
PrivateInMem->PeiMemoryInstalled = TRUE;
|
PrivateInMem->PeiMemoryInstalled = TRUE;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Indicate that PeiCore reenter
|
||||||
|
//
|
||||||
|
Private->PeimDispatcherReenter = TRUE;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Shadow PEI Core. When permanent memory is avaiable, shadow
|
// Shadow PEI Core. When permanent memory is avaiable, shadow
|
||||||
// PEI Core and PEIMs to get high performance.
|
// PEI Core and PEIMs to get high performance.
|
||||||
|
@ -689,8 +703,7 @@ InitializeDispatcherData (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (OldCoreData == NULL) {
|
if (OldCoreData == NULL) {
|
||||||
PrivateData->PeimNeedingDispatch = FALSE;
|
PrivateData->PeimDispatcherReenter = FALSE;
|
||||||
PrivateData->PeimDispatchOnThisPass = FALSE;
|
|
||||||
PeiInitializeFv (PrivateData, SecCoreData);
|
PeiInitializeFv (PrivateData, SecCoreData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -139,6 +139,7 @@ typedef struct{
|
||||||
EFI_PEI_FILE_HANDLE CurrentFileHandle;
|
EFI_PEI_FILE_HANDLE CurrentFileHandle;
|
||||||
BOOLEAN PeimNeedingDispatch;
|
BOOLEAN PeimNeedingDispatch;
|
||||||
BOOLEAN PeimDispatchOnThisPass;
|
BOOLEAN PeimDispatchOnThisPass;
|
||||||
|
BOOLEAN PeimDispatcherReenter;
|
||||||
UINTN AllFvCount;
|
UINTN AllFvCount;
|
||||||
EFI_PEI_FV_HANDLE AllFv[FixedPcdGet32 (PcdPeiCoreMaxFvSupported)];
|
EFI_PEI_FV_HANDLE AllFv[FixedPcdGet32 (PcdPeiCoreMaxFvSupported)];
|
||||||
EFI_PEI_HOB_POINTERS HobList;
|
EFI_PEI_HOB_POINTERS HobList;
|
||||||
|
|
Loading…
Reference in New Issue