summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2007-09-28 14:27:53 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2007-09-28 14:27:53 +0000
commit1053e0c513f4f72cb6fb9f4efe6aa2933695dbd6 (patch)
tree3e3e51025ca5dfb30d78ed3adf6f5041aeb7bc1a /MdeModulePkg/Core
parent19ea58a1fd9a67263e654c4ef478d49065c3158e (diff)
downloadedk2-platforms-1053e0c513f4f72cb6fb9f4efe6aa2933695dbd6.tar.xz
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/Core')
-rw-r--r--MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
index b9780a2c7b..9d73c53bb1 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;
}
//