diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-09-28 14:27:53 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-09-28 14:27:53 +0000 |
commit | 1053e0c513f4f72cb6fb9f4efe6aa2933695dbd6 (patch) | |
tree | 3e3e51025ca5dfb30d78ed3adf6f5041aeb7bc1a /MdeModulePkg | |
parent | 19ea58a1fd9a67263e654c4ef478d49065c3158e (diff) | |
download | edk2-1053e0c513f4f72cb6fb9f4efe6aa2933695dbd6.zip edk2-1053e0c513f4f72cb6fb9f4efe6aa2933695dbd6.tar.gz edk2-1053e0c513f4f72cb6fb9f4efe6aa2933695dbd6.tar.bz2 |
Merge in bug fix from EDK1's PiPei Dispatcher.c
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3973 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c index b9780a2..9d73c53 100644 --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c @@ -228,6 +228,7 @@ Returns: BOOLEAN PeimNeedingDispatch;
BOOLEAN PeimDispatchOnThisPass;
UINTN SaveCurrentPeimCount;
+ UINTN SaveCurrentFvCount;
EFI_PEI_FILE_HANDLE SaveCurrentFileHandle;
VOID *TopOfStack;
PEI_CORE_PARAMETERS PeiCoreParameters;
@@ -244,9 +245,10 @@ Returns: // update the modules' status from PEIM_STATE_REGISITER_FOR_SHADOW to PEIM_STATE_DONE.
//
SaveCurrentPeimCount = Private->CurrentPeimCount;
+ SaveCurrentFvCount = Private->CurrentPeimFvCount;
SaveCurrentFileHandle = Private->CurrentFileHandle;
- for (Index1 = 0;Index1 <= Private->CurrentPeimFvCount; Index1++) {
+ for (Index1 = 0; Index1 <= SaveCurrentFvCount; Index1++) {
for (Index2 = 0; (Index2 < PEI_CORE_MAX_PEIM_PER_FV) && (Private->Fv[Index1].FvFileHandles[Index2] != NULL); Index2++) {
if (Private->Fv[Index1].PeimState[Index2] == PEIM_STATE_REGISITER_FOR_SHADOW) {
PeimFileHandle = Private->Fv[Index1].FvFileHandles[Index2];
@@ -261,8 +263,9 @@ Returns: // PEIM_STATE_REGISITER_FOR_SHADOW move to PEIM_STATE_DONE
//
Private->Fv[Index1].PeimState[Index2]++;
- Private->CurrentFileHandle = PeimFileHandle;
- Private->CurrentPeimCount = Index2;
+ Private->CurrentFileHandle = PeimFileHandle;
+ Private->CurrentPeimFvCount = Index1;
+ Private->CurrentPeimCount = Index2;
//
// Call the PEIM entry point
//
@@ -281,8 +284,9 @@ Returns: }
}
}
- Private->CurrentFileHandle = SaveCurrentFileHandle;
- Private->CurrentPeimCount = SaveCurrentPeimCount;
+ Private->CurrentFileHandle = SaveCurrentFileHandle;
+ Private->CurrentPeimFvCount = SaveCurrentFvCount;
+ Private->CurrentPeimCount = SaveCurrentPeimCount;
}
//
|