\r
for (FvCount = Private->CurrentPeimFvCount; FvCount < Private->FvCount; FvCount++) {\r
Private->CurrentPeimFvCount = FvCount;\r
- VolumeHandle = Private->Fv[FvCount].FvHeader;\r
+ //\r
+ // Get this Fv Handle by PeiService FvFindNextVolume.\r
+ //\r
+ PeiFvFindNextVolume ((CONST EFI_PEI_SERVICES **) PeiServices, FvCount, &VolumeHandle);\r
\r
if (Private->CurrentPeimCount == 0) {\r
//\r
//\r
// Reserve the size of new stack at bottom of physical memory\r
//\r
- OldPeiStackSize = Private->StackSize;\r
+ OldPeiStackSize = (UINT64) SecCoreData->StackSize;\r
NewPeiStackSize = (RShiftU64 (Private->PhysicalMemoryLength, 1) + EFI_PAGE_MASK) & ~EFI_PAGE_MASK;\r
if (FixedPcdGet32(PcdPeiCoreMaxPeiStackSize) > (UINT32) NewPeiStackSize) {\r
Private->StackSize = NewPeiStackSize;\r