Pei Core Firmware File System service routines.\r
\r
Copyright (c) 2015 HP Development Company, L.P.\r
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
EFI_PEI_FILE_HANDLE FileHandle;\r
VOID *DepexData;\r
BOOLEAN IsFvInfo2;\r
- \r
+ UINTN CurFvCount;\r
+\r
Status = EFI_SUCCESS;\r
PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);\r
\r
PrivateData->Fv[PrivateData->FvCount].FvPpi = FvPpi;\r
PrivateData->Fv[PrivateData->FvCount].FvHandle = FvHandle;\r
PrivateData->Fv[PrivateData->FvCount].AuthenticationStatus = FvInfo2Ppi.AuthenticationStatus;\r
+ CurFvCount = PrivateData->FvCount;\r
DEBUG ((\r
EFI_D_INFO, \r
"The %dth FV start address is 0x%11p, size is 0x%08x, handle is 0x%p\n", \r
- (UINT32) PrivateData->FvCount, \r
+ (UINT32) CurFvCount,\r
(VOID *) FvInfo2Ppi.FvInfo, \r
FvInfo2Ppi.FvInfoSize,\r
FvHandle\r
}\r
}\r
\r
- DEBUG ((EFI_D_INFO, "Found firmware volume Image File %p in FV[%d] %p\n", FileHandle, PrivateData->FvCount - 1, FvHandle));\r
- ProcessFvFile (PrivateData, &PrivateData->Fv[PrivateData->FvCount - 1], FileHandle);\r
+ DEBUG ((EFI_D_INFO, "Found firmware volume Image File %p in FV[%d] %p\n", FileHandle, CurFvCount, FvHandle));\r
+ ProcessFvFile (PrivateData, &PrivateData->Fv[CurFvCount], FileHandle);\r
}\r
} while (FileHandle != NULL);\r
} else {\r
/**\r
After PeiCore image is shadowed into permanent memory, all build-in FvPpi should\r
be re-installed with the instance in permanent memory and all cached FvPpi pointers in \r
- PrivateData->Fv[] array should be fixed up to be pointed to the one in permenant\r
+ PrivateData->Fv[] array should be fixed up to be pointed to the one in permanent\r
memory.\r
\r
@param PrivateData Pointer to PEI_CORE_INSTANCE.\r
UINTN FvIndex;\r
EFI_PEI_FILE_HANDLE FileHandle;\r
VOID *DepexData; \r
- \r
+ UINTN CurFvCount;\r
+\r
PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);\r
FvPpi = (EFI_PEI_FIRMWARE_VOLUME_PPI*) Ppi;\r
\r
PrivateData->Fv[PrivateData->FvCount].FvPpi = FvPpi;\r
PrivateData->Fv[PrivateData->FvCount].FvHandle = FvHandle;\r
PrivateData->Fv[PrivateData->FvCount].AuthenticationStatus = AuthenticationStatus;\r
+ CurFvCount = PrivateData->FvCount;\r
DEBUG ((\r
EFI_D_INFO, \r
"The %dth FV start address is 0x%11p, size is 0x%08x, handle is 0x%p\n", \r
- (UINT32) PrivateData->FvCount, \r
+ (UINT32) CurFvCount,\r
(VOID *) FvInfo, \r
FvInfoSize,\r
FvHandle\r
}\r
}\r
\r
- DEBUG ((EFI_D_INFO, "Found firmware volume Image File %p in FV[%d] %p\n", FileHandle, PrivateData->FvCount - 1, FvHandle));\r
- ProcessFvFile (PrivateData, &PrivateData->Fv[PrivateData->FvCount - 1], FileHandle);\r
+ DEBUG ((EFI_D_INFO, "Found firmware volume Image File %p in FV[%d] %p\n", FileHandle, CurFvCount, FvHandle));\r
+ ProcessFvFile (PrivateData, &PrivateData->Fv[CurFvCount], FileHandle);\r
}\r
} while (FileHandle != NULL);\r
} while (TRUE);\r